Skip to content

Switch the baseurl with set_api#41

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

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

Conversation

@akash5100
Copy link
Collaborator

@akash5100 akash5100 self-assigned this Jul 16, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2022

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.

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
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
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

Copy link
Collaborator Author

@akash5100 akash5100 Jul 22, 2022

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)

Copy link
Collaborator

@dgarciabriseno dgarciabriseno left a comment

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