-
Notifications
You must be signed in to change notification settings - Fork 91
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
fixing searching for restricted datasets and accessing ASF on demand data from Opera #443
Conversation
earthaccess/results.py
Outdated
@@ -228,7 +228,9 @@ def __repr__(self) -> str: | |||
Temporal coverage: {self['umm']['TemporalExtent']} | |||
Size(MB): {self.size()} | |||
Data: {data_links}\n\n | |||
""".strip().replace(" ", "") | |||
""".strip().replace( |
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.
Black likes this, Ruff does not, which one is right? @mfisher87
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 think we should pick one :) Ruff offers a formatter that re-implements Black, but I've never worked with it before. Personally, I'd turn Ruff formatting off and stick with Black due to my lack of experience, but if I had more time I'd try to learn more and switch to Ruff for everything.
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.
Looks like Ruff prefers the compact and black expands. I think Ruff is actually correct here (obvs. subjective).
This doc is helpful for black vs ruff:
https://github.com/astral-sh/ruff/blob/main/docs/formatter/black.md#implicit-string-concatenations-in-attribute-accesses
I don't think it matters which, but I agree that we should pick one -- I'd prefer ruff overall.
@MattF-NSIDC I'm pretty happy with ruff; and the transition from black to ruff is pretty straight forward as they mostly behave the same.
adding Sentinel 1, (I though Sentinel was working before.) Co-authored-by: Joseph H Kennedy <[email protected]>
Co-authored-by: Joseph H Kennedy <[email protected]>
@@ -4,7 +4,7 @@ channels: | |||
dependencies: | |||
# This environment bootstraps poetry, the actual dev environment | |||
# is installed and managed with poetry | |||
- python=3.9 | |||
- python=3.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 one is only for the local dev environment and actually not necessary as we can just pip install the project locally.... I use it to bootstrap the environment and install some conda libs to test notebooks with (cartopy)
Should we include #436 on this PR? since we are touching the EDL session? |
Yes, that's a good idea |
|
||
def __init__( | ||
self, username: Optional[str] = None, password: Optional[str] = None | ||
) -> None: | ||
super().__init__() | ||
self.headers.update({"User-Agent": user_agent}) |
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.
earthaccess
will now use the User-Agent
header to identify requests to EDL. 🎉
Co-authored-by: Joseph H Kennedy <[email protected]>
Should we merge this before the other open PRs? @jhkennedy @mfisher87 |
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
def instrument(self, instrument: str) -> Type[CollectionQuery]: | ||
"""Searh datasets by instrument | ||
|
||
???+ Tip |
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.
Logistically, that makes sense to me. I haven't done a proper review here and won't have time in short-term, so I'll leave the "approval" decision to others :) |
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 think this looks good! Should work as is, but I added a take-or-leave suggestion
Co-authored-by: Joseph H Kennedy <[email protected]>
I think that last commit broke things... 😂 @jhkennedy |
Yes, hense the "Note: imports will also need to be adjusted." 😉 |
I'm using importlib so we avoid importing the library and potentially produce one of those circular import errors, I think it should be good now. |
going to merge this @jhkennedy |
hits()
instead of calling parent's classsuper()
📚 Documentation preview 📚: https://earthaccess--443.org.readthedocs.build/en/443/