Skip to content

Design Generic function for the getJP2Image endpoint #21

Merged
dgarciabriseno merged 58 commits into
Helioviewer-Project:mainfrom
akash5100:develop
Jun 29, 2022
Merged

Design Generic function for the getJP2Image endpoint #21
dgarciabriseno merged 58 commits into
Helioviewer-Project:mainfrom
akash5100:develop

Conversation

@akash5100

@akash5100 akash5100 commented Jun 7, 2022

Copy link
Copy Markdown
Collaborator

This PR is an attempt to write a generic function for getJP2Image endpoint

@dgarciabriseno

Copy link
Copy Markdown
Collaborator

Please add pydantic to setup.cfg under install_requires. This tells pip that the package relies on it.

Comment thread hvpy/api.py Outdated
Comment thread hvpy/api.py Outdated
Comment thread hvpy/api.py Outdated
Comment thread hvpy/api.py Outdated
Comment thread hvpy/api.py Outdated
Comment thread hvpy/api.py Outdated
Comment thread hvpy/api.py Outdated
Comment thread hvpy/api.py Outdated
Comment thread hvpy/api.py Outdated
Comment thread hvpy/api.py Outdated
Comment thread hvpy/api.py Outdated
@akash5100

Copy link
Copy Markdown
Collaborator Author

Please add pydantic to setup.cfg under install_requires. This tells pip that the package relies on it.

I haven't worked with python packages until now, Is there any command that will automatically update setup.cfg with all installed python packages (pip freeze), or this process manually?

For example, To update requirements.txt we do: pip freeze > requirement.txt

Comment thread hvpy/api_groups/jpeg2000/getJp2Image.py Outdated
Comment thread hvpy/api.py Outdated
@akash5100
akash5100 marked this pull request as draft June 13, 2022 15:37
@nabobalis

Copy link
Copy Markdown
Member

Please add pydantic to setup.cfg under install_requires. This tells pip that the package relies on it.

I haven't worked with python packages until now, Is there any command that will automatically update setup.cfg with all installed python packages (pip freeze), or this process manually?

For example, To update requirements.txt we do: pip freeze > requirement.txt

There is not a method that I am aware of. You will need to add new packages we require to the setup.cfg file as required.

Comment thread hvpy/api_groups/jpeg2000/getJp2Image.py Outdated
Comment thread hvpy/api_groups/jpeg2000/getJp2Image.py Outdated
Comment thread hvpy/core.py Outdated
Comment thread hvpy/core.py Outdated
Comment thread hvpy/tests/test_fake.py

@dgarciabriseno dgarciabriseno left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Still need to update core.py to use OutputType.
  • Update getJp2ImageParameters to inherit from use HvpyParameters
  • Add unit test for getJp2Image

Comment thread hvpy/__init__.py Outdated
Comment thread hvpy/io.py Outdated
Comment thread hvpy/core.py Outdated
Comment thread hvpy/tests/test_get_jp2_image.py Outdated
Comment thread hvpy/tests/test_get_jp2_image.py Outdated
Comment thread hvpy/api_groups/jpeg2000/get_jp2_image.py Outdated
Comment thread hvpy/api_groups/jpeg2000/get_jp2_image.py Outdated
Comment thread hvpy/api_groups/jpeg2000/get_jp2_image.py Outdated
Comment thread hvpy/api_groups/jpeg2000/tests/test_get_jp2_image.py Outdated
Comment thread hvpy/api_groups/jpeg2000/get_jp2_image.py Outdated
Comment thread hvpy/api_groups/jpeg2000/tests/test_get_jp2_image.py Outdated
Comment thread hvpy/api_groups/jpeg2000/tests/test_get_jp2_image.py Outdated
Comment thread hvpy/api_groups/jpeg2000/tests/test_get_jp2_image.py Outdated
Comment thread hvpy/tests/test_io.py Outdated
Comment thread hvpy/tests/test_io.py Outdated

@dgarciabriseno dgarciabriseno left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not really a big deal, but I think part of this test isn't really useful.

Comment thread hvpy/api_groups/jpeg2000/tests/test_get_jp2_image.py Outdated
Comment thread hvpy/tests/test_io.py Outdated
Comment thread hvpy/api_groups/jpeg2000/tests/test_get_jp2_image.py
Comment thread hvpy/tests/test_io.py Outdated
@dgarciabriseno
dgarciabriseno merged commit fc65953 into Helioviewer-Project:main Jun 29, 2022
@akash5100
akash5100 deleted the develop branch July 1, 2022 05:21
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.

user must pass lower case "json" instead of "Json" Implement proof of concept for generic API Handler using getJp2Image endpoint

5 participants