-
Notifications
You must be signed in to change notification settings - Fork 39
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 avhrr instrument naming #136
Conversation
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
doc/conf.py
Outdated
@@ -106,7 +106,7 @@ def __getattr__(cls, name): | |||
|
|||
# General information about the project. | |||
project = u'Pyspectral' | |||
copyright = u'2013-2018, PyTroll' | |||
copyright = u'2013-2021, Pytroll' |
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.
Depending on how bored you are you could make this use the current year by importing datetime and doing:
copyright = u'2013-2021, Pytroll' | |
copyright = f'2013-{datetime.utcnow():%Y}, Pytroll' |
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.
In my emacs I have it so that when I edit a file it will update the year automatically. So I am okay with how it is.
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.
But that requires you to edit this file and it isn't about what works for you, it's what works for all contributors.
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.
Ok, yes, I agree. Can we defer this to a more general discussion on how we should handle the headers in all Pytroll code? I rather don't want to change this now in this PR.
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.
I'm not sure why it needs to be discussed. Plus this year in this PR is already wrong as it should probably be 2022, right? As for other pytroll code, pyresample and satpy both do the equivalent:
https://github.com/pytroll/pyresample/blob/main/docs/source/conf.py#L67
https://github.com/pytroll/satpy/blob/main/doc/source/conf.py#L116
@adybbroe what is the state of this PR? |
Very good question. Will try to find out... |
Codecov Report
@@ Coverage Diff @@
## main #136 +/- ##
==========================================
+ Coverage 88.90% 89.08% +0.17%
==========================================
Files 22 22
Lines 2506 2529 +23
==========================================
+ Hits 2228 2253 +25
+ Misses 278 276 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
# Conflicts: # pyspectral/rsr_reader.py # pyspectral/tests/test_utils.py # pyspectral/utils.py
…equire one of platform_name/instrument or filename Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
…pectral into fix-avhrr-instrument-naming # Conflicts: # pyspectral/rsr_reader.py # pyspectral/utils.py
pyspectral/utils.py
Outdated
@@ -284,13 +286,13 @@ def download_rsr(dest_dir=None, dry_run=False): | |||
functions from the internet as tarballs, extracts them, then deletes | |||
the tarball. | |||
|
|||
See :func:`pyspectral.rsr_reader.check_and_download` for a "smart" version | |||
See: func: `pyspectral.rsr_reader.check_and_download` for a "smart" version |
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.
Not sure what did this, but this formatting is wrong. func
is supposed to be surrounded by the colons and right next to the backtick of the function path.
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.
What a mess, I think I have reverted back to how it was now. Thanks for spotting this!
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.
Yeah, weird. I wouldn't think flake8 would do this and isort shouldn't be touching docstrings.
pyspectral/utils.py
Outdated
of this process that only downloads the necessary files. | ||
|
||
Args: | ||
dest_dir (str): Path to put the temporary tarball and extracted RSR | ||
dest_dir(str): Path to put the temporary tarball and extracted RSR |
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.
Also not sure if this was automated or not, but I'm pretty sure it is required/standard that there be a space between the argument name and data type.
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.
Really weird! That must have been automated. And be due to the pre-commit stuff.
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
…hrr-3' Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
# Conflicts: # pyspectral/tests/test_utils.py # pyspectral/utils.py
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, just one unnecessary line in the pre-commit config.
.pre-commit-config.yaml
Outdated
@@ -6,3 +6,12 @@ repos: | |||
hooks: | |||
- id: flake8 | |||
additional_dependencies: [flake8-docstrings, flake8-debugger, flake8-bugbear] | |||
args: [--max-complexity, "10"] |
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.
this is only needed when the mccabe plugin is requested I think.
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.
Okay, thanks!
Not needed. Only needed when the mccabe plugin is requested we believe
pytest pyspectral
flake8 pyspectral