Skip to content

Commit

Permalink
refactor: Update old URLs (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-volue committed Feb 15, 2024
1 parent 0ff2993 commit b3aff92
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ Quickstart
'TIME_SERIES'


.. _authentication credentials: https://auth.wattsight.com/account/oauth-clients
.. _authentication credentials: https://auth.volueinsight.com/account/oauth-clients
.. _pandas.Series: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.html
.. _pandas.DataFrame: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html
2 changes: 1 addition & 1 deletion examples/Instance_curve_examples/ins_get_relative.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This example fetches a relative forecast from an INSTANCE curve that contains our forecast for wind
production based on the ec00 weather forecast. A relative forecast is a conjunction of fragments of
selected instances. Have a look at the documentation for further information:
https://wattsight.com/docs/api/api-absolute-relative-forecast.html?highlight=relative
https://volueinsight.com/docs/api/api-absolute-relative-forecast.html?highlight=relative
"""

import wapi
Expand Down
12 changes: 6 additions & 6 deletions examples/reproduce_wattsight_plots/ws_fundamentals_hourly.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
This example shows how to reproduce the plot from these 4 pages:
Consumption: https://app.wattsight.com/#tab/power/115/2
Photovoltaic: https://app.wattsight.com/#tab/power/135/2
Wind: https://app.wattsight.com/#tab/power/126/2
Residual Load: https://app.wattsight.com/#tab/power/109/2
Consumption: https://app.volueinsight.com/#tab/power/115/2
Photovoltaic: https://app.volueinsight.com/#tab/power/135/2
Wind: https://app.volueinsight.com/#tab/power/126/2
Residual Load: https://app.volueinsight.com/#tab/power/109/2
The pages show the latest forecasts compared to actual values and normals
"""
Expand All @@ -20,8 +20,8 @@
my_config_file = 'path/to/your/config.ini'

# Choose one of the available regions by using its abbreviation
# as shown on the top of each wattsight page
# (eg https://app.wattsight.com/#tab/power/135/2)
# as shown on the top of each volue insight page
# (eg https://app.volueinsight.com/#tab/power/135/2)
region = 'de'

# choose one of the four possible categories for this plot:
Expand Down
10 changes: 5 additions & 5 deletions examples/reproduce_wattsight_plots/ws_temperature_hourly.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
This example shows how to reproduce temperature forecast plot for any region:
https://app.wattsight.com/#tab/power/245/2
https://app.volueinsight.com/#tab/power/245/2
"""

import wapi
Expand All @@ -15,8 +15,8 @@
my_config_file = 'path/to/your/config.ini'

# Choose one of the available regions by using its abbreviation
# as shown on the top of the wattsight page
# https://app.wattsight.com/#tab/power/245/2
# as shown on the top of the volueinsight page
# https://app.volueinsight.com/#tab/power/245/2
region = 'de'

# Set the aggregation function ['AVERAGE','SUM'] and output frequency of the
Expand Down Expand Up @@ -55,12 +55,12 @@
# create the first part of the curve name dependent on the category and region
curve_part1 = 'tt '+region+' con'

# specifiy timezone based on region
# specify timezone based on region
if region == 'tr':
# Turkey has timezone TRT
tz = 'trt'
else:
# All other regions ahve timezone CET
# All other regions have timezone CET
tz = 'cet'

## get normal data
Expand Down
4 changes: 2 additions & 2 deletions sampleconfig.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[common]
urlbase = https://api.wattsight.com
urlbase = https://api.volueinsight.com
auth_type = OAuth
timeout = 300

[OAuth]
id = client_id
secret = client_secret
auth_urlbase = https://auth.wattsight.com
auth_urlbase = https://auth.volueinsight.com
2 changes: 1 addition & 1 deletion unittest/wapi_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_minimal_config_file():
config_file = os.path.join(os.path.dirname(__file__), 'testconfig_minimal.ini')
s = wapi.Session(config_file=config_file)
#
assert s.urlbase == 'https://api.wattsight.com'
assert s.urlbase == 'https://api.volueinsight.com'
assert s.auth is None


Expand Down
14 changes: 7 additions & 7 deletions wapi/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
RETRY_COUNT = 4 # Number of times to retry
RETRY_DELAY = 0.5 # Delay between retried calls, in seconds.
TIMEOUT = 300 # Default timeout for web calls, in seconds.
API_URLBASE = 'https://api.wattsight.com'
AUTH_URLBASE = 'https://auth.wattsight.com'
API_URLBASE = 'https://api.volueinsight.com'
AUTH_URLBASE = 'https://auth.volueinsight.com'


class ConfigException(Exception):
Expand All @@ -30,21 +30,21 @@ class MetadataException(Exception):


class Session(object):
""" Establish a connection to Wattsight API
""" Establish a connection to Volue Insight API
Creates an object that holds the state which is needed when talking to the
Wattsight data center. To establish a session, you have to provide
Volue Insight data center. To establish a session, you have to provide
suthentication information either directly by using a ```client_id` and
``client_secret`` or using a ``config_file`` .
See https://api.wattsight.com/#documentation for information how to get
See https://volueinsight.com/docs/authentication.html for information how to get
your authentication data.
Parameters
----------
urlbase: url
Location of Wattsight service
Location of Volue Insight service
config_file: path
path to the config.ini file which contains your authentication
information.
Expand All @@ -53,7 +53,7 @@ class Session(object):
client_secret:
Your client secret.
auth_urlbase: url
Location of Wattsight authentication service
Location of Volue Insight authentication service
timeout: float
Timeout for REST calls, in seconds
Expand Down

0 comments on commit b3aff92

Please sign in to comment.