Skip to content
Merged
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
3 changes: 1 addition & 2 deletions src/nemosis/data_fetch_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,7 @@ def _finalise_csv_data(data, table_name):
static_downloader_map = {
"VARIABLES_FCAS_4_SECOND": _downloader.download_csv,
"ELEMENTS_FCAS_4_SECOND": _downloader.download_elements_file,
"Generators and Scheduled Loads": _downloader.download_xl,
"_downloader.download_xl": _downloader.download_xl,
"Generators and Scheduled Loads": _downloader.download_xlsx,
}

static_file_reader_map = {
Expand Down
1 change: 0 additions & 1 deletion src/nemosis/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
"ELEMENTS_FCAS_4_SECOND": "https://www.nemweb.com.au/Reports/Current/Causer_Pays_Elements/",
"VARIABLES_FCAS_4_SECOND": "https://aemo.com.au/-/media/files/electricity/nem/settlements_and_payments/settlements/auction-reports/archive/ancillary-services-market-causer-pays-variables-file.csv",
"Generators and Scheduled Loads": "https://www.aemo.com.au/-/media/files/electricity/nem/Participant_Information/NEM-Registration-and-Exemption-List.xlsx",
"_downloader.download_xl": "https://www.aemo.com.au/-/media/files/electricity/nem/Participant_Information/NEM-Registration-and-Exemption-List.xlsx",
}

aemo_mms_url = "http://www.nemweb.com.au/Data_Archive/Wholesale_Electricity/MMSDM/{}/MMSDM_{}_{}/MMSDM_Historical_Data_SQLLoader/DATA/{}.zip"
Expand Down
6 changes: 3 additions & 3 deletions src/nemosis/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ def download_elements_file(url, path_and_name):
f.write(r.content)


def download_xl(url, path_and_name):
def download_xlsx(url, path_and_name):
"""
This function downloads a zipped csv using a url, extracts the csv and
saves it a specified location
Download an Excel (.xlsx) file from a URL and save it to the
specified path. Used for AEMO's NEM Registration and Exemption List.
"""
r = requests.get(url, headers=USR_AGENT_HEADER)
with open(path_and_name, "wb") as f:
Expand Down
Loading