Skip to content

Switch the baseurl with set_api#41

Merged
nabobalis merged 15 commits into
Helioviewer-Project:mainfrom
akash5100:switch_baseurl
Jul 25, 2022
Merged

Switch the baseurl with set_api#41
nabobalis merged 15 commits into
Helioviewer-Project:mainfrom
akash5100:switch_baseurl

Conversation

@akash5100

Copy link
Copy Markdown
Collaborator

@akash5100 akash5100 self-assigned this Jul 16, 2022
Comment thread hvpy/api_groups/jpeg2000/tests/test_get_jp2_header.py Outdated
Comment thread hvpy/io.py
Comment thread hvpy/io.py Outdated
Comment thread hvpy/io.py Outdated
@codecov-commenter

codecov-commenter commented Jul 18, 2022

Copy link
Copy Markdown

Codecov Report

Merging #41 (39e33e1) into main (d9c98b4) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #41   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        12    +1     
  Lines          172       196   +24     
=========================================
+ Hits           172       196   +24     
Impacted Files Coverage Δ
...py/api_groups/official_clients/get_data_sources.py 100.00% <100.00%> (ø)
hvpy/facade.py 100.00% <100.00%> (ø)
hvpy/io.py 100.00% <100.00%> (ø)
hvpy/parameters.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9c98b4...39e33e1. Read the comment docs.

Comment thread hvpy/io.py
Comment thread hvpy/io.py Outdated
Comment thread hvpy/io.py Outdated
Comment thread hvpy/io.py Outdated
Comment thread hvpy/io.py Outdated
Comment on lines +59 to +60
if "PRIVATE_URL" in os.environ:
return os.environ["PRIVATE_URL"] + self.__class__.__name__[:-15] + "/"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This I assume is now not needed?

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.

This needs to move to initialize _base_url

@akash5100 akash5100 Jul 22, 2022

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

So, I think we will need another function (get_api_url) as you said.
see: #41 (comment)

Comment thread hvpy/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.

Change PRIVATE_URL to something more specific to hvpy. Remember the environment contains variables that are passed to every program that runs on a system, so "PRIVATE_URL" is too vague.

Let's use HELIOVIEWER_API_URL

@akash5100
akash5100 marked this pull request as ready for review July 23, 2022 11:24
@nabobalis
nabobalis merged commit e3d7f0f into Helioviewer-Project:main Jul 25, 2022
@akash5100
akash5100 deleted the switch_baseurl branch July 26, 2022 08:15
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.

Add a way to change the BASEURL

4 participants