Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmostGreenz committed Dec 15, 2024
2 parents 9dce723 + 4ef9d7e commit a093b4c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 33 deletions.
65 changes: 32 additions & 33 deletions MISOReports/MISOReports.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,8 @@ def add_to_datetime(
),
type_to_parse="xlsx",
parser=parsers.parse_Resource_Uplift_by_Commitment_Reason,
example_url="https://docs.misoenergy.org/marketreports/20220109_Resource_Uplift_by_Commitment_Reason.xlsx",
example_datetime=datetime.datetime(year=2022, month=1, day=9),
example_url="https://docs.misoenergy.org/marketreports/20240109_Resource_Uplift_by_Commitment_Reason.xlsx",
example_datetime=datetime.datetime(year=2024, month=1, day=9),
),

"rt_rpe": Report( # Checked 2024-11-24.
Expand All @@ -588,8 +588,8 @@ def add_to_datetime(
),
type_to_parse="xls",
parser=parsers.parse_rt_rpe,
example_url="https://docs.misoenergy.org/marketreports/20220101_rt_rpe.xls",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20241029_rt_rpe.xls",
example_datetime=datetime.datetime(year=2024, month=10, day=29),
),

"Historical_RT_RSG_Commitment": Report( # Checked 2024-11-24.
Expand Down Expand Up @@ -718,8 +718,8 @@ def add_to_datetime(
),
type_to_parse="csv",
parser=parsers.parse_rt_pbc,
example_url="https://docs.misoenergy.org/marketreports/20220101_rt_pbc.csv",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20240601_rt_pbc.csv",
example_datetime=datetime.datetime(year=2024, month=6, day=1),
),

"rt_bc": Report( # Checked 2024-11-24.
Expand All @@ -744,8 +744,8 @@ def add_to_datetime(
),
type_to_parse="xls",
parser=parsers.parse_rt_or,
example_url="https://docs.misoenergy.org/marketreports/20220101_rt_or.xls",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20240601_rt_or.xls",
example_datetime=datetime.datetime(year=2024, month=6, day=1),
),

"rt_fuel_on_margin": Report( # Checked 2024-11-24.
Expand Down Expand Up @@ -809,8 +809,8 @@ def add_to_datetime(
),
type_to_parse="xlsx",
parser=parsers.parse_ms_rnu_srw,
example_url="https://docs.misoenergy.org/marketreports/20220101_ms_rnu_srw.xlsx",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20240101_ms_rnu_srw.xlsx",
example_datetime=datetime.datetime(year=2024, month=1, day=1),
),

"ms_ri_srw": Report( # Checked 2024-11-26.
Expand Down Expand Up @@ -1560,8 +1560,8 @@ def add_to_datetime(
),
type_to_parse="xlsx",
parser=parsers.parse_da_exante_str_mcp,
example_url="https://docs.misoenergy.org/marketreports/20220101_da_exante_str_mcp.xlsx",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20240601_da_exante_str_mcp.xlsx",
example_datetime=datetime.datetime(year=2024, month=6, day=1),
),

"da_expost_ramp_mcp": Report( # Checked 2024-11-29.
Expand All @@ -1586,8 +1586,8 @@ def add_to_datetime(
),
type_to_parse="xlsx",
parser=parsers.parse_da_expost_str_mcp,
example_url="https://docs.misoenergy.org/marketreports/20220101_da_expost_str_mcp.xlsx",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20240601_da_expost_str_mcp.xlsx",
example_datetime=datetime.datetime(year=2024, month=6, day=1),
),

"rt_expost_ramp_5min_mcp": Report( # Checked 2024-11-29.
Expand Down Expand Up @@ -1625,8 +1625,8 @@ def add_to_datetime(
),
type_to_parse="xlsx",
parser=parsers.parse_rt_expost_str_5min_mcp,
example_url="https://docs.misoenergy.org/marketreports/202201_rt_expost_str_5min_mcp.xlsx",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/202401_rt_expost_str_5min_mcp.xlsx",
example_datetime=datetime.datetime(year=2024, month=1, day=1),
),

"rt_expost_str_mcp": Report( # Checked 2024-11-29.
Expand All @@ -1638,8 +1638,8 @@ def add_to_datetime(
),
type_to_parse="xlsx",
parser=parsers.parse_rt_expost_str_mcp,
example_url="https://docs.misoenergy.org/marketreports/202201_rt_expost_str_mcp.xlsx",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/202401_rt_expost_str_mcp.xlsx",
example_datetime=datetime.datetime(year=2024, month=1, day=1),
),

