Skip to content

Commit 3d22089

Browse files
authored
Add versioneer to pytask. (#65)
1 parent d3666fa commit 3d22089

File tree

14 files changed

+2508
-41
lines changed

14 files changed

+2508
-41
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/pytask/_version.py export-subst
2+
src/_pytask/_version.py export-subst

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ repos:
7373
rev: v2.0.0
7474
hooks:
7575
- id: codespell
76-
args: [-L hist]
76+
args: [-L hist,-L unparseable]
7777
- repo: meta
7878
hooks:
7979
- id: check-hooks-apply

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include versioneer.py
2+
include src/_pytask/_version.py

docs/changes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask>
1212
- :gh:`55` implements miscellaneous fixes to improve error message, tests and coverage.
1313
- :gh:`59` adds a tutorial on using plugins and features plugins more prominently.
1414
- :gh:`60` adds the MIT license to the project and mentions pytest and its developers.
15+
- :gh:`65` adds versioneer to pytask.
1516

1617

1718
0.0.11 - 2020-12-27

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import os
99
import sys
1010

11+
import pytask
1112
import sphinx
1213

1314

@@ -21,7 +22,8 @@
2122
author = "Tobias Raabe"
2223

2324
# The full version, including alpha/beta/rc tags
24-
release = "0.0.11"
25+
version = pytask.__version__
26+
release = version
2527

2628

2729
# -- General configuration -------------------------------------------------------------

docs/rtd_environment.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
channels:
22
- conda-forge
3+
34
dependencies:
45
- python=3.8
6+
- pip
57
- furo
68
- ipython
79
- sphinx
@@ -19,3 +21,6 @@ dependencies:
1921
- pexpect
2022
- pluggy
2123
- pony >= 0.7.13
24+
25+
- pip:
26+
- -e ../

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ dependencies:
2222

2323
# Misc
2424
- black
25-
- bump2version
2625
- jupyterlab
2726
- matplotlib
2827
- pdbpp
2928
- pre-commit
3029
- pydot
3130
- pytest-cov
3231
- tox-conda
32+
- versioneer
3333
- virtualenv=20.0.33
3434

3535
# Documentation

setup.cfg

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
[bumpversion]
2-
current_version = 0.0.11
3-
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))(\-?((dev)?(?P<dev>\d+))?)
4-
serialize =
5-
{major}.{minor}.{patch}dev{dev}
6-
{major}.{minor}.{patch}
7-
8-
[bumpversion:file:setup.py]
9-
10-
[bumpversion:file:docs/conf.py]
11-
12-
[bumpversion:file:src/pytask/__init__.py]
13-
14-
[bumpversion:file:src/_pytask/__init__.py]
1+
# See the docstring in versioneer.py for instructions. Note that you must re-run
2+
# 'versioneer.py setup' after changing this section, and commit the resulting files.
3+
4+
[versioneer]
5+
VCS = git
6+
style = pep440
7+
versionfile_source = src/_pytask/_version.py
8+
versionfile_build = _pytask/_version.py
9+
tag_prefix = v
10+
parentdir_prefix = pytask-

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
from setuptools import find_packages
55
from setuptools import setup
66

7+
import versioneer
8+
79

810
DESCRIPTION = "In its highest aspirations, pytask tries to be pytest as a build system."
911
README = Path("README.rst").read_text()
@@ -15,7 +17,8 @@
1517

1618
setup(
1719
name="pytask",
18-
version="0.0.11",
20+
version=versioneer.get_version(),
21+
cmdclass=versioneer.get_cmdclass(),
1922
description=DESCRIPTION,
2023
long_description=DESCRIPTION + "\n\n" + README,
2124
long_description_content_type="text/x-rst",

src/_pytask/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
__version__ = "0.0.11"
1+
from ._version import get_versions
2+
3+
__version__ = get_versions()["version"]
4+
del get_versions

0 commit comments

Comments
 (0)