Skip to content

Commit

Permalink
Transition from setup.py & friends to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
q2d2 committed Dec 18, 2024
1 parent b8daf2d commit af0f18f
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 2,446 deletions.
12 changes: 12 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: dfb0404
_src_path: https://github.com/qiime2/q2-setup-template.git
module_name: quality_control
plugin_name: q2_quality_control
plugin_scripts: q2_quality_control/decontam_assets/run_decontam.R
project_author_email: [email protected], [email protected]
project_author_name: Nicholas Bokulich and Jorden Rabasco
project_description: Quality control methods for feature and sequence data.
project_name: q2-quality-control
project_urls_homepage: https://github.com/qiime2/q2-quality-control
project_urls_repository: https://github.com/qiime2/q2-quality-control
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
q2_quality_control/_version.py export-subst
pyproject.toml export-subst
3 changes: 2 additions & 1 deletion .github/workflows/ci-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ jobs:
ci:
uses: qiime2/distributions/.github/workflows/lib-ci-dev.yaml@dev
with:
distro: amplicon
distro: amplicon
recipe-path: 'conda-recipe'
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test-cov: all
py.test --cov=q2_quality_control

install: all
$(PYTHON) setup.py install
$(PYTHON) -m pip install -v .

dev: all
pip install -e .
Expand Down
55 changes: 0 additions & 55 deletions ci/recipe/meta.yaml

This file was deleted.

49 changes: 49 additions & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package:
name: q2-quality-control
version: {{ PLUGIN_VERSION }}
source:
path: ..
build:
script: make install
requirements:
host:
- python {{ python }}
- setuptools
- versioningit
- wheel
run:
- python {{ python }}
- pandas {{ pandas }}
- seaborn
- blast >=2.6.0
- bioconductor-decontam
- r-base {{ r_base }}
- r-optparse >=1.7.1
- vsearch
- samtools >=1.15
- bowtie2
- qiime2 {{ qiime2_epoch }}.*
- q2-types {{ qiime2_epoch }}.*
- q2templates {{ qiime2_epoch }}.*
- q2-taxa {{ qiime2_epoch }}.*
- q2-feature-table {{ qiime2_epoch }}.*
- biom-format {{ biom_format }}
build:
- setuptools
- versioningit
test:
commands:
- py.test --pyargs q2_quality_control
requires:
- qiime2 >={{ qiime2 }}
- q2-types >={{ q2_types }}
- q2templates >={{ q2templates }}
- q2-taxa >={{ q2_taxa }}
- pytest
imports:
- q2_quality_control
- qiime2.plugins.quality_control
about:
home: https://qiime2.org
license: BSD-3-Clause
license_family: BSD
53 changes: 53 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[project]
name = "q2-quality-control"
authors = [
{ name = "Nicholas Bokulich and Jorden Rabasco", email = "[email protected], [email protected]" }
]
description = "Quality control methods for feature and sequence data."
readme = {file = "README.md", content-type = "text/markdown"}
license = {file = "LICENSE"}
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/qiime2/q2-quality-control"
Repository = "https://github.com/qiime2/q2-quality-control"

[project.entry-points.'qiime2.plugins']
"q2-quality-control" = "q2_quality_control.plugin_setup:plugin"

[build-system]
requires = [
"setuptools",
"versioningit",
"wheel"
]
build-backend = "setuptools.build_meta"

[tool.versioningit.vcs]
method = "git-archive"
describe-subst = "$Format:%(describe)$"
default-tag = "0.0.1"

[tool.versioningit.next-version]
method = "minor"

[tool.versioningit.format]
distance = "{base_version}+{distance}.{vcs}{rev}"
dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"

[tool.versioningit.write]
file = "q2-quality-control/_version.py"

[tool.setuptools]
include-package-data = true
script-files = [
"q2_quality_control/decontam_assets/run_decontam.R"
]

[tool.setuptools.packages.find]
where = ["."]
include = ["q2_quality_control*"]

[tool.setuptools.package-data]
q2_quality_control = ["**/*"]
7 changes: 4 additions & 3 deletions q2_quality_control/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------

from ._version import get_versions


__version__ = get_versions()['version']
del get_versions
try:
from ._version import __version__
except ModuleNotFoundError:
__version__ = '0.0.0+notfound'
Loading

0 comments on commit af0f18f

Please sign in to comment.