"Allocation_on_MISO_Flowgates": Report( # Checked 2024-11-29.
Expand Down Expand Up @@ -1730,8 +1730,8 @@ def add_to_datetime(
),
type_to_parse="zip",
parser=parsers.parse_asm_da_co,
example_url="https://docs.misoenergy.org/marketreports/20220101_asm_da_co.zip",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20240729_asm_da_co.zip",
example_datetime=datetime.datetime(year=2024, month=7, day=29),
),

"asm_rt_co": Report( # Checked 2024-12-15.
Expand All @@ -1743,8 +1743,8 @@ def add_to_datetime(
),
type_to_parse="zip",
parser=parsers.parse_asm_rt_co,
example_url="https://docs.misoenergy.org/marketreports/20220101_asm_rt_co.zip",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20240820_asm_rt_co.zip",
example_datetime=datetime.datetime(year=2024, month=8, day=20),
),

"Dead_Node_Report": Report( # Checked 2024-12-15.
Expand All @@ -1769,8 +1769,8 @@ def add_to_datetime(
),
type_to_parse="zip",
parser=parsers.parse_rt_co,
example_url="https://docs.misoenergy.org/marketreports/20220101_rt_co.zip",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20240808_rt_co.zip",
example_datetime=datetime.datetime(year=2024, month=8, day=8),
),

"da_co": Report( # Checked 2024-12-15.
Expand All @@ -1782,8 +1782,8 @@ def add_to_datetime(
),
type_to_parse="zip",
parser=parsers.parse_da_co,
example_url="https://docs.misoenergy.org/marketreports/20220101_da_co.zip",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20241007_da_rpe.xls",
example_datetime=datetime.datetime(year=2024, month=10, day=7),
),

"cpnode_reszone": Report( # Checked 2024-12-15.
Expand Down Expand Up @@ -1886,8 +1886,8 @@ def add_to_datetime(
),
type_to_parse="xls",
parser=parsers.parse_da_rpe,
example_url="https://docs.misoenergy.org/marketreports/20220101_da_rpe.xls",
example_datetime=datetime.datetime(year=2022, month=1, day=1),
example_url="https://docs.misoenergy.org/marketreports/20241020_da_rpe.xls",
example_datetime=datetime.datetime(year=2024, month=10, day=20),
),

"RT_LMPs": Report(
Expand All @@ -1899,8 +1899,8 @@ def add_to_datetime(
),
type_to_parse="zip",
parser=parsers.parse_RT_LMPs,
example_url="https://docs.misoenergy.org/marketreports/2021_Oct-Dec_RT_LMPs.zip",
example_datetime=datetime.datetime(year=2021, month=10, day=1),
example_url="https://docs.misoenergy.org/marketreports/2023_Oct-Dec_RT_LMPs.zip",
example_datetime=datetime.datetime(year=2023, month=10, day=1),
),

"sr_gfm": Report(
Expand Down Expand Up @@ -2068,10 +2068,9 @@ def add_to_datetime(
),
type_to_parse="xml",
parser=parsers.parse_MISOdaily,
example_url="https://docs.misoenergy.org/marketreports/MISOdaily0562015.xml",
example_datetime=datetime.datetime(year=2015, month=2, day=25),
example_url="https://docs.misoenergy.org/marketreports/MISOdaily2512024.xml",
example_datetime=datetime.datetime(year=2024, month=9, day=7),
),


"MISOsamedaydemand": Report( # Checked 2024-11-29.
url_builder=MISOMarketReportsURLBuilder(
Expand Down
3 changes: 3 additions & 0 deletions MISOReports/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def parse_Resource_Uplift_by_Commitment_Reason(
}
).iloc[:-2]

print(df)
exit(1)

df[["ECONOMIC MAX"]] = df[["ECONOMIC MAX"]].astype("Float64")
df[["LOCAL RESOURCE ZONE"]] = df[["LOCAL RESOURCE ZONE"]].astype("Int64")
df[["STARTTIME"]] = df[["STARTTIME"]].apply(pd.to_datetime, format="%Y/%m/%d %I:%M:%S %p")
Expand Down
Binary file added pytest_res.txt
Binary file not shown.

0 comments on commit a093b4c

Please sign in to comment.