From 619458796fdf6014a7115f850e55da204bd778eb Mon Sep 17 00:00:00 2001 From: ChocoParrot Date: Mon, 13 Sep 2021 09:28:25 +0800 Subject: [PATCH] [refactor] file structure --- pyproject.toml | 6 ++++++ setup.py | 6 ++++-- {orffinder => src/orffinder}/__init__.py | 0 {orffinder => src/orffinder}/orffinder.py | 0 {orffinder/tests => tests}/__init__.py | 0 {orffinder/tests => tests}/gene.fasta | 0 orffinder/tests/test.py => tests/test_orffinder.py | 1 + 7 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml rename {orffinder => src/orffinder}/__init__.py (100%) rename {orffinder => src/orffinder}/orffinder.py (100%) rename {orffinder/tests => tests}/__init__.py (100%) rename {orffinder/tests => tests}/gene.fasta (100%) rename orffinder/tests/test.py => tests/test_orffinder.py (95%) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..374b58c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools>=42", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 0192bbf..f5bbd23 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setuptools.setup( name="orffinder", - version="1.1", + version="1.2", author="ChocoParrot", author_email="lachocoparrot@gmail.com", description="ORFFinder API.", @@ -17,10 +17,12 @@ project_urls={ "Bug Tracker": "https://github.com/Chokyotager/ORFFinder/issues", }, - packages=setuptools.find_packages("src/"), classifiers=( "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ), + package_dir={"": "src"}, + packages=setuptools.find_packages(where="src"), + python_requires=">=3.6" ) diff --git a/orffinder/__init__.py b/src/orffinder/__init__.py similarity index 100% rename from orffinder/__init__.py rename to src/orffinder/__init__.py diff --git a/orffinder/orffinder.py b/src/orffinder/orffinder.py similarity index 100% rename from orffinder/orffinder.py rename to src/orffinder/orffinder.py diff --git a/orffinder/tests/__init__.py b/tests/__init__.py similarity index 100% rename from orffinder/tests/__init__.py rename to tests/__init__.py diff --git a/orffinder/tests/gene.fasta b/tests/gene.fasta similarity index 100% rename from orffinder/tests/gene.fasta rename to tests/gene.fasta diff --git a/orffinder/tests/test.py b/tests/test_orffinder.py similarity index 95% rename from orffinder/tests/test.py rename to tests/test_orffinder.py index 5229dd8..4afcc21 100644 --- a/orffinder/tests/test.py +++ b/tests/test_orffinder.py @@ -1,6 +1,7 @@ from Bio import SeqIO from Bio.Seq import Seq +from unittest import TestCase import orffinder sequence = list(SeqIO.parse("tests/gene.fasta", "fasta"))[0]