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: Check in the CI that assert_raises_regex is not being used #23627

Merged
merged 3 commits into from
Nov 12, 2018
Merged

CI: Check in the CI that assert_raises_regex is not being used #23627

merged 3 commits into from
Nov 12, 2018

Conversation

datapythonista
Copy link
Member

@datapythonista datapythonista commented Nov 11, 2018

Follow up of #23592.

As assert_raises_regexis now deprecated, add to the CI a check to fail if a PR uses it.

@datapythonista datapythonista added Testing pandas testing functions or related to the test suite CI Continuous Integration labels Nov 11, 2018
@gfyoung
Copy link
Member

gfyoung commented Nov 11, 2018

As assert_raises_regexis not deprecated, add to the CI a check to fail if a PR uses it.

@datapythonista : That's not true. assert_raises_regex is deprecated. That's why I was saying that the need to check for usage was unnecessary. Warnings will be issued if used.

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Nov 11, 2018 via email

@datapythonista
Copy link
Member Author

I meant now instead of not.

I don't understand what you mean, sorry. I think after all your work replacing assert_raises_regex by pytest.raises now we don't want anyone to use assert_raises_regex anymore, right?

If you agree with that, this PR what it does it just to fail the CI if anyone uses it in a PR. Doesn't this make sense?

Copy link
Member

@gfyoung gfyoung left a comment

Choose a reason for hiding this comment

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

We still need the check, in case it’s used in a test that’s skipped on the numpydev job.

@TomAugspurger : Ah, that's true. Okay, LGTM then.

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

jreback commented Nov 11, 2018

lgtm merge on green

@jreback
Copy link
Contributor

jreback commented Nov 11, 2018

you need --includes '.py --includes '*.pyx'' in your grep

Check that the deprecated `assert_raises_regex` is not used (`pytest.raises(match=pattern)` should be used instead)
Binary file pandas/tests/util/__pycache__/test_testing.cpython-36-PYTEST.pyc matches
Binary file pandas/util/__pycache__/testing.cpython-36.pyc matches
Binary file pandas/util/__pycache__/testing.cpython-36.opt-2.pyc matches
Check that the deprecated `assert_raises_regex` is not used (`pytest.raises(match=pattern)` should be used instead) DONE

@datapythonista
Copy link
Member Author

I just did --exclude=.pyc. I don't think it should be used in .pyx or others, but I guess it's saver. Do you think --include=*.py is better?

@jreback
Copy link
Contributor

jreback commented Nov 11, 2018

@datapythonista that's ok as well. I kind of slightly prefer the includes but prob doesn't make much difference here.

@jreback
Copy link
Contributor

jreback commented Nov 11, 2018

ping on green.

@codecov
Copy link

codecov bot commented Nov 12, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23627      +/-   ##
==========================================
+ Coverage   92.23%   92.23%   +<.01%     
==========================================
  Files         161      161              
  Lines       51288    51322      +34     
==========================================
+ Hits        47304    47337      +33     
- Misses       3984     3985       +1
Flag Coverage Δ
#multiple 90.62% <ø> (ø) ⬆️
#single 42.3% <ø> (+0.03%) ⬆️
Impacted Files Coverage Δ
pandas/core/indexes/timedeltas.py 89.29% <0%> (-0.59%) ⬇️
pandas/core/tools/timedeltas.py 98.03% <0%> (-0.15%) ⬇️
pandas/core/indexes/datetimes.py 96.12% <0%> (-0.02%) ⬇️
pandas/core/arrays/datetimes.py 98.44% <0%> (-0.01%) ⬇️
pandas/core/arrays/timedeltas.py 95.08% <0%> (+1.29%) ⬆️

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 58a59bd...1fea3a4. Read the comment docs.

@gfyoung gfyoung merged commit a092e91 into pandas-dev:master Nov 12, 2018
thoo added a commit to thoo/pandas that referenced this pull request Nov 12, 2018
* upstream/master:
  BUG: Don't over-optimize memory with jagged CSV (pandas-dev#23527)
  DEPR: Deprecate usecols as int in read_excel (pandas-dev#23635)
  More helpful Stata string length error. (pandas-dev#23629)
  BUG: astype fill_value for SparseArray.astype (pandas-dev#23547)
  CLN: datetimelike arrays: isort, small reorg (pandas-dev#23587)
  CI: Check in the CI that assert_raises_regex is not being used (pandas-dev#23627)
  CLN:Remove unused **kwargs from user facing methods (pandas-dev#23249)
  DOC: Enhancing pivot / reshape docs (pandas-dev#21038)
  TST: Fix xfailing DataFrame arithmetic tests by transposing (pandas-dev#23620)
thoo added a commit to thoo/pandas that referenced this pull request Nov 12, 2018
…fixed

* upstream/master:
  DOC: avoid SparseArray.take error (pandas-dev#23637)
  CLN: remove incorrect usages of com.AbstractMethodError (pandas-dev#23625)
  DOC: Adding validation of the section order in docstrings (pandas-dev#23607)
  BUG: Don't over-optimize memory with jagged CSV (pandas-dev#23527)
  DEPR: Deprecate usecols as int in read_excel (pandas-dev#23635)
  More helpful Stata string length error. (pandas-dev#23629)
  BUG: astype fill_value for SparseArray.astype (pandas-dev#23547)
  CLN: datetimelike arrays: isort, small reorg (pandas-dev#23587)
  CI: Check in the CI that assert_raises_regex is not being used (pandas-dev#23627)
  CLN:Remove unused **kwargs from user facing methods (pandas-dev#23249)
JustinZhengBC pushed a commit to JustinZhengBC/pandas that referenced this pull request Nov 14, 2018
tm9k1 pushed a commit to tm9k1/pandas that referenced this pull request Nov 19, 2018
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
CI Continuous Integration 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