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

Fix GH212, PP308 #8621

Merged
merged 6 commits into from
Jan 19, 2024
Merged

Fix GH212, PP308 #8621

merged 6 commits into from
Jan 19, 2024

Conversation

tqa236
Copy link
Contributor

@tqa236 tqa236 commented Jan 18, 2024

Fix a few warnings by repo review: GH212, PP308

@tqa236 tqa236 changed the title Fix GH212, PP305, PP308 Fix GH212, PP308 Jan 18, 2024
pyproject.toml Outdated
@@ -255,7 +255,7 @@ select = [
known-first-party = ["xarray"]

[tool.pytest.ini_options]
addopts = ["--strict-config", "--strict-markers"]
addopts = ["-ra", "--strict-config", "--strict-markers"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems super verbose:

pytest -k move -ra
============================================================================ short test summary info =============================================================================
SKIPPED [1] xarray/tests/test_cupy.py:9: could not import 'cupy': No module named 'cupy'
SKIPPED [1] xarray/tests/test_sparse.py:20: could not import 'sparse': No module named 'sparse'
SKIPPED [1] xarray/tests/test_strategies.py:5: could not import 'hypothesis': No module named 'hypothesis'
SKIPPED [1] properties/test_encode_decode.py:9: could not import 'hypothesis': No module named 'hypothesis'
SKIPPED [1] properties/test_pandas_roundtrip.py:12: could not import 'hypothesis': No module named 'hypothesis'
================================================================= 3 passed, 5 skipped, 18117 deselected in 3.65s =================================================================

There are going to be hundreds of lines on a full test?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@max-sixty should I revert this change? As a side note, do you think it's worth adding a repo-review section in pyproject.toml to mark unfixed errors?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@max-sixty should I revert this change?

I would vote to not have this.

And would push back on this being recommended — is there someone who thinks this is a good idea in 90%+ of repos? Or what's the bar for having things as part of the standard? (not blaming you tbc!)

do you think it's worth adding a repo-review section in pyproject.toml to mark unfixed errors?

Would you mind providing more context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@max-sixty I removed this change as well.

About the second question, I think it would be nice if we can provide some context to future maintainers/contributors that we tried this rule and confirmed that it's not suitable for the project so that they don't spend time trying that again. Maybe as a form of comment, or a section in pyproject.toml that specifies which rules we want to enforce and which we want to ignore.

Relevant doc: https://github.com/scientific-python/repo-review?tab=readme-ov-file#configuration

[tool.repo-review]
select = ["A", "B", "C100"]
ignore = ["A100"]

Copy link
Collaborator

Choose a reason for hiding this comment

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

Great idea!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@max-sixty I added the config, please take a look.

The check no longer shows PP308 as failed: https://learn.scientific-python.org/development/guides/repo-review/?repo=tqa236%2Fxarray&branch=fix-repo-review-warning

groups:
actions:
patterns:
- "*"
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@max-sixty
Copy link
Collaborator

Great, thanks @tqa236

Setting to auto-merge. There's unrelated test failure from a dependency which should clear in a few hours (but will require re-running the test). Feel free to ping if it doesn't merge!

@max-sixty max-sixty enabled auto-merge (squash) January 19, 2024 20:45
auto-merge was automatically disabled January 19, 2024 22:58

Head branch was pushed to by a user without write access

@tqa236 tqa236 force-pushed the fix-repo-review-warning branch from 7aa8c7b to 328b6c2 Compare January 19, 2024 22:58
@max-sixty max-sixty merged commit 35b7ab1 into pydata:main Jan 19, 2024
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants