Skip to content
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

build+ci: make local, gh, and Jenkins envs identical #2019

Open
wants to merge 1 commit into
base: 1973-clean-up-delphi-utils-take-2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 1 addition & 5 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
if: ${{ steps.changes.outputs.utils == 'true' }}
run: git tag delphi-utils/v${{ steps.utils.outputs.version }}
- name: Publish tags
run: git push --tags
run: git push --tags
outputs:
indicators-version: ${{ steps.indicators.outputs.version }}
utils-version: ${{ steps.utils.outputs.version }}
Expand All @@ -76,10 +76,6 @@ jobs:
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 twine
- name: Install
run: |
make install
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ jobs:
python-version: 3.8
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
pip install pylint pytest pydocstyle wheel
- name: Install
run: |
make install-ci
Expand Down
9 changes: 4 additions & 5 deletions _delphi_utils_python/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.PHONY = venv, lint, test, clean, release

venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e '.[dev]'

install-ci: venv
. env/bin/activate; \
pip install 'build[virtualenv]' pylint pytest pydocstyle wheel twine ; \
pip install '.[dev]'

lint:
Expand All @@ -30,5 +30,4 @@ clean:

release: lint test
. env/bin/activate ; \
pip install 'build[virtualenv]' ; \
python -m build --sdist --wheel
python -m build --sdist --wheel
4 changes: 3 additions & 1 deletion _delphi_utils_python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "setuptools-scm>=8.0"]
requires = ["setuptools>=70.1", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -36,6 +36,7 @@ Homepage = "https://github.com/cmu-delphi/covidcast-indicators"

[project.optional-dependencies]
dev = [
"build[virtualenv]",
"darker[isort]~=2.1.1",
"pylint==2.8.3",
"pytest",
Expand All @@ -45,6 +46,7 @@ dev = [
"moto~=4.2.14",
"requests-mock",
"freezegun",
"twine"
]
flash = ["scipy"]

Expand Down
6 changes: 3 additions & 3 deletions _template_python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
2 changes: 1 addition & 1 deletion backfill_corrections/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ install-python:
fi
python3 -m venv env
source env/bin/activate && \
python -m pip install --upgrade pip && \
python -m pip install pip==23.0.1 && \
pip install wheel && \
pip install --timeout 1000 delphi_utils

Expand Down
6 changes: 3 additions & 3 deletions changehc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
6 changes: 3 additions & 3 deletions claims_hosp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
1 change: 1 addition & 0 deletions claims_hosp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"darker[isort]~=2.1.1",
"delphi-utils",
"numpy",
"pydocstyle",
"pandas",
"paramiko",
"pyarrow",
Expand Down
6 changes: 3 additions & 3 deletions doctor_visits/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
1 change: 1 addition & 0 deletions doctor_visits/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"darker[isort]~=2.1.1",
"delphi-utils",
"numpy",
"pydocstyle",
"pandas",
"paramiko",
"pylint==2.8.3",
Expand Down
6 changes: 3 additions & 3 deletions google_symptoms/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
1 change: 1 addition & 0 deletions google_symptoms/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"freezegun",
"mock",
"numpy",
"pydocstyle",
"pandas-gbq",
"pandas",
"pydocstyle",
Expand Down
6 changes: 3 additions & 3 deletions hhs_hosp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
5 changes: 2 additions & 3 deletions jenkins/build-indicator.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Jenkins build
# Jenkins build
#

set -eo pipefail
Expand All @@ -14,7 +14,6 @@ cd "${WORKSPACE}/${local_indicator}" || exit
# Set up venv
python -m venv env
source env/bin/activate
pip install pip==23.0.1 --retries 10 --timeout 20
pip install numpy --retries 10 --timeout 20
python -m pip install pip==23.0.1 --retries 10 --timeout 20
pip install ../_delphi_utils_python/. --retries 10 --timeout 20
[ ! -f setup.py ] || pip install . --retries 10 --timeout 20
6 changes: 3 additions & 3 deletions nchs_mortality/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
6 changes: 3 additions & 3 deletions nssp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
6 changes: 3 additions & 3 deletions nwss_wastewater/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
6 changes: 3 additions & 3 deletions quidel_covidtest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
6 changes: 3 additions & 3 deletions sir_complainsalot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

dir = $(shell find ./delphi_* -name __init__.py | grep -o 'delphi_[_[:alnum:]]*' | head -1)
venv:
python3.8 -m venv env
python3.8 -m venv env; \
. env/bin/activate; \
python -m pip install pip==23.0.1

install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e ../_delphi_utils_python ;\
pip install -e .

install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install .

Expand Down
1 change: 1 addition & 0 deletions sir_complainsalot/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"darker[isort]~=2.1.1",
"delphi-utils",
"pandas",
"pydocstyle",
"pylint==2.8.3",
"pytest-cov",
"pytest",
Expand Down
Loading