Skip to content

Commit 2a6bfbf

Browse files
authoredJul 21, 2021
Replace versioneer with setuptools-scm. (#13)
1 parent 6b809f8 commit 2a6bfbf

12 files changed

+81
-2534
lines changed
 

‎.gitattributes

-1
This file was deleted.

‎.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ __pycache__
1313
*.egg-info
1414

1515
.pytask.sqlite3
16+
17+
build
18+
dist
19+
src/pytask_stata/_version.py

‎.pre-commit-config.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ repos:
3838
rev: v2.5.0
3939
hooks:
4040
- id: reorder-python-imports
41+
- repo: https://github.com/asottile/setup-cfg-fmt
42+
rev: v1.17.0
43+
hooks:
44+
- id: setup-cfg-fmt
4145
- repo: https://github.com/psf/black
4246
rev: 21.7b0
4347
hooks:
@@ -62,6 +66,7 @@ repos:
6266
flake8-print,
6367
flake8-pytest-style,
6468
flake8-todo,
69+
flake8-typing-imports,
6570
flake8-unused-arguments,
6671
pep8-naming,
6772
pydocstyle,

‎CHANGES.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ all releases are available on `PyPI <https://pypi.org/project/pytask-stata>`_ an
77
`Anaconda.org <https://anaconda.org/conda-forge/pytask-stata>`_.
88

99

10-
0.0.7 - 2021-xx-xx
10+
0.1.0 - 2021-07-21
1111
------------------
1212

1313
- :gh:`11` fixes the ``README.rst``.
14-
- :gh:`14` fixes tests and aligns pytask-stata with pytask 0.1.0.
14+
- :gh:`13` replaces versioneer with setuptools-scm.
15+
- :gh:`14` fixes tests and aligns pytask-stata with pytask v0.1.0.
1516

1617

1718
0.0.6 - 2021-03-05

‎environment.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ name: pytask-stata
22

33
channels:
44
- conda-forge
5+
- nodefaults
56

67
dependencies:
7-
- python
8+
- python >=3.6
89
- pip
10+
- setuptools_scm
11+
- toml
912

1013
# Conda
1114
- anaconda-client

‎pyproject.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
3+
4+
5+
[tool.setuptools_scm]
6+
write_to = "src/pytask_stata/_version.py"

‎setup.cfg

+47-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,47 @@
1-
[versioneer]
2-
VCS = git
3-
style = pep440
4-
versionfile_source = src/pytask_stata/_version.py
5-
versionfile_build = pytask_stata/_version.py
6-
tag_prefix = v
7-
parentdir_prefix = pytask-stata-
1+
[metadata]
2+
name = pytask_stata
3+
description = Execute do-files with Stata and pytask.
4+
long_description = file: README.rst
5+
long_description_content_type = text/x-rst
6+
url = https://github.com/pytask-dev/pytask-stata
7+
author = Tobias Raabe
8+
author_email = raabe@posteo.de
9+
license = MIT
10+
license_file = LICENSE
11+
platforms = any
12+
classifiers =
13+
Development Status :: 3 - Alpha
14+
License :: OSI Approved :: MIT License
15+
Operating System :: OS Independent
16+
Programming Language :: Python :: 3
17+
Programming Language :: Python :: 3 :: Only
18+
Programming Language :: Python :: 3.6
19+
Programming Language :: Python :: 3.7
20+
Programming Language :: Python :: 3.8
21+
Programming Language :: Python :: 3.9
22+
project_urls =
23+
Documentation = https://github.com/pytask-dev/pytask-stata
24+
Github = https://github.com/pytask-dev/pytask-stata
25+
Tracker = https://github.com/pytask-dev/pytask-stata/issues
26+
Changelog = https://github.com/pytask-dev/pytask-stata/blob/main/CHANGES.rst
27+
28+
[options]
29+
packages = find:
30+
install_requires =
31+
click
32+
pytask>=0.1.0
33+
python_requires = >=3.6
34+
include_package_data = True
35+
package_dir = =src
36+
zip_safe = False
37+
38+
[options.packages.find]
39+
where = src
40+
41+
[options.entry_points]
42+
pytask =
43+
pytask_stata = pytask_stata.plugin
44+
45+
[check-manifest]
46+
ignore =
47+
src/pytask_stata/_version.py

‎setup.py

+2-46
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,5 @@
1-
from pathlib import Path
2-
3-
from setuptools import find_packages
41
from setuptools import setup
52

6-
import versioneer
7-
8-
9-
README = Path("README.rst").read_text()
10-
11-
PROJECT_URLS = {
12-
"Documentation": "https://github.com/pytask-dev/pytask-stata",
13-
"Github": "https://github.com/pytask-dev/pytask-stata",
14-
"Tracker": "https://github.com/pytask-dev/pytask-stata/issues",
15-
"Changelog": "https://github.com/pytask-dev/pytask-stata/blob/main/CHANGES.rst",
16-
}
17-
183

19-
setup(
20-
name="pytask-stata",
21-
version=versioneer.get_version(),
22-
cmdclass=versioneer.get_cmdclass(),
23-
description="Execute do-files with Stata and pytask.",
24-
long_description=README,
25-
long_description_content_type="text/x-rst",
26-
author="Tobias Raabe",
27-
author_email="raabe@posteo.de",
28-
url=PROJECT_URLS["Github"],
29-
project_urls=PROJECT_URLS,
30-
python_requires=">=3.6",
31-
license="MIT",
32-
classifiers=[
33-
"Development Status :: 3 - Alpha",
34-
"Operating System :: OS Independent",
35-
"Programming Language :: Python :: 3",
36-
"Programming Language :: Python :: 3 :: Only",
37-
"Programming Language :: Python :: 3.6",
38-
"Programming Language :: Python :: 3.7",
39-
"Programming Language :: Python :: 3.8",
40-
"Programming Language :: Python :: 3.9",
41-
],
42-
install_requires=["click", "pytask >= 0.0.9"],
43-
platforms="any",
44-
packages=find_packages(where="src"),
45-
package_dir={"": "src"},
46-
entry_points={"pytask": ["pytask_stata = pytask_stata.plugin"]},
47-
include_package_data=True,
48-
zip_safe=False,
49-
)
4+
if __name__ == "__main__":
5+
setup()

‎src/pytask_stata/__init__.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
from ._version import get_versions
1+
try:
2+
from ._version import version as __version__
3+
except ImportError:
4+
# broken installation, we don't even try unknown only works because we do poor mans
5+
# version compare
6+
__version__ = "unknown"
27

3-
__version__ = get_versions()["version"]
4-
del get_versions
8+
9+
__all__ = ["__version__"]

‎src/pytask_stata/_version.py

-558
This file was deleted.

‎tox.ini

+2-5
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ basepython = python
1111
[testenv:pytest]
1212
conda_channels =
1313
conda-forge
14-
pytask
14+
nodefaults
1515
conda_deps =
16-
pytask >=0.0.9
16+
pytask >=0.1.0
1717
pytest
1818
pytest-cov
1919
pytest-xdist
@@ -31,9 +31,6 @@ max-line-length = 89
3131

3232
[flake8]
3333
docstring-convention = numpy
34-
exclude =
35-
versioneer.py
36-
src/pytask_stata/_version.py
3734
ignore =
3835
D
3936
E203 ; ignores whitespace around : which is enforced by Black.

‎versioneer.py

-1,911
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.