Skip to content

Commit

Permalink
MAINT: migrate from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
lizgehret authored Dec 11, 2024
2 parents 12602ac + efb9e22 commit 04d54f1
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 3,020 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
q2_vizard._version.py export-subst
pyproject.toml export-subst
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 @@ -13,7 +13,7 @@ test-cov: all
py.test --cov=q2_vizard

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

dev: all
pip install -e .
Expand Down
9 changes: 4 additions & 5 deletions ci/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ source:
path: ../..

build:
script-env:
- PLUGIN_VERSION
script: make install

requirements:
Expand All @@ -16,14 +14,15 @@ requirements:
# in order to render out transpiled js assets for various visualizations.
# once rendered, node is no longer necessary. don't set this in host reqs.
- nodejs
- setuptools
- versioningit

host:
- python {{ python }}
- pip
- setuptools
# now that we're not vendoring versioneer, we need to add it into the host
# reqs in order for it to get added to the conda env for build pkg step
- versioneer
- versioningit
- wheel

run:
- python {{ python }}
Expand Down
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[project]
name = 'q2-vizard'
authors = [
{name = 'Liz Gehret', email = '[email protected]'}
]
description = 'QIIME 2 Plugin used for generalized microbiome visualizations.'
readme = 'README.md'
license = {file = 'LICENSE'}
dynamic = ['version']

[project.urls]
Homepage = 'https://qiime2.org'
Documentation = 'https://docs.qiime2.org'
Repository = 'https://github.com/qiime2/q2-vizard'

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

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

from ._version import get_versions

from q2_vizard.scatterplot import scatterplot_2d
from q2_vizard.heatmap import heatmap
from q2_vizard.lineplot import lineplot
from q2_vizard.boxplot import boxplot

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

__all__ = ['heatmap', 'scatterplot_2d', 'lineplot', 'boxplot']
Loading

0 comments on commit 04d54f1

Please sign in to comment.