Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py -> pyproject.toml #236

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Transition from setup.py & friends to pyproject.toml
q2d2 committed Dec 19, 2024

Verified

This commit was signed with the committer’s verified signature.
hanspagel Hans Pagel
commit b0dee1d6d51657fd270df98300b42cc9f890b4be
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: sample_classifier
plugin_name: q2_sample_classifier
plugin_scripts: null
project_author_email: [email protected]
project_author_name: Nicholas Bokulich
project_description: Machine learning classification and regression tools.
project_name: q2-sample-classifier
project_urls_homepage: https://qiime2.org/
project_urls_repository: https://github.com/qiime2/q2-sample-classifier
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
q2_sample_classifier/_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
@@ -10,3 +10,4 @@ jobs:
uses: qiime2/distributions/.github/workflows/lib-ci-dev.yaml@dev
with:
distro: amplicon
recipe-path: 'conda-recipe'
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -74,3 +74,7 @@ target/


.DS_store

# 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
@@ -15,7 +15,7 @@ test-cov: all
py.test --cov=q2_sample_classifier

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

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

This file was deleted.

46 changes: 46 additions & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package:
name: q2-sample-classifier
version: {{ PLUGIN_VERSION }}
source:
path: ..
build:
script: make install
requirements:
host:
- python {{ python }}
- setuptools
- versioningit
- wheel
run:
- python {{ python }}
- pandas {{ pandas }}
- scipy {{ scipy }}
- numpy {{ numpy }}
- joblib
- scikit-learn {{ scikit_learn }}
- scikit-bio {{ scikit_bio }}
- seaborn >=0.8
- fastcluster
- qiime2 {{ qiime2_epoch }}.*
- q2-types {{ qiime2_epoch }}.*
- q2templates {{ qiime2_epoch }}.*
- q2-feature-table {{ qiime2_epoch }}.*
build:
- setuptools
- versioningit
test:
commands:
- py.test --pyargs q2_sample_classifier
requires:
- qiime2 >={{ qiime2 }}
- q2-types >={{ q2_types }}
- q2templates >={{ q2templates }}
- q2-feature-table >={{ q2_feature_table }}
- pytest
imports:
- q2_sample_classifier
- qiime2.plugins.sample_classifier
about:
home: https://qiime2.org
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-sample-classifier"
authors = [
{ name = "Nicholas Bokulich", email = "[email protected]" }
]
description = "Machine learning classification and regression tools."
readme = {file = "README.md", content-type = "text/markdown"}
license = {file = "LICENSE"}
dynamic = ["version"]

[project.urls]
Homepage = "https://qiime2.org/"
Repository = "https://github.com/qiime2/q2-sample-classifier"

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

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

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

[tool.setuptools.package-data]
q2_sample_classifier = ["**/*"]
7 changes: 4 additions & 3 deletions q2_sample_classifier/__init__.py
Original file line number Diff line number Diff line change
@@ -15,11 +15,12 @@
from ._type import (BooleanSeries, ClassifierPredictions, RegressorPredictions,
Importance, SampleEstimator, Classifier, Regressor,
Probabilities, TrueTargets)
from ._version import get_versions


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

__all__ = ['BooleanSeriesFormat', 'BooleanSeriesDirectoryFormat',
'PredictionsFormat', 'PredictionsDirectoryFormat',
520 changes: 0 additions & 520 deletions q2_sample_classifier/_version.py

This file was deleted.

8 changes: 0 additions & 8 deletions setup.cfg

This file was deleted.

33 changes: 0 additions & 33 deletions setup.py

This file was deleted.

1,823 changes: 0 additions & 1,823 deletions versioneer.py

This file was deleted.