From 526c14296feb1cf585ab8755e811a513b9fb9ec5 Mon Sep 17 00:00:00 2001 From: aysim319 Date: Wed, 24 Jul 2024 15:28:36 -0400 Subject: [PATCH] Revert "Clean up delphi_utils " --- .github/workflows/python-ci.yml | 2 +- _delphi_utils_python/.bumpversion.cfg | 2 +- _delphi_utils_python/DEVELOP.md | 2 +- _delphi_utils_python/Makefile | 9 ++-- _delphi_utils_python/pyproject.toml | 60 --------------------------- _delphi_utils_python/setup.py | 48 +++++++++++++++++++++ changehc/Makefile | 2 +- claims_hosp/Makefile | 2 +- doctor_visits/Makefile | 2 +- google_symptoms/Makefile | 2 +- hhs_hosp/Makefile | 2 +- nchs_mortality/Makefile | 2 +- nchs_mortality/setup.py | 2 - nssp/Makefile | 2 +- nwss_wastewater/Makefile | 2 +- quidel_covidtest/Makefile | 2 +- quidel_covidtest/setup.py | 1 - sir_complainsalot/Makefile | 2 +- 18 files changed, 65 insertions(+), 81 deletions(-) delete mode 100644 _delphi_utils_python/pyproject.toml create mode 100644 _delphi_utils_python/setup.py diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 6e23c61d2..3e1ee9689 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -51,7 +51,7 @@ jobs: with: python-version: 3.8 cache: "pip" - cache-dependency-path: "pyproject.toml" + cache-dependency-path: "setup.py" - name: Install testing dependencies run: | python -m pip install --upgrade pip diff --git a/_delphi_utils_python/.bumpversion.cfg b/_delphi_utils_python/.bumpversion.cfg index af22c56eb..722a91e30 100644 --- a/_delphi_utils_python/.bumpversion.cfg +++ b/_delphi_utils_python/.bumpversion.cfg @@ -4,6 +4,6 @@ commit = True message = chore: bump delphi_utils to {new_version} tag = False -[bumpversion:file:pyproject.toml] +[bumpversion:file:setup.py] [bumpversion:file:delphi_utils/__init__.py] diff --git a/_delphi_utils_python/DEVELOP.md b/_delphi_utils_python/DEVELOP.md index 53ffde93f..2407e29a8 100644 --- a/_delphi_utils_python/DEVELOP.md +++ b/_delphi_utils_python/DEVELOP.md @@ -9,7 +9,7 @@ To install the module in your default version of Python, run the following from this directory: ``` -pip install -e '.[dev]' +pip install . ``` As described in each of the indicator code directories, you will want to install diff --git a/_delphi_utils_python/Makefile b/_delphi_utils_python/Makefile index 4249528d9..79d7f7943 100644 --- a/_delphi_utils_python/Makefile +++ b/_delphi_utils_python/Makefile @@ -6,12 +6,12 @@ venv: install: venv . env/bin/activate; \ pip install wheel ; \ - pip install -e '.[dev]' + pip install -e . install-ci: venv . env/bin/activate; \ - pip install 'build[virtualenv]' pylint pytest pydocstyle wheel twine ; \ - pip install '.[dev]' + pip install wheel ; \ + pip install . lint: . env/bin/activate; pylint delphi_utils --rcfile=../pyproject.toml @@ -30,5 +30,4 @@ clean: release: lint test . env/bin/activate ; \ - pip install 'build[virtualenv]' ; \ - python -m build --sdist --wheel \ No newline at end of file + python setup.py sdist bdist_wheel diff --git a/_delphi_utils_python/pyproject.toml b/_delphi_utils_python/pyproject.toml deleted file mode 100644 index 6ca3d98b7..000000000 --- a/_delphi_utils_python/pyproject.toml +++ /dev/null @@ -1,60 +0,0 @@ -[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"] - - - diff --git a/_delphi_utils_python/setup.py b/_delphi_utils_python/setup.py new file mode 100644 index 000000000..3dee89b53 --- /dev/null +++ b/_delphi_utils_python/setup.py @@ -0,0 +1,48 @@ +from setuptools import setup +from setuptools import find_packages + +with open("README.md", "r") as f: + long_description = f.read() + +required = [ + "boto3", + "covidcast", + "cvxpy", + "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 + "darker[isort]~=2.1.1", + "epiweeks", + "freezegun", + "gitpython", + "importlib_resources>=1.3", + "mock", + "moto~=4.2.14", + "numpy", + "pandas>=1.1.0", + "pydocstyle", + "pylint==2.8.3", + "pytest-cov", + "pytest", + "requests-mock", + "slackclient", + "structlog", + "xlrd" +] + +setup( + name="delphi_utils", + version="0.3.24", + description="Shared Utility Functions for Indicators", + long_description=long_description, + long_description_content_type="text/markdown", + author="", + author_email="", + url="https://github.com/cmu-delphi/", + install_requires=required, + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3.8", + ], + packages=find_packages(), + package_data={'': ['data/20*/*.csv']} +) diff --git a/changehc/Makefile b/changehc/Makefile index 1934c9864..390113eef 100644 --- a/changehc/Makefile +++ b/changehc/Makefile @@ -13,7 +13,7 @@ install: venv install-ci: venv . env/bin/activate; \ pip install wheel ; \ - pip install '../_delphi_utils_python[dev]' ;\ + pip install ../_delphi_utils_python ;\ pip install . lint: diff --git a/claims_hosp/Makefile b/claims_hosp/Makefile index 1934c9864..390113eef 100644 --- a/claims_hosp/Makefile +++ b/claims_hosp/Makefile @@ -13,7 +13,7 @@ install: venv install-ci: venv . env/bin/activate; \ pip install wheel ; \ - pip install '../_delphi_utils_python[dev]' ;\ + pip install ../_delphi_utils_python ;\ pip install . lint: diff --git a/doctor_visits/Makefile b/doctor_visits/Makefile index 1934c9864..390113eef 100644 --- a/doctor_visits/Makefile +++ b/doctor_visits/Makefile @@ -13,7 +13,7 @@ install: venv install-ci: venv . env/bin/activate; \ pip install wheel ; \ - pip install '../_delphi_utils_python[dev]' ;\ + pip install ../_delphi_utils_python ;\ pip install . lint: diff --git a/google_symptoms/Makefile b/google_symptoms/Makefile index 15c428849..6884278cf 100644 --- a/google_symptoms/Makefile +++ b/google_symptoms/Makefile @@ -13,7 +13,7 @@ install: venv install-ci: venv . env/bin/activate; \ pip install wheel ; \ - pip install '../_delphi_utils_python[dev]' ;\ + pip install ../_delphi_utils_python ;\ pip install . lint: diff --git a/hhs_hosp/Makefile b/hhs_hosp/Makefile index 5ae0527d7..69529feb7 100644 --- a/hhs_hosp/Makefile +++ b/hhs_hosp/Makefile @@ -13,7 +13,7 @@ install: venv install-ci: venv . env/bin/activate; \ pip install wheel ; \ - pip install '../_delphi_utils_python[dev]' ;\ + pip install ../_delphi_utils_python ;\ pip install . lint: diff --git a/nchs_mortality/Makefile b/nchs_mortality/Makefile index 1934c9864..390113eef 100644 --- a/nchs_mortality/Makefile +++ b/nchs_mortality/Makefile @@ -13,7 +13,7 @@ install: venv install-ci: venv . env/bin/activate; \ pip install wheel ; \ - pip install '../_delphi_utils_python[dev]' ;\ + pip install ../_delphi_utils_python ;\ pip install . lint: diff --git a/nchs_mortality/setup.py b/nchs_mortality/setup.py index 142db6f35..3fe354ba4 100644 --- a/nchs_mortality/setup.py +++ b/nchs_mortality/setup.py @@ -2,12 +2,10 @@ from setuptools import find_packages required = [ - "boto3", "darker[isort]~=2.1.1", "delphi-utils", "epiweeks", "freezegun", - "moto~=4.2.14", "numpy", "pandas", "pydocstyle", diff --git a/nssp/Makefile b/nssp/Makefile index 1934c9864..390113eef 100644 --- a/nssp/Makefile +++ b/nssp/Makefile @@ -13,7 +13,7 @@ install: venv install-ci: venv . env/bin/activate; \ pip install wheel ; \ - pip install '../_delphi_utils_python[dev]' ;\ + pip install ../_delphi_utils_python ;\ pip install . lint: diff --git a/nwss_wastewater/Makefile b/nwss_wastewater/Makefile index 1934c9864..390113eef 100644 --- a/nwss_wastewater/Makefile +++ b/nwss_wastewater/Makefile @@ -13,7 +13,7 @@ install: venv install-ci: venv . env/bin/activate; \ pip install wheel ; \ - pip install '../_delphi_utils_python[dev]' ;\ + pip install ../_delphi_utils_python ;\ pip install . lint: diff --git a/quidel_covidtest/Makefile b/quidel_covidtest/Makefile index 1934c9864..390113eef 100644 --- a/quidel_covidtest/Makefile +++ b/quidel_covidtest/Makefile @@ -13,7 +13,7 @@ install: venv install-ci: venv . env/bin/activate; \ pip install wheel ; \ - pip install '../_delphi_utils_python[dev]' ;\ + pip install ../_delphi_utils_python ;\ pip install . lint: diff --git a/quidel_covidtest/setup.py b/quidel_covidtest/setup.py index c579da79e..c2791930f 100644 --- a/quidel_covidtest/setup.py +++ b/quidel_covidtest/setup.py @@ -2,7 +2,6 @@ from setuptools import find_packages required = [ - "boto3", "covidcast", "darker[isort]~=2.1.1", "delphi-utils", diff --git a/sir_complainsalot/Makefile b/sir_complainsalot/Makefile index 1934c9864..390113eef 100644 --- a/sir_complainsalot/Makefile +++ b/sir_complainsalot/Makefile @@ -13,7 +13,7 @@ install: venv install-ci: venv . env/bin/activate; \ pip install wheel ; \ - pip install '../_delphi_utils_python[dev]' ;\ + pip install ../_delphi_utils_python ;\ pip install . lint: