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

add register() method to base class #9

Merged
merged 2 commits into from
Feb 1, 2024
Merged

add register() method to base class #9

merged 2 commits into from
Feb 1, 2024

Conversation

sam-watttime
Copy link
Contributor

No description provided.

@sam-watttime sam-watttime requested a review from nsteins December 22, 2023 21:19
@sam-watttime
Copy link
Contributor Author

We simply return a 400 if the user is already registered, so testing does not hit the live API. Instead, we mock the call.

def test_get_historical_csv(self):
start = parse("2022-01-01 00:00Z")
end = parse("2022-01-02 00:00Z")
self.historical.get_historical_csv(start, end, REGION)

fp = Path.home() / "watttime_historical_csvs" / f"{REGION}_co2_moer_{start.date()}_{end.date()}.csv"
fp = (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

linter change

@@ -1,7 +1,7 @@
# About
This SDK is meant to help users with basic queries to WattTime’s API (version 3), and to get data returned in specific formats (e.g., JSON, pandas, csv).

Users must first [register for access to the WattTime API here](https://watttime.org/docs-dev/data-plans/).
Users may register for access to the WattTime API through this client, however the basic user scoping given will only allow newly registered users to access data for the `CAISO_NORTH` region. Additionally, data may not be available for all signal types for newly registered users.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still have an index datatype? or is CAISO_NORTH the only free thing in the new API?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still tbd afaik. Index is not implemented on v3 yet, and unclear if it will be.

@sam-watttime sam-watttime merged commit 2cbc7dc into main Feb 1, 2024
@jcofield jcofield deleted the register branch March 8, 2025 17:54
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.

2 participants