From d99111afb77fb804e16060c20ae4cc87d4bc04de Mon Sep 17 00:00:00 2001 From: Alan Rubin Date: Mon, 18 Sep 2023 14:45:52 -0700 Subject: [PATCH] change to src layout and pyproject.toml --- .flake8 | 6 ++ pyproject.toml | 83 +++++++++++++++++++ setup.cfg | 23 ------ setup.py | 95 ---------------------- {uta => src/uta}/__init__.py | 0 {uta => src/uta}/cli.py | 0 {uta => src/uta}/etc/logging.conf | 0 {uta => src/uta}/exceptions.py | 0 {uta => src/uta}/formats/__init__.py | 0 {uta => src/uta}/formats/exonset.py | 0 {uta => src/uta}/formats/geneaccessions.py | 0 {uta => src/uta}/formats/geneinfo.py | 0 {uta => src/uta}/formats/ncbitsv.py | 0 {uta => src/uta}/formats/seqinfo.py | 0 {uta => src/uta}/formats/txinfo.py | 0 {uta => src/uta}/loading.py | 0 {uta => src/uta}/lru_cache.py | 0 {uta => src/uta}/models.py | 0 {uta => src/uta}/parsers/__init__.py | 0 {uta => src/uta}/parsers/geneinfo.py | 0 {uta => src/uta}/parsers/seqgene.py | 0 {uta => src/uta}/tools/__init__.py | 0 tests/__init__.py | 0 23 files changed, 89 insertions(+), 118 deletions(-) create mode 100644 .flake8 create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py rename {uta => src/uta}/__init__.py (100%) rename {uta => src/uta}/cli.py (100%) rename {uta => src/uta}/etc/logging.conf (100%) rename {uta => src/uta}/exceptions.py (100%) rename {uta => src/uta}/formats/__init__.py (100%) rename {uta => src/uta}/formats/exonset.py (100%) rename {uta => src/uta}/formats/geneaccessions.py (100%) rename {uta => src/uta}/formats/geneinfo.py (100%) rename {uta => src/uta}/formats/ncbitsv.py (100%) rename {uta => src/uta}/formats/seqinfo.py (100%) rename {uta => src/uta}/formats/txinfo.py (100%) rename {uta => src/uta}/loading.py (100%) rename {uta => src/uta}/lru_cache.py (100%) rename {uta => src/uta}/models.py (100%) rename {uta => src/uta}/parsers/__init__.py (100%) rename {uta => src/uta}/parsers/geneinfo.py (100%) rename {uta => src/uta}/parsers/seqgene.py (100%) rename {uta => src/uta}/tools/__init__.py (100%) create mode 100644 tests/__init__.py diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..37f6c7a --- /dev/null +++ b/.flake8 @@ -0,0 +1,6 @@ +# http://pep8.readthedocs.org/en/latest/intro.html#error-codes +[flake8] +max-line-length = 120 +exclude = tests/* +max-complexity = 10 +ignore = E129,E221,E241,E251,E303,W291 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7bfc17d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,83 @@ +[project] +name = "uta" +dynamic = ["version"] +description = "Universal Transcript Archive" +readme = "README.md" +requires-python = ">=3.5" +license = {text = "Apache-2.0"} + +keywords = [ + "bioinformatics", + "computational biology", + "genome variants", + "genome variation", + "genomic variants", + "genomic variation", + "genomics", + "hgvs", +] + +authors = [ + {name = "UTA Contributors", email = "reecehart+uta@gmail.com" } +] +maintainers = [ + {name = "UTA Contributors", email = "reecehart+uta@gmail.com" } +] + +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Intended Audience :: Healthcare Industry", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python", + "Topic :: Database :: Front-Ends", + "Topic :: Scientific/Engineering :: Bio-Informatics", + "Topic :: Scientific/Engineering :: Medical Science Apps.", +] + +dependencies = [ + "attrs", + "biocommons.seqrepo", + "biopython>=1.69", + "bioutils", + "colorlog", + "configparser", + "docopt", + "eutils>=0.3.2", + "nose", + "prettytable", + "psycopg2-binary", + "pytz", + "recordtype", + "sqlalchemy", + "uta-align", +] + +[project.optional-dependencies] +test = ["coverage", "testing.postgresql"] + +[project.urls] # Optional +"Homepage" = "https://github.com/biocommons/uta" +"Bug Reports" = "https://github.com/biocommons/uta/issues" +"Source" = "https://github.com/biocommons/uta" + +[project.scripts] +uta = "uta.cli:main" + +# This is configuration specific to the `setuptools` build backend. +# If you are using a different build backend, you will need to change this. +[tool.setuptools] +# If there are data files included in your packages that need to be +# installed, specify them here. +package-data = {"sample" = ["*.dat"]} + +[build-system] +requires = [ + "setuptools>=43.0.0", + "setuptools_scm==1.11.1", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index eb1d7b5..0000000 --- a/setup.cfg +++ /dev/null @@ -1,23 +0,0 @@ -[bdist_wheel] -universal=1 - -[nosetests] -cover-package=uta -cover-erase=1 -cover-html=1 -doctest-extension=rst -verbosity=3 -with-coverage=1 -with-doctest=1 -with-xunit=1 -doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE - -[build_sphinx] -all_files = 1 - -# http://pep8.readthedocs.org/en/latest/intro.html#error-codes -[flake8] -max-line-length = 120 -exclude = tests/* -max-complexity = 10 -ignore = E129,E221,E241,E251,E303,W291 diff --git a/setup.py b/setup.py deleted file mode 100644 index 63f7b47..0000000 --- a/setup.py +++ /dev/null @@ -1,95 +0,0 @@ -from setuptools import setup, find_packages - -with open("README.md") as f: - long_description = f.read() - -setup( - license = "Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)", - long_description = long_description, - use_scm_version = True, - zip_safe = True, - - author="UTA Contributors", - author_email="reecehart+uta@gmail.com", - description="Universal Transcript Archive", - name="uta", - packages=find_packages(), - url="https://github.com/biocommons/uta", - - classifiers = [ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Intended Audience :: Healthcare Industry", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Programming Language :: Python", - "Topic :: Database :: Front-Ends", - "Topic :: Scientific/Engineering :: Bio-Informatics", - "Topic :: Scientific/Engineering :: Medical Science Apps.", - ], - - keywords = [ - "bioinformatics", - "computational biology", - "genome variants", - "genome variation", - "genomic variants", - "genomic variation", - "genomics", - "hgvs", - ], - - entry_points = { - "console_scripts": [ - "uta = uta.cli:main", - ], - }, - - install_requires=[ - "attrs", - "biocommons.seqrepo", - "biopython>=1.69", - "bioutils", - "colorlog", - "configparser", - "docopt", - "eutils>=0.3.2", - "nose", - "prettytable", - "psycopg2-binary", - "pytz", - "recordtype", - "sqlalchemy", - "uta-align", - ], - - setup_requires = [ - "nose", - "setuptools_scm==1.11.1", - "wheel", - ], - - tests_require=[ - "coverage", - "testing.postgresql", - "wheel", # to suppress warnings from build env - ], -) - -# -# Copyright 2021 UTA Contributors (https://github.com/biocommons/uta) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# diff --git a/uta/__init__.py b/src/uta/__init__.py similarity index 100% rename from uta/__init__.py rename to src/uta/__init__.py diff --git a/uta/cli.py b/src/uta/cli.py similarity index 100% rename from uta/cli.py rename to src/uta/cli.py diff --git a/uta/etc/logging.conf b/src/uta/etc/logging.conf similarity index 100% rename from uta/etc/logging.conf rename to src/uta/etc/logging.conf diff --git a/uta/exceptions.py b/src/uta/exceptions.py similarity index 100% rename from uta/exceptions.py rename to src/uta/exceptions.py diff --git a/uta/formats/__init__.py b/src/uta/formats/__init__.py similarity index 100% rename from uta/formats/__init__.py rename to src/uta/formats/__init__.py diff --git a/uta/formats/exonset.py b/src/uta/formats/exonset.py similarity index 100% rename from uta/formats/exonset.py rename to src/uta/formats/exonset.py diff --git a/uta/formats/geneaccessions.py b/src/uta/formats/geneaccessions.py similarity index 100% rename from uta/formats/geneaccessions.py rename to src/uta/formats/geneaccessions.py diff --git a/uta/formats/geneinfo.py b/src/uta/formats/geneinfo.py similarity index 100% rename from uta/formats/geneinfo.py rename to src/uta/formats/geneinfo.py diff --git a/uta/formats/ncbitsv.py b/src/uta/formats/ncbitsv.py similarity index 100% rename from uta/formats/ncbitsv.py rename to src/uta/formats/ncbitsv.py diff --git a/uta/formats/seqinfo.py b/src/uta/formats/seqinfo.py similarity index 100% rename from uta/formats/seqinfo.py rename to src/uta/formats/seqinfo.py diff --git a/uta/formats/txinfo.py b/src/uta/formats/txinfo.py similarity index 100% rename from uta/formats/txinfo.py rename to src/uta/formats/txinfo.py diff --git a/uta/loading.py b/src/uta/loading.py similarity index 100% rename from uta/loading.py rename to src/uta/loading.py diff --git a/uta/lru_cache.py b/src/uta/lru_cache.py similarity index 100% rename from uta/lru_cache.py rename to src/uta/lru_cache.py diff --git a/uta/models.py b/src/uta/models.py similarity index 100% rename from uta/models.py rename to src/uta/models.py diff --git a/uta/parsers/__init__.py b/src/uta/parsers/__init__.py similarity index 100% rename from uta/parsers/__init__.py rename to src/uta/parsers/__init__.py diff --git a/uta/parsers/geneinfo.py b/src/uta/parsers/geneinfo.py similarity index 100% rename from uta/parsers/geneinfo.py rename to src/uta/parsers/geneinfo.py diff --git a/uta/parsers/seqgene.py b/src/uta/parsers/seqgene.py similarity index 100% rename from uta/parsers/seqgene.py rename to src/uta/parsers/seqgene.py diff --git a/uta/tools/__init__.py b/src/uta/tools/__init__.py similarity index 100% rename from uta/tools/__init__.py rename to src/uta/tools/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29