Skip to content

Treat warnings in pytest as errors, fixing things along the way #1116

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

Merged
merged 4 commits into from
Apr 12, 2025

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented Apr 11, 2025

Closes #1115

This (ongoing) work uncovered some bugs:

  • galvani not releasing file descriptors for MPR files -> fixed in navani v0.1.8
  • in situ plugin pinning to navani too aggressively -> fixed in plugin v0.1.2
  • better closing of db connections (minor performance gain probably), think i'll remove flask-pymongo soon
  • skipping lots of warnings about nasty things we have to do (e.g., calling subprocesses)
  • skipping some numerical warnings for e.g., baseline corrections in XRD

@ml-evs ml-evs added testing For issues/PRs that change how the package is tested Python labels Apr 11, 2025
@ml-evs ml-evs added this to the v0.5.x milestone Apr 11, 2025
Copy link

cypress bot commented Apr 11, 2025

datalab    Run #3097

Run Properties:  status check passed Passed #3097  •  git commit a2f2e383bd ℹ️: Merge 5f58b20f97b955f67736f6e99c466319ce1b23b6 into 1d591936841dbecf2edb8cdcdbe7...
Project datalab
Branch Review ml-evs/warnings-as-errors
Run status status check passed Passed #3097
Run duration 07m 56s
Commit git commit a2f2e383bd ℹ️: Merge 5f58b20f97b955f67736f6e99c466319ce1b23b6 into 1d591936841dbecf2edb8cdcdbe7...
Committer Matthew Evans
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 477
View all changes introduced in this branch ↗︎

@ml-evs ml-evs force-pushed the ml-evs/warnings-as-errors branch 2 times, most recently from 3f596f0 to 03708f7 Compare April 11, 2025 21:52
@ml-evs ml-evs force-pushed the ml-evs/warnings-as-errors branch 3 times, most recently from 3f0a3e0 to 950c879 Compare April 11, 2025 22:23
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 55.17241% with 13 lines in your changes missing coverage. Please review.

Project coverage is 70.28%. Comparing base (1d59193) to head (5f58b20).
Report is 112 commits behind head on main.

Files with missing lines Patch % Lines
pydatalab/src/pydatalab/apps/echem/blocks.py 0.00% 4 Missing ⚠️
pydatalab/src/pydatalab/backups.py 50.00% 3 Missing ⚠️
pydatalab/src/pydatalab/apps/nmr/utils.py 0.00% 2 Missing ⚠️
pydatalab/src/pydatalab/file_utils.py 0.00% 2 Missing ⚠️
pydatalab/src/pydatalab/apps/chat/blocks.py 0.00% 1 Missing ⚠️
pydatalab/src/pydatalab/routes/v0_1/auth.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1116   +/-   ##
=======================================
  Coverage   70.28%   70.28%           
=======================================
  Files          63       63           
  Lines        4129     4133    +4     
=======================================
+ Hits         2902     2905    +3     
- Misses       1227     1228    +1     
Files with missing lines Coverage Δ
pydatalab/src/pydatalab/blocks/base.py 68.88% <100.00%> (ø)
pydatalab/src/pydatalab/config.py 82.14% <ø> (ø)
pydatalab/src/pydatalab/logger.py 86.79% <100.00%> (ø)
pydatalab/src/pydatalab/models/utils.py 87.57% <100.00%> (ø)
pydatalab/src/pydatalab/mongo.py 80.00% <100.00%> (+0.89%) ⬆️
pydatalab/src/pydatalab/remote_filesystems.py 79.74% <100.00%> (ø)
pydatalab/src/pydatalab/routes/v0_1/items.py 83.38% <100.00%> (ø)
pydatalab/src/pydatalab/apps/chat/blocks.py 20.16% <0.00%> (ø)
pydatalab/src/pydatalab/routes/v0_1/auth.py 63.54% <0.00%> (ø)
pydatalab/src/pydatalab/apps/nmr/utils.py 36.90% <0.00%> (-0.45%) ⬇️
... and 3 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ml-evs ml-evs force-pushed the ml-evs/warnings-as-errors branch from 950c879 to 5f58b20 Compare April 11, 2025 22:27
@ml-evs ml-evs merged commit c80ea21 into main Apr 12, 2025
17 checks passed
@ml-evs ml-evs deleted the ml-evs/warnings-as-errors branch April 12, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python testing For issues/PRs that change how the package is tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Treat warnings as errors in Python testing
1 participant