diff --git a/README.md b/README.md index a8d0ed8..4a40267 100644 --- a/README.md +++ b/README.md @@ -62,9 +62,16 @@ A Graph object stores a heterogeneous network and relies on the following classe 3. Edge 4. MetaEdge -## Release instructions +## Development -This section is only relevant for project maintainers. +This repo uses pre-commit: + +```sh +# run once per local repo before committing +pre-commit install +``` + +This following is only relevant for maintainers. Create a new release at . GitHub Actions will build the distribution and upload it to PyPI. The version information inferred from the Git tag using [setuptools_scm](https://github.com/pypa/setuptools_scm/). diff --git a/setup.cfg b/setup.cfg index a7c3b22..216b3ec 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,61 @@ +[metadata] +name = hetnetpy +maintainer = Daniel Himmelstein +maintainer_email = daniel.himmelstein@gmail.com +license = CC0 1.0 +license_file = LICENSE-CC0.md +description = Hetnets in Python +long_description = file: README.md +long_description_content_type = text/markdown; charset=UTF-8 +url = https://github.com/hetio/hetnetpy +classifiers = + Intended Audience :: Science/Research + Topic :: Scientific/Engineering :: Bio-Informatics + Topic :: Scientific/Engineering :: Information Analysis + License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication + Programming Language :: Python :: 3 :: Only +keywords = + hetnet + graph + heterogeneous + network + neo4j + hetio + hetnetpy + dwpc + rephetio + +[options] +packages = find: +python_requires = >=3.6 +install_requires = + regex + +[options.extras_require] +test = + neo4j + numpy + pandas + py2neo + pytest + scipy + tqdm +stats = + pandas + matplotlib + seaborn +neo4j = + pandas + py2neo + tqdm +matrix = + numpy + scipy + +[options.packages.find] +exclude = + test + [flake8] ignore = E203 diff --git a/setup.py b/setup.py index 4d0f0e2..1abbd06 100644 --- a/setup.py +++ b/setup.py @@ -1,64 +1,4 @@ -import pathlib - import setuptools -directory = pathlib.Path(__file__).parent.absolute() - -# long_description -readme_path = directory.joinpath("README.md") -with readme_path.open() as read_file: - long_description = read_file.read() - -# Testing dependencies -tests_require = [ - "black ; python_version>='3.6'", - "neo4j", - "numpy", - "pandas", - "py2neo", - "pytest", - "scipy", - "tqdm", -] - -setuptools.setup( - # Package details - name="hetnetpy", - url="https://github.com/hetio/hetnetpy", - description="Hetnets in Python", - long_description_content_type="text/markdown", - long_description=long_description, - license="CC0 1.0", - # Author details - author="Daniel Himmelstein", - author_email="daniel.himmelstein@gmail.com", - # Package topics - keywords="hetnet graph heterogeneous network neo4j hetio hetnetpy", - classifiers=[ - "Intended Audience :: Science/Research", - "Topic :: Scientific/Engineering :: Bio-Informatics", - "Topic :: Scientific/Engineering :: Information Analysis", - "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - ], - # should find hetnetpy (and hetio if symlink supported) - packages=setuptools.find_packages(exclude=["test"]), - # Specify python version - python_requires=">=3.6", - # Run-time dependencies - install_requires=["regex"], - # Testing dependencies - tests_require=tests_require, - # Additional groups of dependencies - extras_require={ - "stats": ["pandas", "matplotlib", "seaborn"], - "neo4j": ["pandas", "py2neo", "tqdm"], - "matrix": ["numpy", "scipy"], - "test": tests_require, - }, -) +if __name__ == "__main__": + setuptools.setup()