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

Implemented Kanzelhohe Client #3810

Closed
wants to merge 8 commits into from

Conversation

abhijeetmanhas
Copy link
Contributor

Split of PR #3763 .

@abhijeetmanhas abhijeetmanhas requested a review from a team as a code owner February 17, 2020 22:51
@nabobalis nabobalis added this to the 2.0 milestone Feb 17, 2020
@nabobalis nabobalis added the net Affects the net submodule label Feb 17, 2020
@ayshih
Copy link
Member

ayshih commented Feb 18, 2020

Copying over my two relevant comments from #3763:

A question: should we render the observatory as "Kanzelhoehe", or even more correctly as "Kanzelhöhe", rather than "Kanzelhohe"?

One reason that I ask is that Kanzelhoehe is spelled differently in another issue than it is here, and that frustrated my initial attempt at searching.

Originally posted by @ayshih in #3763 (comment)

I'll point out that if this PR gets merged, we really ought to fix how Kanzelhohe/Kanzelhoehe/Kanzelhöhe files are read in by sunpy.map (see #1615 and #1615 (comment)).

Originally posted by @ayshih in #3763 (comment)

@abhijeetmanhas
Copy link
Contributor Author

I will change the name of the client, as per reviewers' instructions; after they all decide.

Copy link
Member

@dpshelio dpshelio left a comment

Choose a reason for hiding this comment

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

some refactoring suggestions

sunpy/net/dataretriever/sources/kanzelhohe.py Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
@abhijeetmanhas
Copy link
Contributor Author

@dpshelio did all the suggested changes. The failing tests are from HEK(not from the changes I made), maybe go away by rerunning the tests.
Any more changes?

sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
Copy link
Member

@dpshelio dpshelio left a comment

Choose a reason for hiding this comment

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

All looks good @abhijeetmanhas - let's see if someone that knows German or from KSO comments on the ö/o/oe problem.

sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
__all__ = ['KanzelhoheClient']


class KanzelhoheClient(GenericClient):
Copy link
Member

Choose a reason for hiding this comment

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

This is more tricky... if we don't put ö on the class name, should we put oe?

@segfaulthunter what would you say?

sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/sources/kanzelhohe.py Outdated Show resolved Hide resolved
@Cadair Cadair modified the milestones: 2.0, 2.1 Apr 15, 2020
@abhijeetmanhas
Copy link
Contributor Author

abhijeetmanhas commented Apr 21, 2020

@dpshelio @nabobalis for naming, can we just have KANZ since VSO uses it? And I checked here http://vso3.stanford.edu/cgi-bin/show_details?instrument=KANZ vso covers only one 6563 wavelength and this client covers two other wavelengths too.

@nabobalis
Copy link
Contributor

You mean call it the KANZClinet?

@abhijeetmanhas
Copy link
Contributor Author

You mean call it the KANZClinet?

yep KANZClient. If it sounds good. Just making initial name same as VSO. We can also have `Kanzelhoehe' but it will confuse some users with ö.

@nabobalis
Copy link
Contributor

Sure.

from sunpy.net import Fido
import sunpy.net.dataretriever.sources.kanzelhohe as kanzelhohe

KClient = kanzelhohe.KANZClient()
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be turned into a pytest fixture.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

KClient.search(TRANGE, a.Wavelength(6000 * u.AA))


# This test downloads 3 files
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to download 1 file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@pep8speaks
Copy link

pep8speaks commented May 8, 2020

Hello @abhijeetmanhas! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-05-08 18:16:38 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Affects the net submodule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants