From 2961c4dbd371f217d951f7ec5c91c2d31c47f54e Mon Sep 17 00:00:00 2001 From: dboe <dboe@ipp.mpg.de> Date: Sat, 18 Jul 2020 15:50:14 +0200 Subject: [PATCH] Update template --- .pre-commit-config.yaml | 4 ---- .readthedocs.yml | 1 - Makefile | 2 +- docs/cookiecutter_input.json | 1 + setup.cfg | 25 ++++++++++++++++--------- setup.py | 2 +- tfields/__init__.py | 2 +- 7 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 473065a..4b8f505 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,10 +8,6 @@ repos: rev: 3.8.3 hooks: - id: flake8 -- repo: https://gitlab.com/dboe/dough - rev: v0.1.10 - hooks: - - id: readthedocs_requirements - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.1.0 hooks: diff --git a/.readthedocs.yml b/.readthedocs.yml index 0944359..1db793f 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -19,7 +19,6 @@ sphinx: python: version: 3.7 install: - - requirements: docs/requirements.txt - method: pip path: . extra_requirements: diff --git a/Makefile b/Makefile index 5776f57..7147b30 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ untag: requirements: setup.cfg # We have all the information in the setup.cfg file. For some reasons (e.g. bug in setuptools or limitations to use setup.cfg in readthedocs) we still need a requirements file - python -c "import configparser; import os; config = configparser.ConfigParser(); config.read('setup.cfg'); deps = config['metadata']['install_requires'].split('\n'); deps = [x for x in deps if x]; head = '# Autogenerated by Makefile from setup.cfg install_requies section. Remove this line if you want to fix this file.'; path = 'requirements.txt'; f = open(path, 'r') if os.path.exists(path) else None; line = f.readline() if f else ''; quit('User defined requirements already existing.') if f and not line.startswith(head[:20]) else None; f = open('requirements.txt', 'w'); f.write('\n'.join([head] + deps))" + python -c "import configparser; import os; config = configparser.ConfigParser(); config.read('setup.cfg'); deps = config['options']['install_requires'].split('\n'); deps = [x for x in deps if x]; head = '# Autogenerated by Makefile from setup.cfg install_requies section. Remove this line if you want to fix this file.'; path = 'requirements.txt'; f = open(path, 'r') if os.path.exists(path) else None; line = f.readline() if f else ''; quit('User defined requirements already existing.') if f and not line.startswith(head[:20]) else None; f = open('requirements.txt', 'w'); f.write('\n'.join([head] + deps))" doc: Makefile $(SOURCES) $(DOCUMENTATION) docs/conf.py docs/apidoc-template/* # link apidoc to source and build html documentation with sphinx diff --git a/docs/cookiecutter_input.json b/docs/cookiecutter_input.json index 27d577e..5e5cf53 100644 --- a/docs/cookiecutter_input.json +++ b/docs/cookiecutter_input.json @@ -9,6 +9,7 @@ "email": "dboe@ipp.mpg.de", "keywords": "tensors, tensor-fields, graphs, mesh, numpy, math", "package_name": "tfields", + "package_version": "0.3.2", "pypi_username": "dboe", "remote_namespace": "dboe", "remote_provider": "gitlab.mpcdf.mpg.de", diff --git a/setup.cfg b/setup.cfg index 5d383d9..b990edb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.0.1 +current_version = 0.3.2 tag = True commit = True message = release-v{new_version} @@ -8,9 +8,16 @@ message = release-v{new_version} search = __version__ = '{current_version}' replace = {new_version} +[bumpversion:file:setup.py] +search = version='{current_version}' +replace = {new_version} + +[bumpversion:file:docs/cookiecutter_input.json] +search = "package_version": "{current_version}" +replace = {new_version} + [metadata] name = tfields -version = attr: tfields.__version__ url = https://gitlab.mpcdf.mpg.de/dboe/tfields author = Daniel Böckenhoff author_email = dboe@ipp.mpg.de @@ -30,18 +37,18 @@ description = Tensors, tensor fields, graphs, mesh manipulation, CAD and more on long_description = file: README.rst, LICENSE.rst long_description_content_type = text/x-rst keywords = tensors, tensor-fields, graphs, mesh, numpy, math -install_requires = - pathlib project_urls = Documentation = https://tfields.readthedocs.io Source = https://gitlab.mpcdf.mpg.de/dboe/tfields -tests_require = - doctest - unittest -python_requires = >=3.0 [options] +python_requires = >=3.0 packages = find: +install_requires = + pathlib +tests_require = + doctest + unittest [options.packages.find] exclude = @@ -117,7 +124,7 @@ python = [testenv] description = run test suite under {basepython} deps = - {[metadata]install_requires} + {[options]install_requires} {[options.extras_require]test} extras = test commands = diff --git a/setup.py b/setup.py index 6068493..55b3dc0 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,3 @@ from setuptools import setup -setup() +setup(version='0.3.2') diff --git a/tfields/__init__.py b/tfields/__init__.py index 9016a41..38c9a96 100644 --- a/tfields/__init__.py +++ b/tfields/__init__.py @@ -2,4 +2,4 @@ __author__ = """Daniel Böckenhoff""" __email__ = "dboe@ipp.mpg.de" -__version__ = "0.0.1" +__version__ = "0.3.2" -- GitLab