diff --git a/.gitignore b/.gitignore index baab3e6d..b37e34f7 100644 --- a/.gitignore +++ b/.gitignore @@ -149,6 +149,7 @@ pytest.ini # data directories data/* therapy/data/ +src/therapy/data/* # dynamodb dynamodb_local_latest/* diff --git a/pyproject.toml b/pyproject.toml index a291b1ec..1d96166e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,74 @@ +[project] +name = "therapy-normalizer" +authors = [ + {name = "Alex Wagner"}, + {name = "Kori Kuzma"}, + {name = "James Stevenson"} +] +readme = "README.md" +classifiers = [ + "Development Status :: 3 - Alpha", + "Framework :: FastAPI", + "Framework :: Pydantic", + "Framework :: Pydantic :: 2", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "Topic :: Scientific/Engineering :: Bio-Informatics", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] +requires-python = ">=3.8" +description = "VICC normalization routines for therapeutics" +license = {file = "LICENSE"} +dependencies = [ + "pydantic==2.*", + "fastapi", + "uvicorn", + "click", + "boto3", + "ga4gh.vrs~=2.0.0a1", +] +dynamic = ["version"] + +[project.optional-dependencies] +etl = ["disease-normalizer~=0.4.0.dev0", "owlready2", "rdflib", "wikibaseintegrator>=0.12.0", "chembl-downloader", "bioversions>=0.4.3"] +test = ["pytest", "pytest-cov"] +dev = ["pre-commit", "ruff>=0.1.2", "lxml", "xmlformatter", "mypy", "types-requests", "types-pyyaml"] + +[project.urls] +Homepage = "https://github.com/cancervariants/therapy-normalization" +Documentation = "https://github.com/cancervariants/therapy-normalization" +Changelog = "https://github.com/cancervariants/therapy-normalization/releases" +Source = "https://github.com/cancervariants/therapy-normalization" +"Bug Tracker" = "https://github.com/cancervariants/therapy-normalization/issues" + [build-system] -requires = ["setuptools", "wheel"] -build-backend = "setuptools.build_meta:__legacy__" +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[tool.setuptools.dynamic] +version = {attr = "therapy.version.__version__"} + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.pytest.ini_options] +addopts = "--cov=src --cov-report term-missing" +testpaths = ["tests"] + +[tool.coverage.run] +branch = true + +[tool.mypy] +plugins = "pydantic.mypy" +ignore_missing_imports = true [tool.ruff] +src = ["src"] # pycodestyle (E, W) # Pyflakes (F) # flake8-annotations (ANN) diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 9e40d85a..00000000 --- a/setup.cfg +++ /dev/null @@ -1,65 +0,0 @@ -[metadata] -name = thera-py -description = VICC normalization routine for therapies -long_description = file:README.md -long_description_content_type = text/markdown -url = https://github.com/cancervariants/therapy-normalization -author = VICC -author_email = help@cancervariants.org -license = MIT - -[options] -packages = find: -python_requires = >=3.8 -zip_safe = False -include_package_data = True - -install_requires = - pydantic ==2.* - fastapi >= 0.92.0 - click - uvicorn - boto3 - ga4gh.vrs ~= 2.0.0a1 - -[options.package_data] -therapy = - etl/* - -[options.extras_require] -test = - pytest - pytest-cov - -dev = - disease-normalizer ~= 0.4.0.dev0 - owlready2 - rdflib - wikibaseintegrator >= 0.12.0 - chembl-downloader - bioversions >= 0.4.3 - ipykernel - ipython >= 8.10 - pre-commit - tox - mypy - types-requests - types-pyyaml - lxml - xmlformatter - ruff >= 0.1.2 - -[tool:pytest] -addopts = --ignore setup.py --ignore=analysis/ --cov-report term-missing --cov=therapy - -[mypy] -plugins = pydantic.mypy -ignore_missing_imports = True - -[coverage:run] -source = - therapy/ - tests/ -omit = - setup.py - docs/* diff --git a/setup.py b/setup.py deleted file mode 100644 index 03d3083e..00000000 --- a/setup.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Defines how metakb is packaged and distributed.""" -from setuptools import setup - -exec(open("therapy/version.py").read()) -setup(version=__version__) # noqa: F821 diff --git a/therapy/__init__.py b/src/therapy/__init__.py similarity index 100% rename from therapy/__init__.py rename to src/therapy/__init__.py diff --git a/therapy/cli.py b/src/therapy/cli.py similarity index 100% rename from therapy/cli.py rename to src/therapy/cli.py diff --git a/therapy/database.py b/src/therapy/database.py similarity index 100% rename from therapy/database.py rename to src/therapy/database.py diff --git a/therapy/etl/__init__.py b/src/therapy/etl/__init__.py similarity index 100% rename from therapy/etl/__init__.py rename to src/therapy/etl/__init__.py diff --git a/therapy/etl/base.py b/src/therapy/etl/base.py similarity index 100% rename from therapy/etl/base.py rename to src/therapy/etl/base.py diff --git a/therapy/etl/chembl.py b/src/therapy/etl/chembl.py similarity index 100% rename from therapy/etl/chembl.py rename to src/therapy/etl/chembl.py diff --git a/therapy/etl/chemidplus.py b/src/therapy/etl/chemidplus.py similarity index 100% rename from therapy/etl/chemidplus.py rename to src/therapy/etl/chemidplus.py diff --git a/therapy/etl/drugbank.py b/src/therapy/etl/drugbank.py similarity index 100% rename from therapy/etl/drugbank.py rename to src/therapy/etl/drugbank.py diff --git a/therapy/etl/drugsatfda.py b/src/therapy/etl/drugsatfda.py similarity index 100% rename from therapy/etl/drugsatfda.py rename to src/therapy/etl/drugsatfda.py diff --git a/therapy/etl/guidetopharmacology.py b/src/therapy/etl/guidetopharmacology.py similarity index 100% rename from therapy/etl/guidetopharmacology.py rename to src/therapy/etl/guidetopharmacology.py diff --git a/therapy/etl/hemonc.py b/src/therapy/etl/hemonc.py similarity index 100% rename from therapy/etl/hemonc.py rename to src/therapy/etl/hemonc.py diff --git a/therapy/etl/merge.py b/src/therapy/etl/merge.py similarity index 100% rename from therapy/etl/merge.py rename to src/therapy/etl/merge.py diff --git a/therapy/etl/ncit.py b/src/therapy/etl/ncit.py similarity index 100% rename from therapy/etl/ncit.py rename to src/therapy/etl/ncit.py diff --git a/therapy/etl/rules.csv b/src/therapy/etl/rules.csv similarity index 100% rename from therapy/etl/rules.csv rename to src/therapy/etl/rules.csv diff --git a/therapy/etl/rules.py b/src/therapy/etl/rules.py similarity index 100% rename from therapy/etl/rules.py rename to src/therapy/etl/rules.py diff --git a/therapy/etl/rxnorm.py b/src/therapy/etl/rxnorm.py similarity index 100% rename from therapy/etl/rxnorm.py rename to src/therapy/etl/rxnorm.py diff --git a/therapy/etl/wikidata.py b/src/therapy/etl/wikidata.py similarity index 100% rename from therapy/etl/wikidata.py rename to src/therapy/etl/wikidata.py diff --git a/therapy/main.py b/src/therapy/main.py similarity index 100% rename from therapy/main.py rename to src/therapy/main.py diff --git a/therapy/query.py b/src/therapy/query.py similarity index 100% rename from therapy/query.py rename to src/therapy/query.py diff --git a/therapy/schemas.py b/src/therapy/schemas.py similarity index 100% rename from therapy/schemas.py rename to src/therapy/schemas.py diff --git a/therapy/version.py b/src/therapy/version.py similarity index 100% rename from therapy/version.py rename to src/therapy/version.py