Skip to content

Commit

Permalink
fix minor testing bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-gorman committed Feb 7, 2022
1 parent c6e293a commit 8b9d186
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Install Python 3
uses: actions/setup-python@v1
with:
python-version: 3.10.0
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -110,7 +110,7 @@ jobs:
- name: Install Python 3
uses: actions/setup-python@v1
with:
python-version: 3.10.0
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
10 changes: 10 additions & 0 deletions nempy/historical_inputs/mms_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ def get_data(self, date_time):
... 'INITIALMW': [1.0, 2.0]})
>>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False)
2
When we call get_data the output is filtered by SETTLEMENTDATE.
Expand Down Expand Up @@ -888,6 +889,7 @@ def get_data(self, date_time):
... 'INITIALMW': [1.0, 2.0]})
>>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False)
2
When we call get_data the output is filtered by INTERVAL_DATETIME.
Expand Down Expand Up @@ -956,6 +958,7 @@ def get_data(self, date_time):
... 'INITIALMW': [1.0, 2.0]})
>>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False)
2
When we call get_data the output is filtered by SETTLEMENTDATE and the results from the appropriate market
day starting at 04:05:00 are retrieved. In the results below note when the output changes
Expand Down Expand Up @@ -1046,6 +1049,7 @@ def get_data(self, date_time):
... 'INITIALMW': [1.0, 2.0]})
>>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False)
2
When we call get_data the output is filtered by START_DATE and END_DATE.
Expand Down Expand Up @@ -1128,6 +1132,7 @@ def get_data(self, date_time):
... 'RHS': [1.0, 2.0, 2.0, 3.0]})
>>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False)
4
>>> data = pd.DataFrame({
... 'SETTLEMENTDATE' : ['2019/01/02 00:00:00', '2019/01/02 00:00:00', '2019/01/03 00:00:00',
Expand All @@ -1138,6 +1143,7 @@ def get_data(self, date_time):
... 'GENCONID_VERSIONNO': [1, 2, 2, 3]})
>>> data.to_sql('DISPATCHCONSTRAINT', con=con, if_exists='append', index=False)
4
When we call get_data the output is filtered by the contents of DISPATCHCONSTRAINT.
Expand Down Expand Up @@ -1220,6 +1226,7 @@ def get_data(self, date_time):
... 'INITIALMW': [1.0, 2.0, 2.0, 3.0]})
>>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False)
4
We also need to add data to DISPATCHINTERCONNECTORRES because the results of the get_data method are filtered
against this table
Expand All @@ -1229,6 +1236,7 @@ def get_data(self, date_time):
... 'SETTLEMENTDATE': ['2019/01/02 00:00:00', '2019/01/03 00:00:00', '2019/01/02 00:00:00']})
>>> data.to_sql('DISPATCHINTERCONNECTORRES', con=con, if_exists='append', index=False)
3
When we call get_data the output is filtered by the contents of DISPATCHCONSTRAINT.
Expand Down Expand Up @@ -1345,6 +1353,7 @@ def get_data(self, date_time):
... 'INITIALMW': [1.0, 2.0, 2.0, 3.0]})
>>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False)
4
When we call get_data the output is filtered by most recent effective date and highest version no.
Expand Down Expand Up @@ -1450,6 +1459,7 @@ def get_data(self):
... 'INITIALMW': [1.0, 2.0]})
>>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False)
2
When we call get_data all data in the table is returned.
Expand Down

0 comments on commit 8b9d186

Please sign in to comment.