-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2d860f
commit a23de3f
Showing
4 changed files
with
57 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
from datetime import datetime | ||
|
||
|
||
def get_daily_hf_file_name(date: datetime): | ||
return f"data/{date.strftime('%Y/%m/%d')}/5min.parquet" | ||
def get_monthly_hf_file_name(date: datetime, period: int = 5): | ||
return f"data/{date.strftime('%Y/%m')}/{period}min.parquet" | ||
|
||
|
||
def get_monthly_hf_file_name(date: datetime): | ||
return f"data/{date.strftime('%Y/%m')}/5min.parquet" | ||
|
||
|
||
def get_yearly_hf_file_name(date: datetime): | ||
return f"data/{date.strftime('%Y')}/5min.parquet" | ||
def get_yearly_hf_file_name(date: datetime, period: int = 5): | ||
return f"data/{date.strftime('%Y')}/{period}min.parquet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from cloud_archives.pv.passiv.passiv_daily import get_daily_passiv_data | ||
from cloud_archives.pv.passiv.passiv_monthly import get_monthly_passiv_data | ||
|
||
from datetime import datetime, timezone | ||
|
||
|
||
def test_get_daily_passiv_data(): | ||
start_date = datetime(2022, 1, 1, tzinfo=timezone.utc) | ||
get_daily_passiv_data(start_date, upload_to_hf=False, overwrite=True) | ||
get_monthly_passiv_data(start_date, upload_to_hf=False, overwrite=True) |