Skip to content

[DRAFT/TEST] try out CI config for testing packages #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
f412605
Add test CI file
chinandrew Oct 26, 2020
3c32afc
update working dir
chinandrew Oct 26, 2020
571fa56
Update linter dir
chinandrew Oct 26, 2020
c665b7c
Update pylint
chinandrew Oct 26, 2020
992aca9
Remove linting for now
chinandrew Oct 26, 2020
3056ba6
Add utils folder
chinandrew Oct 26, 2020
cd1f74f
add linting back
chinandrew Oct 26, 2020
4068a0e
Install CI dependencies
chinandrew Oct 26, 2020
db70bd6
update pylint to scan everything
chinandrew Oct 26, 2020
40f4ab4
change recursion limit to fix pylint bug
chinandrew Oct 26, 2020
3baa640
check pylint version
chinandrew Oct 26, 2020
57c7ea4
Add utils
chinandrew Oct 26, 2020
69d6e5d
remove linter
chinandrew Oct 26, 2020
a52e4d6
fix typo in yaml
chinandrew Oct 26, 2020
44bf432
remove linting and add back example
chinandrew Oct 26, 2020
ba8c40a
Add optimize flag
chinandrew Oct 27, 2020
1229d00
Install pylint
chinandrew Oct 27, 2020
0ddf20b
check versions
chinandrew Oct 27, 2020
189c41f
install latest astroid from git
chinandrew Oct 27, 2020
2833332
install wheel
chinandrew Oct 27, 2020
25b0076
downgrade astroid
chinandrew Oct 27, 2020
b05ee27
list packages
chinandrew Oct 27, 2020
f73af76
pin setuptools
chinandrew Oct 27, 2020
a86c176
adjust python minor version
chinandrew Oct 27, 2020
1098927
pin pandas version to 1.1.1
chinandrew Oct 27, 2020
cb6b767
reoder install
chinandrew Oct 27, 2020
f6c888d
add pip upgrade
chinandrew Oct 27, 2020
cbb9845
fix yaml syntax
chinandrew Oct 27, 2020
bda2d64
try pandas 1.1.0
chinandrew Oct 27, 2020
37df962
pin setuptools
chinandrew Oct 27, 2020
7bdc291
upgrade ubuntu
chinandrew Oct 27, 2020
f6fc88a
remove setuptools statement
chinandrew Oct 27, 2020
f2ad7a8
add pydocstyle
chinandrew Oct 27, 2020
6a95798
verify pandas breaks
chinandrew Oct 27, 2020
f657975
forgot to remove redundant install
chinandrew Oct 27, 2020
ebcafb6
readd pin for pandas, allowo latest python version
chinandrew Oct 27, 2020
4395ff8
check pydocstyle runs
chinandrew Oct 27, 2020
08c91f7
fix syntax
chinandrew Oct 27, 2020
016bf3d
victory
chinandrew Oct 27, 2020
9e17e7c
add comment documenting pandas pin
chinandrew Oct 27, 2020
adf6810
Add makefile
chinandrew Nov 5, 2020
20db5b3
Merge branch 'main' into python-ci
chinandrew Nov 5, 2020
247b4bc
Remove pandas version
chinandrew Nov 5, 2020
8ebbd2c
try all packages
chinandrew Nov 5, 2020
af368bc
disable linting for now
chinandrew Nov 5, 2020
b3f66ea
Merge branch 'main' into makefile
chinandrew Nov 5, 2020
82b5663
Add makefile to all dirs
chinandrew Nov 5, 2020
a536f7e
Remove from SCA
chinandrew Nov 5, 2020
8d7e5f0
remove utils to try the rest
chinandrew Nov 5, 2020
f3d8a85
add makefile for delphi utils
chinandrew Nov 5, 2020
d4e9436
use make commands
chinandrew Nov 5, 2020
5707887
Merge branch 'makefile' into python-ci
chinandrew Nov 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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-20.04
strategy:
matrix:
#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 }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
pip install pylint pytest pydocstyle wheel
- name: Install
run: |
make install
- name: Lint
run: |
# make lint
- name: Test
run: |
make test
22 changes: 22 additions & 0 deletions _delphi_utils_python/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions _template_python/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions cdc_covidnet/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions changehc/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions claims_hosp/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions combo_cases_and_deaths/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions google_health/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions google_symptoms/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions jhu/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions nchs_mortality/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions quidel/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions quidel_covidtest/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions safegraph/Makefile
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions safegraph_patterns/Makefile
Original file line number Diff line number Diff line change
@@ -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
Loading