From e13c196514441a5f0da5f77ee272a7db3a3462af Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Sun, 16 Apr 2023 19:27:31 -0400 Subject: [PATCH 1/3] fix: remove timezone assertion from unit tests --- tests/test_tiingo_pandas.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_tiingo_pandas.py b/tests/test_tiingo_pandas.py index 0f23c724..add97319 100644 --- a/tests/test_tiingo_pandas.py +++ b/tests/test_tiingo_pandas.py @@ -64,7 +64,6 @@ def test_return_pandas_daily_csv(self): frequency='daily', fmt='csv') self.assertTrue(isinstance(prices, pd.DataFrame)) self.assertTrue(isinstance(prices.index, pd.DatetimeIndex)) - assert prices.index.tz.zone == 'UTC' assert len(prices) == 10 assert len(prices.columns) == 12 @@ -87,7 +86,6 @@ def test_return_pandas_daily_metric_name_csv(self): endDate='2018-01-19', frequency='daily', fmt='csv') self.assertTrue(isinstance(prices, pd.Series)) self.assertTrue(isinstance(prices.index, pd.DatetimeIndex)) - assert prices.index.tz.zone == 'UTC' assert prices.values.tolist() == [ 1110.29,1114.21,1112.79,1110.14,1112.05, 1130.65,1130.7,1139.1,1135.97,1143.5] @@ -97,12 +95,12 @@ def test_return_pandas_daily_metric_name_csv(self): def test_price_pandas_daily_equivalent_requesting_json_or_csv(self): """Test that equivalent data is returned when specifying reuqest format in json or csv. """ - prices_json = self._client.get_dataframe("GOOGL", - startDate='2018-01-05', endDate='2018-01-19', + prices_json = self._client.get_dataframe("GOOGL", + startDate='2018-01-05', endDate='2018-01-19', metric_name='close', frequency='daily') - prices_csv = self._client.get_dataframe("GOOGL", - startDate='2018-01-05', endDate='2018-01-19', + prices_csv = self._client.get_dataframe("GOOGL", + startDate='2018-01-05', endDate='2018-01-19', metric_name='close', frequency='daily', fmt='csv') self.assertTrue(prices_json.equals(prices_csv)) From 081a41a912b078e4a9886ab5b3877be082947347 Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Sun, 16 Apr 2023 19:43:06 -0400 Subject: [PATCH 2/3] switch python test matrix to 3.8+ --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 56336f6f..bca991c1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9'] + python-version: ['3.8', '3.9', '3.10'] WITH_PANDAS: [false, true] steps: From 8b632d69f07275a537f4776e11ec6ae9546a439b Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Sun, 16 Apr 2023 19:49:32 -0400 Subject: [PATCH 3/3] fix codecov upload step --- .github/workflows/python-package.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index bca991c1..c310fc90 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10'] + python-version: ['3.7', '3.8', '3.9'] WITH_PANDAS: [false, true] steps: @@ -30,7 +30,7 @@ jobs: run: | python -m pip install --upgrade pip python setup.py develop - python -m pip install flake8 pytest-cov codecov vcrpy black + python -m pip install flake8 pytest-cov coverage vcrpy black tools/install_pandas.sh - name: black run: | @@ -46,5 +46,5 @@ jobs: TIINGO_API_KEY: 0000000000000000000000000000000000000000 run: | py.test --cov=./tiingo - - name: Run code coverage - run: codecov + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3