diff --git a/pyproject.toml b/pyproject.toml index 471f3c9..d6f9675 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,8 @@ +# See https://setuptools.readthedocs.io/en/latest/build_meta.html +[build-system] +requires = ["setuptools", "wheel", "torch"] +build-backend = "setuptools.build_meta:__legacy__" + [tool.black] line-length = 120 target-version = ["py37", "py38", "py39"] @@ -6,4 +11,4 @@ target-version = ["py37", "py38", "py39"] profile = "black" multi_line_output = 3 include_trailing_comma = true -reverse_relative = true \ No newline at end of file +reverse_relative = true diff --git a/readthedocs.yaml b/readthedocs.yaml index 569cf45..afbfaf9 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -13,9 +13,8 @@ formats: python: version: "3.7" - system_packages: "True" install: - requirements: docs/requirements_1.txt - - method: setuptools + - method: pip path: . system_packages: true diff --git a/setup.cfg b/setup.cfg index 95b61ac..358bd50 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,5 +2,88 @@ # Setup.py Configuration # ########################## [metadata] +name = chemicalx +version = 0.0.8 +description = A Deep Learning Library for Drug Pair Scoring long_description = file: README.md long_description_content_type = text/markdown + +# Links +url = https://github.com/AstraZeneca/chemicalx +download_url = https://github.com/AstraZeneca/chemicalx/archive/v0.0.8.tar.gz +project_urls = + Bug Tracker = https://github.com/AstraZeneca/chemicalx/issues + + +# Author information +author = Benedek Rozemberczki and Charles Tapley Hoyt +author_email = benedek.rozemberczki@gmail.com +maintainer = Benedek Rozemberczki +maintainer_email = benedek.rozemberczki@gmail.com + +# License information +license = Apache-2.0 +license_file = LICENSE + +# Search tags +classifiers = + Development Status :: 3 - Alpha + Intended Audience :: Developers + Topic :: Software Development :: Build Tools + License :: OSI Approved :: Apache Software License + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 +keywords = + drug + deep-learning + deep-chemistry + deep-ai + torch-drug + synergy-prediction + synergy + drug-combination + deep-synergy + drug-interaction + chemistry + pharma + +[options] +install_requires = + numpy + torch>=1.10.0 + torchdrug + torch-scatter>=2.0.8 + pandas<=1.3.5 + tqdm + scikit-learn + class-resolver>=0.2.1 + tabulate + pystow + pytdc + +zip_safe = false +include_package_data = True +python_requires = >=3.7 + +# Where is my code +packages = find: +package_dir = + = src + +[options.packages.find] +where = src + +[options.extras_require] +tests = + pytest + pytest-cov + coverage +docs = + sphinx + sphinx-rtd-theme + sphinx-click + sphinx-autodoc-typehints + sphinx_automodapi + nbsphinx_link + jupyter-sphinx diff --git a/setup.py b/setup.py deleted file mode 100644 index b89f5ad..0000000 --- a/setup.py +++ /dev/null @@ -1,77 +0,0 @@ -"""Setup the package.""" - -from setuptools import find_packages, setup - -install_requires = [ - "numpy", - "torch>=1.10.0", - "torchdrug", - "torch-scatter>=2.0.8", - "pandas<=1.3.5", - "tqdm", - "scikit-learn", - "class-resolver>=0.2.1", - "tabulate", - "pystow", - "pytdc", -] - - -setup_requires = ["pytest-runner"] - -tests_require = ["pytest", "pytest-cov"] - -extras_require = { - "tests": tests_require, - "docs": [ - "sphinx", - "sphinx-rtd-theme", - "sphinx-click", - "sphinx-autodoc-typehints", - "sphinx_automodapi", - "nbsphinx_link", - "jupyter-sphinx", - ], -} - -keywords = [ - "drug", - "deep-learning", - "deep-chemistry", - "deep-ai", - "torch-drug", - "synergy-prediction", - "synergy", - "drug-combination", - "deep-synergy", - "drug-interaction", - "chemistry", - "pharma", -] - - -setup( - name="chemicalx", - packages=find_packages(), - version="0.0.8", - license="Apache License, Version 2.0", - description="A Deep Learning Library for Drug Pair Scoring.", - author="Benedek Rozemberczki and Charles Hoyt", - author_email="benedek.rozemberczki@gmail.com", - url="https://github.com/AstraZeneca/chemicalx", - download_url="https://github.com/AstraZeneca/chemicalx/archive/v0.0.8.tar.gz", - keywords=keywords, - install_requires=install_requires, - setup_requires=setup_requires, - tests_require=tests_require, - extras_require=extras_require, - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Topic :: Software Development :: Build Tools", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - ], -) diff --git a/chemicalx/__init__.py b/src/chemicalx/__init__.py similarity index 100% rename from chemicalx/__init__.py rename to src/chemicalx/__init__.py diff --git a/chemicalx/constants.py b/src/chemicalx/constants.py similarity index 100% rename from chemicalx/constants.py rename to src/chemicalx/constants.py diff --git a/chemicalx/data/__init__.py b/src/chemicalx/data/__init__.py similarity index 100% rename from chemicalx/data/__init__.py rename to src/chemicalx/data/__init__.py diff --git a/chemicalx/data/batchgenerator.py b/src/chemicalx/data/batchgenerator.py similarity index 100% rename from chemicalx/data/batchgenerator.py rename to src/chemicalx/data/batchgenerator.py diff --git a/chemicalx/data/contextfeatureset.py b/src/chemicalx/data/contextfeatureset.py similarity index 100% rename from chemicalx/data/contextfeatureset.py rename to src/chemicalx/data/contextfeatureset.py diff --git a/chemicalx/data/datasetloader.py b/src/chemicalx/data/datasetloader.py similarity index 100% rename from chemicalx/data/datasetloader.py rename to src/chemicalx/data/datasetloader.py diff --git a/chemicalx/data/drugfeatureset.py b/src/chemicalx/data/drugfeatureset.py similarity index 100% rename from chemicalx/data/drugfeatureset.py rename to src/chemicalx/data/drugfeatureset.py diff --git a/chemicalx/data/drugpairbatch.py b/src/chemicalx/data/drugpairbatch.py similarity index 100% rename from chemicalx/data/drugpairbatch.py rename to src/chemicalx/data/drugpairbatch.py diff --git a/chemicalx/data/labeledtriples.py b/src/chemicalx/data/labeledtriples.py similarity index 100% rename from chemicalx/data/labeledtriples.py rename to src/chemicalx/data/labeledtriples.py diff --git a/chemicalx/data/utils.py b/src/chemicalx/data/utils.py similarity index 100% rename from chemicalx/data/utils.py rename to src/chemicalx/data/utils.py diff --git a/chemicalx/models/__init__.py b/src/chemicalx/models/__init__.py similarity index 100% rename from chemicalx/models/__init__.py rename to src/chemicalx/models/__init__.py diff --git a/chemicalx/models/base.py b/src/chemicalx/models/base.py similarity index 100% rename from chemicalx/models/base.py rename to src/chemicalx/models/base.py diff --git a/chemicalx/models/caster.py b/src/chemicalx/models/caster.py similarity index 100% rename from chemicalx/models/caster.py rename to src/chemicalx/models/caster.py diff --git a/chemicalx/models/deepddi.py b/src/chemicalx/models/deepddi.py similarity index 100% rename from chemicalx/models/deepddi.py rename to src/chemicalx/models/deepddi.py diff --git a/chemicalx/models/deepdds.py b/src/chemicalx/models/deepdds.py similarity index 100% rename from chemicalx/models/deepdds.py rename to src/chemicalx/models/deepdds.py diff --git a/chemicalx/models/deepdrug.py b/src/chemicalx/models/deepdrug.py similarity index 100% rename from chemicalx/models/deepdrug.py rename to src/chemicalx/models/deepdrug.py diff --git a/chemicalx/models/deepsynergy.py b/src/chemicalx/models/deepsynergy.py similarity index 100% rename from chemicalx/models/deepsynergy.py rename to src/chemicalx/models/deepsynergy.py diff --git a/chemicalx/models/epgcnds.py b/src/chemicalx/models/epgcnds.py similarity index 100% rename from chemicalx/models/epgcnds.py rename to src/chemicalx/models/epgcnds.py diff --git a/chemicalx/models/gcnbmp.py b/src/chemicalx/models/gcnbmp.py similarity index 100% rename from chemicalx/models/gcnbmp.py rename to src/chemicalx/models/gcnbmp.py diff --git a/chemicalx/models/matchmaker.py b/src/chemicalx/models/matchmaker.py similarity index 100% rename from chemicalx/models/matchmaker.py rename to src/chemicalx/models/matchmaker.py diff --git a/chemicalx/models/mhcaddi.py b/src/chemicalx/models/mhcaddi.py similarity index 100% rename from chemicalx/models/mhcaddi.py rename to src/chemicalx/models/mhcaddi.py diff --git a/chemicalx/models/mrgnn.py b/src/chemicalx/models/mrgnn.py similarity index 100% rename from chemicalx/models/mrgnn.py rename to src/chemicalx/models/mrgnn.py diff --git a/chemicalx/models/ssiddi.py b/src/chemicalx/models/ssiddi.py similarity index 100% rename from chemicalx/models/ssiddi.py rename to src/chemicalx/models/ssiddi.py diff --git a/chemicalx/pipeline.py b/src/chemicalx/pipeline.py similarity index 100% rename from chemicalx/pipeline.py rename to src/chemicalx/pipeline.py diff --git a/chemicalx/version.py b/src/chemicalx/version.py similarity index 100% rename from chemicalx/version.py rename to src/chemicalx/version.py diff --git a/tox.ini b/tox.ini index a45dc17..2f3628b 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ # and then run "tox" from this directory. [tox] +isolated_build = true envlist = lint flake8 @@ -16,10 +17,8 @@ envlist = [testenv] commands = coverage run -m pytest -deps = - torch - pytest - coverage +extras = + tests [testenv:coverage] commands = @@ -99,7 +98,7 @@ skip_install = true deps = docstr-coverage commands = - docstr-coverage chemicalx/ examples/ tests/ data_cleaning/ --skip-private --skip-magic + docstr-coverage src/chemicalx examples/ tests/ data_cleaning/ --skip-private --skip-magic description = Run the docstr-coverage tool to check documentation coverage [testenv:pyroma]