-
Notifications
You must be signed in to change notification settings - Fork 101
chore(all): Improve pytest configuration
#2096
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
thomass-dev
merged 1 commit into
probabl-ai:main
from
DimitriPapadopoulos:repo-review_pytest_addopts
Oct 29, 2025
Merged
chore(all): Improve pytest configuration
#2096
thomass-dev
merged 1 commit into
probabl-ai:main
from
DimitriPapadopoulos:repo-review_pytest_addopts
Oct 29, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8ef6071 to
fb35085
Compare
Start applying the settings suggested by Repo-Review:
* PP308: `-ra` will print a summary “r”eport of “a”ll results,
which gives you a quick way to review what tests failed
and were skipped, and why. `--showlocals` will print
locals in tracebacks.
* PP307: `--strict-markers` will make sure you don’t try to use
an unspecified fixture.
* PP306: And `--strict-config` will error if you make a mistake
in your config.
* PP305: `xfail_strict` will change the default for `xfail` to
fail the tests if it doesn’t fail - you can still override
locally in a specific xfail for a flaky failure.
* PP304: `log_cli_level` will report INFO and above log messages
on a failure.
fb35085 to
6a44d4f
Compare
pytest configurationpytest configuration
Contributor
Coverage Report for |
|||||||||||||||||||||||||||||||||||||||||||||
| File | Stmts | Miss | Cover | Missing |
|---|---|---|---|---|
| skore-local-project/src/skore_local_project | ||||
| __init__.py | 5 | 0 | 100% | |
| metadata.py | 87 | 4 | 95% | 26, 38, 150–151 |
| project.py | 102 | 1 | 99% | 244 |
| storage.py | 40 | 2 | 95% | 45, 187 |
| TOTAL | 234 | 7 | 97% | |
| Tests | Skipped | Failures | Errors | Time |
|---|---|---|---|---|
| 24 | 0 💤 | 0 ❌ | 0 🔥 | 4.996s ⏱️ |
Contributor
Contributor
Coverage Report for |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| File | Stmts | Miss | Cover | Missing |
|---|---|---|---|---|
| skore-hub-project/src/skore_hub_project | ||||
| __init__.py | 22 | 1 | 95% | 39 |
| protocol.py | 31 | 0 | 100% | |
| skore-hub-project/src/skore_hub_project/artifact | ||||
| __init__.py | 0 | 0 | 100% | |
| artifact.py | 23 | 0 | 100% | |
| serializer.py | 26 | 0 | 100% | |
| upload.py | 36 | 4 | 88% | 175, 177–178, 180 |
| skore-hub-project/src/skore_hub_project/artifact/media | ||||
| __init__.py | 5 | 0 | 100% | |
| data.py | 22 | 0 | 100% | |
| feature_importance.py | 44 | 1 | 97% | 50 |
| media.py | 10 | 0 | 100% | |
| model.py | 9 | 0 | 100% | |
| performance.py | 44 | 0 | 100% | |
| skore-hub-project/src/skore_hub_project/artifact/pickle | ||||
| __init__.py | 2 | 0 | 100% | |
| pickle.py | 24 | 0 | 100% | |
| skore-hub-project/src/skore_hub_project/authentication | ||||
| __init__.py | 0 | 0 | 100% | |
| login.py | 66 | 0 | 100% | |
| logout.py | 4 | 0 | 100% | |
| token.py | 24 | 0 | 100% | |
| uri.py | 18 | 0 | 100% | |
| skore-hub-project/src/skore_hub_project/client | ||||
| __init__.py | 0 | 0 | 100% | |
| client.py | 60 | 0 | 100% | |
| skore-hub-project/src/skore_hub_project/metric | ||||
| __init__.py | 10 | 0 | 100% | |
| accuracy.py | 35 | 0 | 100% | |
| brier_score.py | 35 | 0 | 100% | |
| log_loss.py | 35 | 0 | 100% | |
| metric.py | 49 | 1 | 97% | 25 |
| precision.py | 61 | 0 | 100% | |
| r2.py | 35 | 0 | 100% | |
| recall.py | 63 | 0 | 100% | |
| rmse.py | 35 | 0 | 100% | |
| roc_auc.py | 35 | 0 | 100% | |
| timing.py | 90 | 4 | 95% | 52–53, 115–116 |
| skore-hub-project/src/skore_hub_project/project | ||||
| __init__.py | 0 | 0 | 100% | |
| project.py | 102 | 3 | 97% | 204, 308, 338 |
| skore-hub-project/src/skore_hub_project/report | ||||
| __init__.py | 3 | 0 | 100% | |
| cross_validation_report.py | 64 | 1 | 98% | 204 |
| estimator_report.py | 12 | 0 | 100% | |
| report.py | 52 | 0 | 100% | |
| TOTAL | 1186 | 15 | 98% | |
| Tests | Skipped | Failures | Errors | Time |
|---|---|---|---|---|
| 139 | 0 💤 | 0 ❌ | 0 🔥 | 1m 18s ⏱️ |
thomass-dev
approved these changes
Oct 29, 2025
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
We don't use xfail mark, i don't think it is really mandatory for now.
But why not for the future...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Start applying the settings suggested by Repo-Review:
-rawill print a summary “r”eport of “a”ll results, which gives you a quick way to review what tests failed and were skipped, and why.--strict-markerswill make sure you don’t try to use an unspecified fixture.--strict-configwill error if you make a mistake in your config.xfail_strictwill change the default forxfailto fail the tests if it doesn’t fail - you can still override locally in a specific xfail for a flaky failure.log_cli_levelwill report INFO and above log messages on a failure.This PR comes as a complement of #2082, which applies this suggestion:
filter_warningswill cause all warnings to be errors (you can add allowed warnings here too).