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

update panda time converter #125

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pvoutput/mapscraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ def clean_soup(soup):
"""Function to clean scraped soup object.

Note that the downloaded soup could change over time.

Args:
soup: bs4.BeautifulSoup

Expand Down
4 changes: 2 additions & 2 deletions pvoutput/pvoutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ def _download_multiple_worker(
)
else:
total_rows += len(timeseries)
_LOG.info(f'Adding timezone {timezone} to {total_rows} rows')
_LOG.info(f"Adding timezone {timezone} to {total_rows} rows")
timeseries = timeseries.tz_localize(timezone)
_LOG.info(
"system_id: %d: %d rows retrieved: %s to %s",
Expand Down Expand Up @@ -1049,7 +1049,7 @@ def _set_rate_limit_params(self, headers):
setattr(self, param_name, header_value)

self.rate_limit_reset_time = pd.Timestamp.utcfromtimestamp(self.rate_limit_reset_time)
self.rate_limit_reset_time = self.rate_limit_reset_time.tz_localize("utc")
self.rate_limit_reset_time = self.rate_limit_reset_time.tz_convert("utc")

_LOG.debug("%s", self.rate_limit_info())

Expand Down
11 changes: 6 additions & 5 deletions scripts/fetch_pv_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
or create and use a ~/.pvoutput.yml file as described in the PVOutput library documentation
"""

from pvoutput import *

import click as cl
import datetime as dt
import logging
import pathlib
import sys

import click as cl
import pandas as pd
import pathlib
import logging

from pvoutput import *


@cl.command()
Expand Down
Loading