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

Raise errors for uncaught FutureWarnings / DeprecationWarnings in signac. #713

Merged
merged 5 commits into from
Mar 29, 2022

Conversation

bdice
Copy link
Member

@bdice bdice commented Mar 12, 2022

Description

To help ensure that all DeprecationWarnings are converted to FutureWarnings, I updated our pytest configuration to treat warnings as errors. I added exceptions for all existing warnings.

Merging this PR will help us identify all DeprecationWarnings that should be replaced by FutureWarnings. We will remove all existing exceptions for DeprecationWarning in setup.cfg and the test files as they are converted to FutureWarning.

Motivation and Context

Aids with #687. This can be merged before #718 but it will require modifications to setup.cfg after that PR is merged.

Checklist:

@bdice bdice changed the title Run pytest with warnings as errors. Raise errors for uncaught FutureWarnings / DeprecationWarnings in signac. Mar 12, 2022
@bdice bdice self-assigned this Mar 12, 2022
@codecov
Copy link

codecov bot commented Mar 12, 2022

Codecov Report

Merging #713 (4ce7625) into master (3cd249c) will decrease coverage by 0.06%.
The diff coverage is n/a.

❗ Current head 4ce7625 differs from pull request most recent head 39599f7. Consider uploading reports for the commit 39599f7 to get more accurate results

@@            Coverage Diff             @@
##           master     #713      +/-   ##
==========================================
- Coverage   78.34%   78.27%   -0.07%     
==========================================
  Files          66       66              
  Lines        7231     7231              
  Branches     1586     1586              
==========================================
- Hits         5665     5660       -5     
- Misses       1251     1255       +4     
- Partials      315      316       +1     
Impacted Files Coverage Δ
signac/common/deprecation/__init__.py 62.22% <0.00%> (-2.23%) ⬇️
signac/__main__.py 71.33% <0.00%> (-0.34%) ⬇️
signac/cite.py 50.00% <0.00%> (ø)
signac/syncutil.py 76.39% <0.00%> (ø)
signac/core/json.py 86.66% <0.00%> (ø)
signac/common/host.py 40.42% <0.00%> (ø)
signac/contrib/job.py 90.64% <0.00%> (ø)
signac/db/database.py 100.00% <0.00%> (ø)
signac/common/crypt.py 64.00% <0.00%> (ø)
signac/core/utility.py 72.22% <0.00%> (ø)
... and 7 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 3cd249c...39599f7. Read the comment docs.

@bdice bdice force-pushed the warnings-as-errors branch from 8659688 to 4ce7625 Compare March 26, 2022 04:47
@bdice bdice marked this pull request as ready for review March 26, 2022 04:49
@bdice bdice requested review from a team as code owners March 26, 2022 04:49
@bdice bdice requested review from csadorf and Charlottez112 and removed request for a team March 26, 2022 04:49
@bdice bdice added this to the v1.8.0 milestone Mar 26, 2022
@bdice bdice added the enhancement New feature or request label Mar 26, 2022
Copy link
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

One question, but looks good overall.

setup.cfg Show resolved Hide resolved
@bdice bdice enabled auto-merge (squash) March 28, 2022 18:58
@bdice bdice merged commit 6987852 into master Mar 29, 2022
@bdice bdice deleted the warnings-as-errors branch March 29, 2022 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants