Skip to content

Commit

Permalink
MAINT: transition from setup.py & friends to pyproject.toml (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
q2d2 authored Dec 20, 2024
1 parent 4bc2add commit 4b1ea3e
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 2,475 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: fondue
plugin_name: q2_fondue
plugin_scripts: null
project_author_email: ziemski.michal@gmail.com
project_author_name: Michal Ziemski
project_description: null
project_name: q2-fondue
project_urls_homepage: https://github.com/bokulich-lab/q2-fondue
project_urls_repository: https://github.com/bokulich-lab/q2-fondue
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
q2_fondue/_version.py export-subst
pyproject.toml export-subst
1 change: 1 addition & 0 deletions .github/workflows/ci-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
uses: qiime2/distributions/.github/workflows/lib-ci-dev.yaml@dev
with:
distro: metagenome
recipe-path: 'conda-recipe'
additional-reports-path: ./coverage.xml
additional-reports-name: coverage

Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ sratoolkit**/**
# ignore dbGAP permission keys
**.krt
**.ngc

# Version file from versioningit
_version.py

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 @@ -16,7 +16,7 @@ test-cov: all

install: all
bash install-sra-tools.sh
$(PYTHON) setup.py install
$(PYTHON) -m pip install -v .

dev: all
bash install-sra-tools.sh
Expand Down
45 changes: 0 additions & 45 deletions ci/recipe/meta.yaml

This file was deleted.

43 changes: 43 additions & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package:
name: q2-fondue
version: {{ PLUGIN_VERSION }}
source:
path: ..
build:
script: 'make VERBOSE=1
make install
'
requirements:
host:
- python {{ python }}
- setuptools
- versioningit
- wheel
run:
- entrezpy >=2.1.2
- xmltodict
- python {{ python }}
- python-dotenv
- pyzotero
- q2-types {{ qiime2_epoch }}.*
- qiime2 {{ qiime2_epoch }}.*
- tqdm >=4.62.3
build:
- setuptools
- versioningit
test:
imports:
- q2_fondue
- qiime2.plugins.fondue
requires:
- parameterized
- coverage
- pytest-cov
commands:
- pytest --cov q2_fondue --cov-report xml:coverage.xml --pyargs q2_fondue
about:
home: https://github.com/bokulich-lab/q2-fondue
license: BSD-3-Clause
license_family: BSD
50 changes: 50 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[project]
name = "q2-fondue"
authors = [
{ name = "Michal Ziemski", email = "ziemski.michal@gmail.com" }
]
description = "None"
readme = {file = "README.md", content-type = "text/markdown"}
license = {file = "LICENSE"}
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/bokulich-lab/q2-fondue"
Repository = "https://github.com/bokulich-lab/q2-fondue"

[project.entry-points.'qiime2.plugins']
"q2-fondue" = "q2_fondue.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-fondue/_version.py"

[tool.setuptools]
include-package-data = true

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

[tool.setuptools.package-data]
q2_fondue = ["**/*"]
7 changes: 4 additions & 3 deletions q2_fondue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

import importlib

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

importlib.import_module('q2_fondue.types')
Loading

0 comments on commit 4b1ea3e

Please sign in to comment.