Skip to content

Clean up delphi_utils #1984

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

Merged
merged 10 commits into from
Jul 24, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
with:
python-version: 3.8
cache: "pip"
cache-dependency-path: "setup.py"
cache-dependency-path: "pyproject.toml"
- name: Install testing dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion _delphi_utils_python/.bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ commit = True
message = chore: bump delphi_utils to {new_version}
tag = False

[bumpversion:file:setup.py]
[bumpversion:file:pyproject.toml]

[bumpversion:file:delphi_utils/__init__.py]
2 changes: 1 addition & 1 deletion _delphi_utils_python/DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To install the module in your default version of Python, run the
following from this directory:

```
pip install .
pip install -e '.[dev]'
```

As described in each of the indicator code directories, you will want to install
Expand Down
9 changes: 5 additions & 4 deletions _delphi_utils_python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ venv:
install: venv
. env/bin/activate; \
pip install wheel ; \
pip install -e .
pip install -e '.[dev]'

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

lint:
. env/bin/activate; pylint delphi_utils --rcfile=../pyproject.toml
Expand All @@ -30,4 +30,5 @@ clean:

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

[project]
name = "delphi-utils"
version = "0.3.24"
description = "Shared Utility Functions for Indicators"
readme = "README.md"
requires-python = "== 3.8.*"
license = {text = "MIT License"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.8",
"License :: MIT"
]
dependencies = [
"boto3",
"covidcast",
"cvxpy",
"epiweeks",
"gitpython",
"importlib_resources>=1.3",
"numpy",
"pandas>=1.1.0",
"slackclient",
"scs<3.2.6", # TODO: remove this ; it is a cvxpy dependency, and the excluded version appears to break our jenkins build. see: https://github.com/cvxgrp/scs/issues/283
"structlog",
"xlrd",
]

[project.urls]
Homepage = "https://github.com/cmu-delphi/covidcast-indicators"


[project.optional-dependencies]
dev = [
"darker[isort]~=2.1.1",
"pylint==2.8.3",
"pytest",
"pydocstyle",
"pytest-cov",
"mock",
"moto~=4.2.14",
"requests-mock",
"freezegun",
]


[tool.setuptools.packages.find]
where = ["."]
include = ["delphi_utils"]
namespaces = true

[tool.setuptools.package-data]
"delphi_utils.data" = ["20*/*.csv"]



48 changes: 0 additions & 48 deletions _delphi_utils_python/setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion changehc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install '../_delphi_utils_python[dev]' ;\
pip install .

lint:
Expand Down
2 changes: 1 addition & 1 deletion claims_hosp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install '../_delphi_utils_python[dev]' ;\
pip install .

lint:
Expand Down
2 changes: 1 addition & 1 deletion doctor_visits/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install '../_delphi_utils_python[dev]' ;\
pip install .

lint:
Expand Down
2 changes: 1 addition & 1 deletion google_symptoms/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install '../_delphi_utils_python[dev]' ;\
pip install .

lint:
Expand Down
2 changes: 1 addition & 1 deletion hhs_hosp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install '../_delphi_utils_python[dev]' ;\
pip install .

lint:
Expand Down
2 changes: 1 addition & 1 deletion nchs_mortality/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install '../_delphi_utils_python[dev]' ;\
pip install .

lint:
Expand Down
2 changes: 2 additions & 0 deletions nchs_mortality/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
from setuptools import find_packages

required = [
"boto3",
"darker[isort]~=2.1.1",
"delphi-utils",
"epiweeks",
"freezegun",
"moto~=4.2.14",
"numpy",
"pandas",
"pydocstyle",
Expand Down
2 changes: 1 addition & 1 deletion nssp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install '../_delphi_utils_python[dev]' ;\
pip install .

lint:
Expand Down
2 changes: 1 addition & 1 deletion nwss_wastewater/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install '../_delphi_utils_python[dev]' ;\
pip install .

lint:
Expand Down
2 changes: 1 addition & 1 deletion quidel_covidtest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install '../_delphi_utils_python[dev]' ;\
pip install .

lint:
Expand Down
1 change: 1 addition & 0 deletions quidel_covidtest/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from setuptools import find_packages

required = [
"boto3",
"covidcast",
"darker[isort]~=2.1.1",
"delphi-utils",
Expand Down
2 changes: 1 addition & 1 deletion sir_complainsalot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: venv
install-ci: venv
. env/bin/activate; \
pip install wheel ; \
pip install ../_delphi_utils_python ;\
pip install '../_delphi_utils_python[dev]' ;\
pip install .

lint:
Expand Down
Loading