From f4126054e8c65fc72c1b052aaceca3abbc7a23f0 Mon Sep 17 00:00:00 2001 From: chinandrew Date: Mon, 26 Oct 2020 14:35:55 -0700 Subject: [PATCH 01/49] Add test CI file --- .github/workflows/python_ci.yml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/python_ci.yml diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml new file mode 100644 index 000000000..48d727b55 --- /dev/null +++ b/.github/workflows/python_ci.yml @@ -0,0 +1,38 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python package + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + packages: [usafacts, cdc_covidnet] + defaults: + run: + working-directory: Python-packages/covidcast-py/${{ matrix.packages }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install package and dependencies + run: | + python -m pip install --upgrade pip + pip install ../_delphi_utils_python/ + pip install . + - name: Lint with pylint + run: | + pylint ${{ matrix.packages }} + - name: Test with pytest + run: | + (cd tests && ../env/bin/pytest) From 3c32afc034af617bc1dd415667c50425e1428098 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 14:39:47 -0700 Subject: [PATCH 02/49] update working dir --- .github/workflows/python_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 48d727b55..4f756b001 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -18,7 +18,7 @@ jobs: packages: [usafacts, cdc_covidnet] defaults: run: - working-directory: Python-packages/covidcast-py/${{ matrix.packages }} + working-directory: ${{ matrix.packages }} steps: - uses: actions/checkout@v2 - name: Set up Python 3.8 From 571fa561280f5b96349838a0b1ebdd1d25ad7f25 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 14:44:16 -0700 Subject: [PATCH 03/49] Update linter dir --- .github/workflows/python_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 4f756b001..0da28b124 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -32,7 +32,7 @@ jobs: pip install . - name: Lint with pylint run: | - pylint ${{ matrix.packages }} + pylint delphi_${{ matrix.packages }} - name: Test with pytest run: | - (cd tests && ../env/bin/pytest) + (cd tests && pytest) From c665b7c89def99d7b89b95d68ffaa91be2fd4f4c Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 14:48:35 -0700 Subject: [PATCH 04/49] Update pylint --- .github/workflows/python_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 0da28b124..6fb6cfe1e 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -28,6 +28,7 @@ jobs: - name: Install package and dependencies run: | python -m pip install --upgrade pip + pip install pylint pytest --upgrade pip install ../_delphi_utils_python/ pip install . - name: Lint with pylint From 992aca906d4339f63019d708d4a02d22807415ed Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 14:49:52 -0700 Subject: [PATCH 05/49] Remove linting for now --- .github/workflows/python_ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 6fb6cfe1e..f5d426ee4 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -31,9 +31,7 @@ jobs: pip install pylint pytest --upgrade pip install ../_delphi_utils_python/ pip install . - - name: Lint with pylint - run: | - pylint delphi_${{ matrix.packages }} + - name: Test with pytest run: | (cd tests && pytest) From 3056ba6c6d7f29f68bb671a8a3a356a2fc05f1bd Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 14:56:31 -0700 Subject: [PATCH 06/49] Add utils folder --- .github/workflows/python_ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index f5d426ee4..7cac1cabb 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - packages: [usafacts, cdc_covidnet] + packages: [usafacts, cdc_covidnet, _delphi_utils_python] defaults: run: working-directory: ${{ matrix.packages }} @@ -25,13 +25,15 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.8 - - name: Install package and dependencies + - name: Install utils + if: ${{ matrix.packages }} != '_delphi_utils_python' run: | python -m pip install --upgrade pip - pip install pylint pytest --upgrade pip install ../_delphi_utils_python/ + - name: Install package and dependencies + run: | + python -m pip install --upgrade pip pip install . - - name: Test with pytest run: | (cd tests && pytest) From cd1f74fdc03b5a6ce17bbf413b0714102cc96453 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 15:06:30 -0700 Subject: [PATCH 07/49] add linting back --- .github/workflows/python_ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 7cac1cabb..bca0c9ce2 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -15,7 +15,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - packages: [usafacts, cdc_covidnet, _delphi_utils_python] + packages: [usafacts, _delphi_utils_python] +# packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts] defaults: run: working-directory: ${{ matrix.packages }} @@ -34,6 +35,9 @@ jobs: run: | python -m pip install --upgrade pip pip install . + - name: Lint with pylint + run: | + pylint delphi_${{ matrix.packages }} - name: Test with pytest run: | (cd tests && pytest) From 4068a0e57e9d2c5febb70eccc8e90fa0f47ebd0b Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 15:09:25 -0700 Subject: [PATCH 08/49] Install CI dependencies --- .github/workflows/python_ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index bca0c9ce2..dff382d9f 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -35,6 +35,9 @@ jobs: run: | python -m pip install --upgrade pip pip install . + - name: Install CI dependencies + run: | + pip install pylint pytest - name: Lint with pylint run: | pylint delphi_${{ matrix.packages }} From db70bd692371dfe2b90694cd61f527a8ec8187a3 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 15:12:57 -0700 Subject: [PATCH 09/49] update pylint to scan everything --- .github/workflows/python_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index dff382d9f..287cb63e5 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -40,7 +40,7 @@ jobs: pip install pylint pytest - name: Lint with pylint run: | - pylint delphi_${{ matrix.packages }} + pylint * - name: Test with pytest run: | (cd tests && pytest) From 40f4ab464407016f455c1d22d7f87c4777c9e7b2 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 15:16:45 -0700 Subject: [PATCH 10/49] change recursion limit to fix pylint bug --- .github/workflows/python_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 287cb63e5..f0a7dd5d6 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -40,7 +40,7 @@ jobs: pip install pylint pytest - name: Lint with pylint run: | - pylint * + pylint * init-hook='import sys; sys.setrecursionlimit(8 * sys.getrecursionlimit())' - name: Test with pytest run: | (cd tests && pytest) From 3baa640769195022459911b648cb9fa97e2ddfa6 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 15:19:48 -0700 Subject: [PATCH 11/49] check pylint version --- .github/workflows/python_ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index f0a7dd5d6..2364bcbc0 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - packages: [usafacts, _delphi_utils_python] + packages: [usafacts] # packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts] defaults: run: @@ -40,6 +40,8 @@ jobs: pip install pylint pytest - name: Lint with pylint run: | + # https://stackoverflow.com/questions/36496192/pylint-infinite-recursion-in-astriod-package + pylint --version pylint * init-hook='import sys; sys.setrecursionlimit(8 * sys.getrecursionlimit())' - name: Test with pytest run: | From 57c7ea471881a6125c4b64c29a13d71aed60260c Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 15:21:08 -0700 Subject: [PATCH 12/49] Add utils --- .github/workflows/python_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 2364bcbc0..05d6fd8a8 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - packages: [usafacts] + packages: [usafacts, _delphi_utils_python] # packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts] defaults: run: From 69d6e5d8427b31de05de40902079fce0f1ab7adc Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 15:22:09 -0700 Subject: [PATCH 13/49] remove linter --- .github/workflows/python_ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 05d6fd8a8..bca0c9ce2 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -35,14 +35,9 @@ jobs: run: | python -m pip install --upgrade pip pip install . - - name: Install CI dependencies - run: | - pip install pylint pytest - name: Lint with pylint run: | - # https://stackoverflow.com/questions/36496192/pylint-infinite-recursion-in-astriod-package - pylint --version - pylint * init-hook='import sys; sys.setrecursionlimit(8 * sys.getrecursionlimit())' + pylint delphi_${{ matrix.packages }} - name: Test with pytest run: | (cd tests && pytest) From a52e4d614443a98feed600b41872d2fbfc945e19 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 15:23:14 -0700 Subject: [PATCH 14/49] fix typo in yaml --- .github/workflows/python_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index bca0c9ce2..550d4b392 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -37,6 +37,7 @@ jobs: pip install . - name: Lint with pylint run: | + pylint --version pylint delphi_${{ matrix.packages }} - name: Test with pytest run: | From 44bf4323a08c78d49c692ad256682de98b8a60d1 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 26 Oct 2020 15:26:14 -0700 Subject: [PATCH 15/49] remove linting and add back example --- .github/workflows/python_ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 550d4b392..1c788bd70 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - packages: [usafacts, _delphi_utils_python] + packages: [_delphi_utils_python, cdc_covidnet, usafacts] # packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts] defaults: run: @@ -35,10 +35,10 @@ jobs: run: | python -m pip install --upgrade pip pip install . - - name: Lint with pylint - run: | - pylint --version - pylint delphi_${{ matrix.packages }} +# - name: Lint with pylint +# run: | +# pylint --version +# pylint delphi_${{ matrix.packages }} - name: Test with pytest run: | (cd tests && pytest) From ba8c40a6fe6d91809f1c7936781402f6c8bdfed2 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 12:48:25 -0700 Subject: [PATCH 16/49] Add optimize flag --- .github/workflows/python_ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 1c788bd70..66be394f7 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -35,10 +35,9 @@ jobs: run: | python -m pip install --upgrade pip pip install . -# - name: Lint with pylint -# run: | -# pylint --version -# pylint delphi_${{ matrix.packages }} + - name: Lint with pylint + run: | + pylint *delphi_* –optimize-ast=y - name: Test with pytest run: | (cd tests && pytest) From 1229d00169910bf32dedec1f0081bbcec71f7425 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 12:50:44 -0700 Subject: [PATCH 17/49] Install pylint --- .github/workflows/python_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 66be394f7..16d660ac6 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -35,6 +35,7 @@ jobs: run: | python -m pip install --upgrade pip pip install . + pip install pylint pytest - name: Lint with pylint run: | pylint *delphi_* –optimize-ast=y From 0ddf20b9fd4ddfa8da9577427a8e5f359989b811 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:01:21 -0700 Subject: [PATCH 18/49] check versions --- .github/workflows/python_ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 16d660ac6..b01190c35 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - packages: [_delphi_utils_python, cdc_covidnet, usafacts] + packages: [usafacts] # packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts] defaults: run: @@ -38,7 +38,8 @@ jobs: pip install pylint pytest - name: Lint with pylint run: | - pylint *delphi_* –optimize-ast=y + pylint --version + pylint *delphi_* –-optimize-ast=y - name: Test with pytest run: | (cd tests && pytest) From 189c41f79014677e71ae27400116bfd5ffcd0a68 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:10:09 -0700 Subject: [PATCH 19/49] install latest astroid from git --- .github/workflows/python_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index b01190c35..5c4bd81b4 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -35,11 +35,11 @@ jobs: run: | python -m pip install --upgrade pip pip install . + python -m pip install git+https://github.com/PyCQA/astroid.git@7e171621e624f1bee5bd93b361d29b443c6a5820 pip install pylint pytest - name: Lint with pylint run: | - pylint --version - pylint *delphi_* –-optimize-ast=y + pylint *delphi_* - name: Test with pytest run: | (cd tests && pytest) From 2833332ae8f1dc1a2a2cdae42677e91e6f374b80 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:11:48 -0700 Subject: [PATCH 20/49] install wheel --- .github/workflows/python_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 5c4bd81b4..1b36df427 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -35,6 +35,7 @@ jobs: run: | python -m pip install --upgrade pip pip install . + pip install wheel python -m pip install git+https://github.com/PyCQA/astroid.git@7e171621e624f1bee5bd93b361d29b443c6a5820 pip install pylint pytest - name: Lint with pylint From 25b00762980f92c92e342d0a37c18efc37a0b0b0 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:13:29 -0700 Subject: [PATCH 21/49] downgrade astroid --- .github/workflows/python_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 1b36df427..a919b6104 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -36,7 +36,7 @@ jobs: python -m pip install --upgrade pip pip install . pip install wheel - python -m pip install git+https://github.com/PyCQA/astroid.git@7e171621e624f1bee5bd93b361d29b443c6a5820 + pip install astroid==2.3.0 pip install pylint pytest - name: Lint with pylint run: | From b05ee272527b1ea1978a8670402407d6440da678 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:20:17 -0700 Subject: [PATCH 22/49] list packages --- .github/workflows/python_ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index a919b6104..f9b3faddf 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -35,9 +35,8 @@ jobs: run: | python -m pip install --upgrade pip pip install . - pip install wheel - pip install astroid==2.3.0 pip install pylint pytest + pip list - name: Lint with pylint run: | pylint *delphi_* From f73af7637be7b27d0506f5e623634ad8f489be01 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:24:40 -0700 Subject: [PATCH 23/49] pin setuptools --- .github/workflows/python_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index f9b3faddf..aa26a527d 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -34,6 +34,7 @@ jobs: - name: Install package and dependencies run: | python -m pip install --upgrade pip + pip install setuptools==44.0.0 pip install . pip install pylint pytest pip list From a86c1766b48075de86d79368d551aa280789b788 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:27:52 -0700 Subject: [PATCH 24/49] adjust python minor version --- .github/workflows/python_ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index aa26a527d..99ad88b57 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,10 +22,10 @@ jobs: working-directory: ${{ matrix.packages }} steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.8.5 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.8.5 - name: Install utils if: ${{ matrix.packages }} != '_delphi_utils_python' run: | @@ -34,10 +34,8 @@ jobs: - name: Install package and dependencies run: | python -m pip install --upgrade pip - pip install setuptools==44.0.0 pip install . pip install pylint pytest - pip list - name: Lint with pylint run: | pylint *delphi_* From 1098927deb86cdd0fcb8d1a3d296def31b877c4f Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:47:11 -0700 Subject: [PATCH 25/49] pin pandas version to 1.1.1 --- .github/workflows/python_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 99ad88b57..cc4f41ea8 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -35,6 +35,7 @@ jobs: run: | python -m pip install --upgrade pip pip install . + pip install pandas==1.1.1 pip install pylint pytest - name: Lint with pylint run: | From cb6b767dfe3d7f9cf613285c8976b5bd035a9f6e Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:50:48 -0700 Subject: [PATCH 26/49] reoder install --- .github/workflows/python_ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index cc4f41ea8..4ee61251b 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -26,17 +26,19 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.8.5 + - name: Install testing dependencies + pip install pandas==1.1.1 + pip install pylint pytest - name: Install utils if: ${{ matrix.packages }} != '_delphi_utils_python' run: | python -m pip install --upgrade pip + pip install pandas==1.1.1 pip install ../_delphi_utils_python/ - name: Install package and dependencies run: | python -m pip install --upgrade pip pip install . - pip install pandas==1.1.1 - pip install pylint pytest - name: Lint with pylint run: | pylint *delphi_* From f6c888dc677f4c76170ed13a3e10a6a3fabbc8fd Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:51:05 -0700 Subject: [PATCH 27/49] add pip upgrade --- .github/workflows/python_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 4ee61251b..9ba590681 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -27,6 +27,7 @@ jobs: with: python-version: 3.8.5 - name: Install testing dependencies + python -m pip install --upgrade pip pip install pandas==1.1.1 pip install pylint pytest - name: Install utils From cbb98459ffc1d241dd4b644a46e153319be2d2ff Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:52:06 -0700 Subject: [PATCH 28/49] fix yaml syntax --- .github/workflows/python_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 9ba590681..ece90e4de 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -27,6 +27,7 @@ jobs: with: python-version: 3.8.5 - name: Install testing dependencies + run: | python -m pip install --upgrade pip pip install pandas==1.1.1 pip install pylint pytest From bda2d647df9cb0643d90743797185998669d9c41 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 13:54:59 -0700 Subject: [PATCH 29/49] try pandas 1.1.0 --- .github/workflows/python_ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index ece90e4de..09b763e33 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -35,12 +35,13 @@ jobs: if: ${{ matrix.packages }} != '_delphi_utils_python' run: | python -m pip install --upgrade pip - pip install pandas==1.1.1 + pip install pandas==1.1.0 pip install ../_delphi_utils_python/ - name: Install package and dependencies run: | python -m pip install --upgrade pip pip install . + pip list - name: Lint with pylint run: | pylint *delphi_* From 37df96279ddbb4fb3a085da6e62f99089b0eea45 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 14:06:26 -0700 Subject: [PATCH 30/49] pin setuptools --- .github/workflows/python_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 09b763e33..cb731b062 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -29,6 +29,7 @@ jobs: - name: Install testing dependencies run: | python -m pip install --upgrade pip + pip install setuptools==49.2.1 pip install pandas==1.1.1 pip install pylint pytest - name: Install utils From 7bdc29117b3cb0ada4874b3e0a5bb004b005f7c3 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 14:10:54 -0700 Subject: [PATCH 31/49] upgrade ubuntu --- .github/workflows/python_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index cb731b062..558776568 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -12,7 +12,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: matrix: packages: [usafacts] From f6fc88af265bf7ba01197a09f8f1cd387d25a582 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 14:15:34 -0700 Subject: [PATCH 32/49] remove setuptools statement --- .github/workflows/python_ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 558776568..5e1b3caeb 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -29,20 +29,16 @@ jobs: - name: Install testing dependencies run: | python -m pip install --upgrade pip - pip install setuptools==49.2.1 pip install pandas==1.1.1 pip install pylint pytest - - name: Install utils + - name: Install Delphi utils if: ${{ matrix.packages }} != '_delphi_utils_python' run: | - python -m pip install --upgrade pip pip install pandas==1.1.0 pip install ../_delphi_utils_python/ - - name: Install package and dependencies + - name: Install package run: | - python -m pip install --upgrade pip pip install . - pip list - name: Lint with pylint run: | pylint *delphi_* From f2ad7a8058a62379c39da311c915b4829a808582 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 14:18:29 -0700 Subject: [PATCH 33/49] add pydocstyle --- .github/workflows/python_ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 5e1b3caeb..f8294eafd 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -30,7 +30,7 @@ jobs: run: | python -m pip install --upgrade pip pip install pandas==1.1.1 - pip install pylint pytest + pip install pylint pytest pydocstyle - name: Install Delphi utils if: ${{ matrix.packages }} != '_delphi_utils_python' run: | @@ -39,9 +39,10 @@ jobs: - name: Install package run: | pip install . - - name: Lint with pylint + - name: Lint run: | - pylint *delphi_* - - name: Test with pytest + pylint delphi_* + pydocstyle delphi* + - name: Test run: | (cd tests && pytest) From 6a9579823dcf123315340c000166e3baa30f870e Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 14:20:31 -0700 Subject: [PATCH 34/49] verify pandas breaks --- .github/workflows/python_ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index f8294eafd..31f1bcf47 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -29,7 +29,6 @@ jobs: - name: Install testing dependencies run: | python -m pip install --upgrade pip - pip install pandas==1.1.1 pip install pylint pytest pydocstyle - name: Install Delphi utils if: ${{ matrix.packages }} != '_delphi_utils_python' From f6579754ad044cf04e2216103385e42e2ca8ec57 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 14:21:53 -0700 Subject: [PATCH 35/49] forgot to remove redundant install --- .github/workflows/python_ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 31f1bcf47..6520145ad 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -33,7 +33,6 @@ jobs: - name: Install Delphi utils if: ${{ matrix.packages }} != '_delphi_utils_python' run: | - pip install pandas==1.1.0 pip install ../_delphi_utils_python/ - name: Install package run: | From ebcafb61b06839d9d2ee3542791e4c026767129d Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 14:23:45 -0700 Subject: [PATCH 36/49] readd pin for pandas, allowo latest python version --- .github/workflows/python_ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 6520145ad..e8139a134 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,13 +22,14 @@ jobs: working-directory: ${{ matrix.packages }} steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8.5 + - name: Set up Python 3.8 uses: actions/setup-python@v2 with: - python-version: 3.8.5 + python-version: 3.8 - name: Install testing dependencies run: | python -m pip install --upgrade pip + pip install pandas==1.1.1 pip install pylint pytest pydocstyle - name: Install Delphi utils if: ${{ matrix.packages }} != '_delphi_utils_python' @@ -40,7 +41,7 @@ jobs: - name: Lint run: | pylint delphi_* - pydocstyle delphi* + pydocstyle delphi_* - name: Test run: | (cd tests && pytest) From 4395ff845d62952ceeff69a7ca0c300e1e1234f2 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 14:25:57 -0700 Subject: [PATCH 37/49] check pydocstyle runs --- .github/workflows/python_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index e8139a134..401c6f2c2 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -40,7 +40,7 @@ jobs: pip install . - name: Lint run: | - pylint delphi_* +# pylint delphi_* pydocstyle delphi_* - name: Test run: | From 08c91f78dfaad26a6c26933c10c085bb5d01c252 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 14:27:01 -0700 Subject: [PATCH 38/49] fix syntax --- .github/workflows/python_ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 401c6f2c2..bcf54c90c 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -40,7 +40,6 @@ jobs: pip install . - name: Lint run: | -# pylint delphi_* pydocstyle delphi_* - name: Test run: | From 016bf3dac64190ac8cfccd898101087f4038a3fe Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 27 Oct 2020 14:28:27 -0700 Subject: [PATCH 39/49] victory --- .github/workflows/python_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index bcf54c90c..e8139a134 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -40,6 +40,7 @@ jobs: pip install . - name: Lint run: | + pylint delphi_* pydocstyle delphi_* - name: Test run: | From 9e17e7c4bbc1cfb0e08b2aa148d6987379d0cf98 Mon Sep 17 00:00:00 2001 From: chinandrew Date: Tue, 27 Oct 2020 15:06:42 -0700 Subject: [PATCH 40/49] add comment documenting pandas pin --- .github/workflows/python_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index e8139a134..d24c2d4be 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -29,7 +29,7 @@ jobs: - name: Install testing dependencies run: | python -m pip install --upgrade pip - pip install pandas==1.1.1 + pip install pandas==1.1.1 # needed to prevent pylint recursion error pip install pylint pytest pydocstyle - name: Install Delphi utils if: ${{ matrix.packages }} != '_delphi_utils_python' From adf6810208d4fb5f5ad4a2e8a43edb245a3d84f7 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 5 Nov 2020 14:59:03 -0800 Subject: [PATCH 41/49] Add makefile --- cdc_covidnet/Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cdc_covidnet/Makefile diff --git a/cdc_covidnet/Makefile b/cdc_covidnet/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/cdc_covidnet/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file From 247b4bc6001c84488e0379486a23be35f2dc5ca4 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 5 Nov 2020 15:00:59 -0800 Subject: [PATCH 42/49] Remove pandas version --- .github/workflows/python_ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index d24c2d4be..8bf039ed4 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -29,7 +29,6 @@ jobs: - name: Install testing dependencies run: | python -m pip install --upgrade pip - pip install pandas==1.1.1 # needed to prevent pylint recursion error pip install pylint pytest pydocstyle - name: Install Delphi utils if: ${{ matrix.packages }} != '_delphi_utils_python' @@ -41,7 +40,7 @@ jobs: - name: Lint run: | pylint delphi_* - pydocstyle delphi_* + # pydocstyle delphi_* - name: Test run: | (cd tests && pytest) From 8ebbd2cbbf4c393fce3bbfe7a47b59bccb3da0fa Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 5 Nov 2020 15:04:15 -0800 Subject: [PATCH 43/49] try all packages --- .github/workflows/python_ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 8bf039ed4..bb52ce8c8 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -15,8 +15,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - packages: [usafacts] -# packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts] + packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts] defaults: run: working-directory: ${{ matrix.packages }} @@ -29,7 +28,7 @@ jobs: - name: Install testing dependencies run: | python -m pip install --upgrade pip - pip install pylint pytest pydocstyle + pip install pylint pytest pydocstyle wheel - name: Install Delphi utils if: ${{ matrix.packages }} != '_delphi_utils_python' run: | From af368bceea48b6511138bee8f80d148c91907876 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 5 Nov 2020 15:06:47 -0800 Subject: [PATCH 44/49] disable linting for now --- .github/workflows/python_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index bb52ce8c8..be908e7c9 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -38,7 +38,7 @@ jobs: pip install . - name: Lint run: | - pylint delphi_* + # pylint delphi_* # pydocstyle delphi_* - name: Test run: | From 82b566394496a05b5848098bb55c3f72e1924338 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 5 Nov 2020 15:21:09 -0800 Subject: [PATCH 45/49] Add makefile to all dirs --- _template_python/Makefile | 23 +++++++++++++++++++++++ changehc/Makefile | 23 +++++++++++++++++++++++ claims_hosp/Makefile | 23 +++++++++++++++++++++++ combo_cases_and_deaths/Makefile | 23 +++++++++++++++++++++++ google_health/Makefile | 23 +++++++++++++++++++++++ google_symptoms/Makefile | 23 +++++++++++++++++++++++ jhu/Makefile | 23 +++++++++++++++++++++++ nchs_mortality/Makefile | 23 +++++++++++++++++++++++ quidel/Makefile | 23 +++++++++++++++++++++++ quidel_covidtest/Makefile | 23 +++++++++++++++++++++++ safegraph/Makefile | 23 +++++++++++++++++++++++ safegraph_patterns/Makefile | 23 +++++++++++++++++++++++ sir_complainsalot/Makefile | 23 +++++++++++++++++++++++ usafacts/Makefile | 23 +++++++++++++++++++++++ 14 files changed, 322 insertions(+) create mode 100644 _template_python/Makefile create mode 100644 changehc/Makefile create mode 100644 claims_hosp/Makefile create mode 100644 combo_cases_and_deaths/Makefile create mode 100644 google_health/Makefile create mode 100644 google_symptoms/Makefile create mode 100644 jhu/Makefile create mode 100644 nchs_mortality/Makefile create mode 100644 quidel/Makefile create mode 100644 quidel_covidtest/Makefile create mode 100644 safegraph/Makefile create mode 100644 safegraph_patterns/Makefile create mode 100644 sir_complainsalot/Makefile create mode 100644 usafacts/Makefile diff --git a/_template_python/Makefile b/_template_python/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/_template_python/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/changehc/Makefile b/changehc/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/changehc/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/claims_hosp/Makefile b/claims_hosp/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/claims_hosp/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/combo_cases_and_deaths/Makefile b/combo_cases_and_deaths/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/combo_cases_and_deaths/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/google_health/Makefile b/google_health/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/google_health/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/google_symptoms/Makefile b/google_symptoms/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/google_symptoms/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/jhu/Makefile b/jhu/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/jhu/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/nchs_mortality/Makefile b/nchs_mortality/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/nchs_mortality/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/quidel/Makefile b/quidel/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/quidel/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/quidel_covidtest/Makefile b/quidel_covidtest/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/quidel_covidtest/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/safegraph/Makefile b/safegraph/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/safegraph/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/safegraph_patterns/Makefile b/safegraph_patterns/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/safegraph_patterns/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/sir_complainsalot/Makefile b/sir_complainsalot/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/sir_complainsalot/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file diff --git a/usafacts/Makefile b/usafacts/Makefile new file mode 100644 index 000000000..78d92e958 --- /dev/null +++ b/usafacts/Makefile @@ -0,0 +1,23 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e ../_delphi_utils_python ;\ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file From a536f7e47b181086cb72b7608cf7906871266fc5 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 5 Nov 2020 15:47:42 -0800 Subject: [PATCH 46/49] Remove from SCA --- sir_complainsalot/Makefile | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 sir_complainsalot/Makefile diff --git a/sir_complainsalot/Makefile b/sir_complainsalot/Makefile deleted file mode 100644 index 78d92e958..000000000 --- a/sir_complainsalot/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -.PHONY = venv, lint, test, clean - -dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') - -venv: - python3 -m venv env - -install: venv - . env/bin/activate; \ - pip install wheel ; \ - pip install -e ../_delphi_utils_python ;\ - pip install -e . - -lint: - . env/bin/activate; \ - pylint $(dir) - -test: - . env/bin/activate ;\ - (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) - -clean: - rm -r env \ No newline at end of file From 8d7e5f027bd4a98530162dff9c999b2709ae1784 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 5 Nov 2020 15:54:07 -0800 Subject: [PATCH 47/49] remove utils to try the rest --- .github/workflows/python_ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index be908e7c9..610f720e3 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -15,7 +15,8 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts] + #packages: [_delphi_utils_python, cdc_covidnet, claims_hosp, combo_cases_and_deaths, google_symptoms, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts] + packages: [cdc_covidnet, claims_hosp, combo_cases_and_deaths, google_symptoms, jhu, nchs_mortality, quidel, quidel_covidtest, safegraph, safegraph_patterns, usafacts] defaults: run: working-directory: ${{ matrix.packages }} From f3d8a85c68633d6cb3af8c7dc9517439c358ee60 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 5 Nov 2020 15:55:35 -0800 Subject: [PATCH 48/49] add makefile for delphi utils --- _delphi_utils_python/Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 _delphi_utils_python/Makefile diff --git a/_delphi_utils_python/Makefile b/_delphi_utils_python/Makefile new file mode 100644 index 000000000..56c71683b --- /dev/null +++ b/_delphi_utils_python/Makefile @@ -0,0 +1,22 @@ +.PHONY = venv, lint, test, clean + +dir = $(shell find ./delphi_* -name __init__.py | sed 's/\/__init__.py//g;s/\.\///g') + +venv: + python3 -m venv env + +install: venv + . env/bin/activate; \ + pip install wheel ; \ + pip install -e . + +lint: + . env/bin/activate; \ + pylint $(dir) + +test: + . env/bin/activate ;\ + (cd tests && ../env/bin/pytest --cov=$(dir) --cov-report=term-missing) + +clean: + rm -r env \ No newline at end of file From d4e94365b02303b05e53aaad0467a61ff98918d8 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 5 Nov 2020 15:57:29 -0800 Subject: [PATCH 49/49] use make commands --- .github/workflows/python_ci.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 610f720e3..4a8720552 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -30,17 +30,12 @@ jobs: run: | python -m pip install --upgrade pip pip install pylint pytest pydocstyle wheel - - name: Install Delphi utils - if: ${{ matrix.packages }} != '_delphi_utils_python' + - name: Install run: | - pip install ../_delphi_utils_python/ - - name: Install package - run: | - pip install . + make install - name: Lint run: | - # pylint delphi_* - # pydocstyle delphi_* + # make lint - name: Test run: | - (cd tests && pytest) + make test