Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST/CI: Unify CI test scripts (single and multi) and simplify the system #23924

Merged
merged 8 commits into from
Nov 30, 2018
Merged

TST/CI: Unify CI test scripts (single and multi) and simplify the system #23924

merged 8 commits into from
Nov 30, 2018

Conversation

datapythonista
Copy link
Member

@datapythonista datapythonista commented Nov 26, 2018

The goal of this PR is:

  • Avoid repetitive code by merging ci/script_single.sh and ci/script_multi.sh
  • Simplify calls to different tests (mainly slow vs not slow), by avoiding the previously two different syntax (SLOW=true and --only-slow) and using the pytest native syntax instead
  • Integrate upload_coverage.sh into the new unified script to avoid the extra complexity of having many scripts

@datapythonista datapythonista added Testing pandas testing functions or related to the test suite CI Continuous Integration Clean labels Nov 26, 2018
@pep8speaks
Copy link

Hello @datapythonista! Thanks for submitting the PR.

fi


echo "uploading coverage"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to remove this echo? Figure it doesn't hurt to keep around to give an indication that we've gotten to this point

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, got lost when moving the code

@codecov
Copy link

codecov bot commented Nov 26, 2018

Codecov Report

Merging #23924 into master will decrease coverage by 49.84%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #23924       +/-   ##
===========================================
- Coverage    92.3%   42.45%   -49.85%     
===========================================
  Files         161      161               
  Lines       51551    51549        -2     
===========================================
- Hits        47585    21886    -25699     
- Misses       3966    29663    +25697
Flag Coverage Δ
#multiple ?
#single 42.45% <ø> (+0.01%) ⬆️
Impacted Files Coverage Δ
pandas/io/formats/latex.py 0% <0%> (-100%) ⬇️
pandas/core/categorical.py 0% <0%> (-100%) ⬇️
pandas/io/sas/sas_constants.py 0% <0%> (-100%) ⬇️
pandas/tseries/plotting.py 0% <0%> (-100%) ⬇️
pandas/tseries/converter.py 0% <0%> (-100%) ⬇️
pandas/io/formats/html.py 0% <0%> (-97.64%) ⬇️
pandas/core/groupby/categorical.py 0% <0%> (-95.46%) ⬇️
pandas/io/sas/sas7bdat.py 0% <0%> (-91.17%) ⬇️
pandas/io/sas/sas_xport.py 0% <0%> (-90.15%) ⬇️
pandas/core/tools/numeric.py 10.44% <0%> (-89.56%) ⬇️
... and 119 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c3d9cb...8c9b557. Read the comment docs.

NUM_JOBS=2
fi

pytest -m "$TYPE_PATTERN$PATTERN" -n $NUM_JOBS -s --strict --durations=10 --junitxml=test-data-$TYPE.xml $TEST_ARGS $COVERAGE pandas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have TEST_ARGS here, though you removed it elsewhere

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to get rid of it, but it's needed in the numpydev build for the -W error

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any other way to do that. this makes it pretty clunky.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to take a look at pytest concurrency in a different PR.

I think it should be a simpler way to avoid running the simple tests in parallel, without having to call pytest twice. I think that would be cleaner, and we can simplify all this even more.

Also, I want to see how many processes we have, and not call always for 2 (which I assume it's the number of cores in Travis), but instead use all the available (I think that should be as easy as -n auto, but I want to take a look at how many cores are detected in azure, and how many makes sense to use).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the single tests must remain though
we got failures because these are using single system resources

@@ -28,28 +28,13 @@


def pytest_addoption(parser):
parser.addoption("--skip-slow", action="store_true",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wouldn't remove these, these are useful from the command line

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why to use pytest --skip-slow instead of pytest -m "no slow"? Not a big deal to restore them, but I personally think that they are more complexity than value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this is a pretty common idiom. I don't see value in removing them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@datapythonista can you restore these

@@ -28,28 +28,13 @@


def pytest_addoption(parser):
parser.addoption("--skip-slow", action="store_true",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@datapythonista can you restore these

@datapythonista
Copy link
Member Author

@jreback

@jreback jreback added this to the 0.24.0 milestone Nov 29, 2018
@jreback
Copy link
Contributor

jreback commented Nov 29, 2018

looks like the doc build failed: https://travis-ci.org/pandas-dev/pandas/builds/461388989?utm_source=github_status&utm_medium=notification

i restarted, let's see.

@datapythonista
Copy link
Member Author

I didn't see the docs failed. I forgot to skip the tests in the doc build, and it was timing out doing both things.

It should be fixed now.

@jreback jreback merged commit 5411421 into pandas-dev:master Nov 30, 2018
@jreback
Copy link
Contributor

jreback commented Nov 30, 2018

thanks @datapythonista

saurav2608 pushed a commit to saurav2608/pandas that referenced this pull request Dec 1, 2018
…tem (pandas-dev#23924)

* WIP: unifying script_single and script_multi

* Unified scripts that run the tests (single and multi)

* pending fixes

* logging when we upload the coverage

* Restoring pytest --skip-slow... options

* Not running tests on doc build
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
…tem (pandas-dev#23924)

* WIP: unifying script_single and script_multi

* Unified scripts that run the tests (single and multi)

* pending fixes

* logging when we upload the coverage

* Restoring pytest --skip-slow... options

* Not running tests on doc build
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
…tem (pandas-dev#23924)

* WIP: unifying script_single and script_multi

* Unified scripts that run the tests (single and multi)

* pending fixes

* logging when we upload the coverage

* Restoring pytest --skip-slow... options

* Not running tests on doc build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Clean Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants