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

CI: Fixing possible bugs in the CI #23727

Merged
merged 12 commits into from
Nov 24, 2018
Merged

CI: Fixing possible bugs in the CI #23727

merged 12 commits into from
Nov 24, 2018

Conversation

datapythonista
Copy link
Member

I'm not sure if they are actual bugs, or I'm not understanding something. I think it's easier to discuss over a PR, so I fixed what I think it's wrong.

@jreback @TomAugspurger do you mind taking a look?

@datapythonista datapythonista added Bug CI Continuous Integration Dependencies Required and optional dependencies labels Nov 15, 2018
Copy link
Member Author

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Added the reasons why I think things are wrong, so it's easier for you to understand my point.

@@ -15,7 +15,7 @@ jobs:
CONDA_ENV: pandas
TEST_ARGS: "--skip-slow --skip-network"

py36_locale:
py37_locale:
Copy link
Member Author

Choose a reason for hiding this comment

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

In CONDA_PY we have 37, as well as in the yaml file, so I assume the name is wrong.

@@ -27,6 +27,7 @@ jobs:
CONDA_PY: "36"
CONDA_ENV: pandas
TEST_ARGS: "--only-slow --skip-network"
LOCALE_OVERRIDE: "zh_CN.UTF-8"
Copy link
Member Author

Choose a reason for hiding this comment

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

We have _locale in the name of the build, but we weren't setting LOCALE_OVERRIDE

Copy link
Contributor

Choose a reason for hiding this comment

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

we should be testing ZH and IT is this the missing one?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure which is the build that had to use Italian, but we didn't have one for what I've seen.

Set the locale to it_IT.UTF8 here, I guess that's what we want.

@@ -18,7 +18,7 @@ dependencies:
- pymysql
- pytables
- python-dateutil
- python=3.6*
- python=3.7*
Copy link
Member Author

Choose a reason for hiding this comment

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

In the name of the file we say it's 37, I guess the version here is wrong.

Copy link
Member Author

Choose a reason for hiding this comment

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

looks like this is breaking the installation of this build, as moto can't be installed with python 3.7

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like conda-forge/moto-feedstock#15 is failing on a dependency.

Copy link
Contributor

Choose a reason for hiding this comment

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

@datapythonista @TomAugspurger
Moto is supporting python 3.7. starting with 1.3.7 (the latest version), but that isn't reflected in the requirements yet: getmoto/moto#1886

It's possible to install it through pip - I did that in #23731, but then the problem is that 1.3.7 requires a boto version that will run into #23754, probably because of a moto issue: getmoto/moto#1941

@@ -6,6 +6,7 @@ source activate pandas

if [ -n "$LOCALE_OVERRIDE" ]; then
export LC_ALL="$LOCALE_OVERRIDE";
export LANG="$LOCALE_OVERRIDE";
Copy link
Member Author

Choose a reason for hiding this comment

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

We have this in ci/script_single.sh but not here. I don't see why in one case should be needed and not in the other. I guess it's missing here (or could be removed there).

Copy link
Contributor

Choose a reason for hiding this comment

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

you could add this would prob be ok
but all of the locale tests are done in the single i think

echo pytest -m "not single and slow" -v --durations=10 --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
pytest -m "not single and slow" -v --durations=10 --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
echo pytest -n 2 -m "not single" -v --durations=10 --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
pytest -n 2 -m "not single" -v --durations=10 --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
Copy link
Member Author

Choose a reason for hiding this comment

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

This is in script_multi.py, so I assume for the slow tests with also want to test with two processes, like in the others.

I don't think the slow in the -m is needed, as we already have the --only-slow in TEST_ARGS that is the way we call the slow tests everywhere else (and it's handled in conftest.py

Copy link
Contributor

Choose a reason for hiding this comment

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

you can try but this has issues before iirc

@codecov
Copy link

codecov bot commented Nov 20, 2018

Codecov Report

Merging #23727 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23727      +/-   ##
==========================================
+ Coverage   92.28%   92.29%   +<.01%     
==========================================
  Files         161      161              
  Lines       51500    51497       -3     
==========================================
+ Hits        47528    47530       +2     
+ Misses       3972     3967       -5
Flag Coverage Δ
#multiple 90.69% <ø> (ø) ⬆️
#single 42.42% <ø> (+0.11%) ⬆️
Impacted Files Coverage Δ
pandas/io/parsers.py 95.29% <0%> (-0.07%) ⬇️
pandas/core/base.py 97.6% <0%> (-0.01%) ⬇️
pandas/core/indexes/multi.py 95.49% <0%> (-0.01%) ⬇️
pandas/core/generic.py 96.84% <0%> (-0.01%) ⬇️
pandas/core/strings.py 98.58% <0%> (ø) ⬆️
pandas/core/algorithms.py 95.11% <0%> (ø) ⬆️
pandas/core/indexes/interval.py 94.69% <0%> (ø) ⬆️
pandas/core/ops.py 94.27% <0%> (ø) ⬆️
pandas/core/indexing.py 93.87% <0%> (ø) ⬆️
pandas/core/categorical.py 100% <0%> (ø) ⬆️
... and 18 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 20ae454...e1a6f89. Read the comment docs.

@@ -18,6 +18,9 @@ dependencies:
- pymysql
- pytables
- python-dateutil
# XXX We should be testing ``python=3.7*`` here, but `moto` is
Copy link
Contributor

Choose a reason for hiding this comment

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

you can just fix this, add moto with a min version to the pip section

Copy link
Member Author

Choose a reason for hiding this comment

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

For what I understood, the moto version compatible with Python 3.7 is not yet released. Did I misunderstood something?

Copy link
Contributor

Choose a reason for hiding this comment

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

@datapythonista @jreback
Did you see my comment above #23727 (comment) ?

@datapythonista @TomAugspurger
Moto is supporting python 3.7. starting with 1.3.7 (the latest version), but that isn't reflected in the requirements yet: getmoto/moto#1886
It's possible to install it through pip - I did that in #23731, but then the problem is that 1.3.7 requires a boto version that will run into #23754, probably because of a moto issue: getmoto/moto#1941

The credentials issue would be resolved (or rather deferred) by #23731, which makes all boto tests use the s3_resource fixture, which would turn those NoCredentialsErrors into skips.

Copy link
Contributor

Choose a reason for hiding this comment

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

still if you can just pip install it i am not sure of the problem.

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved to pip, let's see if tests pass. For @h-vetinari comment I understood that even pip version would make the tests fail.

# and also added to `test-data-multiple.xml`, and then printed in the log in the call to `ci/print_skipped.py`.
# Printing them to the log makes the log exceed the maximum size allowed by Travis and makes the build fail.
echo pytest -n 2 -m "not single and slow" --durations=10 --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
pytest -n 2 -m "not single and slow" --durations=10 --junitxml=test-data-multiple.xml --strict $TEST_ARGS pandas
Copy link
Member Author

Choose a reason for hiding this comment

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

not easy to see in the diff, but note that I added the -n 2 here, so the slow tests are being called with two processes in script_multi.sh now.

@datapythonista
Copy link
Member Author

@jreback @TomAugspurger

Installing moto from pip seems to work. But py37_locale to use indeed Python 3.7 causes some deprecation warnings that I think we should fix:

AssertionError: Caused unexpected warning(s): [('DeprecationWarning', DeprecationWarning('time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead'), '/home/vsts/miniconda3/envs/pandas/lib/python3.7/site-packages/xlrd/book.py', 74), ('DeprecationWarning', DeprecationWarning('time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead'), '/home/vsts/miniconda3/envs/pandas/lib/python3.7/site-packages/xlrd/book.py', 89), ('DeprecationWarning', DeprecationWarning('time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead'), '/home/vsts/miniconda3/envs/pandas/lib/python3.7/site-packages/xlrd/book.py', 130)].

Can you confirm, and I'll create a separate issue for it?

@TomAugspurger can you check if regardless of the failure because of the warnings, the changes are made are really fixing typos, or if I misunderstood something

@h-vetinari
Copy link
Contributor

@datapythonista

Moved to pip, let's see if tests pass. For @h-vetinari comment I understood that even pip version would make the tests fail.

FYI, the tests I was talking about got skipped because s3fs was not installed. That's fine if you just want moto without the boto tests. If you do want the boto tests, you'll need to add s3fs to the conda environment (and then you'll run into #23754 for pandas/tests/io/json/test_compression.py::test_with_s3_url and pandas/tests/io/test_excel.py::TestXlrdReader::test_read_from_s3_url; the other s3 tests would be silently skipped in the except: pytest.skip clause of the s3_resource fixture)

@TomAugspurger
Copy link
Contributor

But py37_locale to use indeed Python 3.7 causes some deprecation warnings that I think we should fix:

I think you can safely add a filter for that specific warning, since it's coming from xlrd and not us. The only reason it's failing our build is because it's bubbling up when we're expecting a different warning.

@pep8speaks
Copy link

Hello @datapythonista! Thanks for updating the PR.

@datapythonista
Copy link
Member Author

Added the ignores for the warnings, all green now testing with Python 3.7, @jreback @TomAugspurger let me know if there is any other change required.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

looks good.


# usecols as int
with tm.assert_produces_warning(FutureWarning,
check_stacklevel=False):
df2 = self.get_exceldf("test1", ext, "Sheet2", skiprows=[1],
index_col=0, usecols=3)
with warnings.catch_warnings():
Copy link
Contributor

Choose a reason for hiding this comment

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

can you put this in a decorator / context manger so its not repeated so much

@jreback jreback added this to the 0.24.0 milestone Nov 23, 2018
@datapythonista
Copy link
Member Author

good suggestion @jreback, made the warning ignore a context manager, all green

@contextlib.contextmanager
def ignore_xlrd_time_clock_warning():
"""
Context manager to ignore warnings raised by the xlrd library,
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, is this still present in 1.0.0 which is now our min version?

Copy link
Member Author

Choose a reason for hiding this comment

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

it happens in 1.1.0 (the latest), which is the version I have installed, so I think these warning ignores are needed for now

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

jreback commented Nov 24, 2018

thanks!

Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CI Continuous Integration Dependencies Required and optional dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants