diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c10ae42..a8a5f98 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,7 +94,7 @@ jobs: - name: Install Python 3 uses: actions/setup-python@v1 with: - python-version: 3.10 + python-version: 3.10.2 - name: Install dependencies run: | python -m pip install --upgrade pip @@ -110,7 +110,7 @@ jobs: - name: Install Python 3 uses: actions/setup-python@v1 with: - python-version: 3.10 + python-version: 3.10.2 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/nempy/historical_inputs/mms_db.py b/nempy/historical_inputs/mms_db.py index c8c0850..8620f26 100644 --- a/nempy/historical_inputs/mms_db.py +++ b/nempy/historical_inputs/mms_db.py @@ -824,8 +824,7 @@ def get_data(self, date_time): ... 'SETTLEMENTDATE': ['2019/01/01 11:55:00', '2019/01/01 12:00:00'], ... 'INITIALMW': [1.0, 2.0]}) - >>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) - 2 + >>> _ = data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) When we call get_data the output is filtered by SETTLEMENTDATE. @@ -888,8 +887,7 @@ def get_data(self, date_time): ... 'INTERVAL_DATETIME': ['2019/01/01 11:55:00', '2019/01/01 12:00:00'], ... 'INITIALMW': [1.0, 2.0]}) - >>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) - 2 + >>> _ = data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) When we call get_data the output is filtered by INTERVAL_DATETIME. @@ -957,8 +955,7 @@ def get_data(self, date_time): ... 'SETTLEMENTDATE': ['2019/01/01 00:00:00', '2019/01/02 00:00:00'], ... 'INITIALMW': [1.0, 2.0]}) - >>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) - 2 + >>> _ = data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) 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 @@ -1048,8 +1045,7 @@ def get_data(self, date_time): ... 'END_DATE': ['2019/01/02 00:00:00', '2019/01/03 00:00:00'], ... 'INITIALMW': [1.0, 2.0]}) - >>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) - 2 + >>> _ = data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) When we call get_data the output is filtered by START_DATE and END_DATE. @@ -1131,8 +1127,7 @@ def get_data(self, date_time): ... 'VERSIONNO': [1, 2, 2, 3], ... 'RHS': [1.0, 2.0, 2.0, 3.0]}) - >>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) - 4 + >>> _ = data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) >>> data = pd.DataFrame({ ... 'SETTLEMENTDATE' : ['2019/01/02 00:00:00', '2019/01/02 00:00:00', '2019/01/03 00:00:00', @@ -1142,8 +1137,7 @@ def get_data(self, date_time): ... '2019/01/03 00:00:00'], ... 'GENCONID_VERSIONNO': [1, 2, 2, 3]}) - >>> data.to_sql('DISPATCHCONSTRAINT', con=con, if_exists='append', index=False) - 4 + >>> _ = data.to_sql('DISPATCHCONSTRAINT', con=con, if_exists='append', index=False) When we call get_data the output is filtered by the contents of DISPATCHCONSTRAINT. @@ -1225,8 +1219,7 @@ def get_data(self, date_time): ... 'VERSIONNO': [1, 2, 2, 3], ... 'INITIALMW': [1.0, 2.0, 2.0, 3.0]}) - >>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) - 4 + >>> _ = data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) We also need to add data to DISPATCHINTERCONNECTORRES because the results of the get_data method are filtered against this table @@ -1235,8 +1228,7 @@ def get_data(self, date_time): ... 'INTERCONNECTORID': ['X', 'X', 'Y'], ... '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 + >>> _ = data.to_sql('DISPATCHINTERCONNECTORRES', con=con, if_exists='append', index=False) When we call get_data the output is filtered by the contents of DISPATCHCONSTRAINT. @@ -1352,8 +1344,7 @@ def get_data(self, date_time): ... 'VERSIONNO': [1, 2, 2, 3], ... 'INITIALMW': [1.0, 2.0, 2.0, 3.0]}) - >>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) - 4 + >>> _ = data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) When we call get_data the output is filtered by most recent effective date and highest version no. @@ -1458,8 +1449,8 @@ def get_data(self): ... 'DUID': ['X', 'Y'], ... 'INITIALMW': [1.0, 2.0]}) - >>> data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) - 2 + >>> _ = data.to_sql('EXAMPLE', con=con, if_exists='append', index=False) + When we call get_data all data in the table is returned.