-
Notifications
You must be signed in to change notification settings - Fork 188
Various small fixes #2876
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
Various small fixes #2876
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c15a844
Remove netCDF4 comment
VeckoTheGecko dcdb0e4
Remove comment about `pytest docs/examples`
VeckoTheGecko 9ec8684
Move test_reprs.py to v4 test suite
VeckoTheGecko c9b502f
Small fixes to reprs
VeckoTheGecko c8cb780
Remove mentions of legacy folders
VeckoTheGecko a2fb915
Remove outdated comment
VeckoTheGecko 2328eac
Remove outdated comment
VeckoTheGecko 920d457
Update TODO comment
VeckoTheGecko b04db58
Split test_reprs.py into respective files
VeckoTheGecko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,7 +116,7 @@ def time_interval(self): # TODO PR: Remove in favour of referencing model time_ | |
| return self.model.time_interval | ||
|
|
||
| def __repr__(self): | ||
| return f"Field(name={self.name}, model={self.model})" | ||
| return f"Field(name={self.name!r}, model={self.model})" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensures quotes. i.e., |
||
|
|
||
| @property | ||
| def interp_method(self): | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,6 @@ def fieldset_repr(fieldset: FieldSet) -> str: | |
| return textwrap.dedent(out).strip() | ||
|
|
||
|
|
||
| # TODO add land_value here after HG #2451 is merged | ||
|
erikvansebille marked this conversation as resolved.
|
||
| def field_repr(field: Field, level: int = 0) -> str: | ||
| """Return a pretty repr for Field""" | ||
| with xr.set_options(display_expand_data=False): | ||
|
|
@@ -138,8 +137,7 @@ def particlefile_repr(pfile: Any) -> str: | |
| out = f"""<{type(pfile).__name__}> | ||
| path : {pfile.path} | ||
| outputdt : {pfile.outputdt!r} | ||
| metadata : | ||
| {_format_list_items_multiline(pfile.metadata, level=2, with_brackets=False)} | ||
| metadata : {_format_list_items_multiline(pfile.metadata, level=2, with_brackets=False)} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. formatting fix |
||
| """ | ||
| return textwrap.dedent(out).strip() | ||
|
|
||
|
|
||
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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.
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.
Makes it very easy to test strings against regexes in Pytest.
https://github.com/asottile/re-assert
with
it gives failure of
As opposed to a generic uninformative "regex failed to match" error that we'd get from the
relibrary directly