Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 17 additions & 0 deletions {{cookiecutter.project_name}}/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[bumpversion]
current_version = {{ cookiecutter.version }}

[comment]
comment = The contents of this file cannot be merged with that of setup.cfg until https://github.com/c4urself/bump2version/issues/185 is resolved

[bumpversion:file:{{ cookiecutter.package_name }}/__version__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"

[bumpversion:file:setup.cfg]
search = version = {current_version}
replace = version = {new_version}

[bumpversion:file:CITATION.cff]
search = version: "{current_version}"
replace = version: "{new_version}"
5 changes: 3 additions & 2 deletions {{cookiecutter.project_name}}/project_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ help you decide which tool to use for packaging.
## Package version number

- We recommend using [semantic versioning](https://guide.esciencecenter.nl/#/best_practices/releases?id=semantic-versioning).
- For convenience, the package version is stored in a single place: `{{ cookiecutter.package_name }}/__version__.py`.
For updating the version number, you only have to change this file.
- For convenience, the package version is stored in a single place: `{{ cookiecutter.project_name }}/.bumpversion.cfg`.
For updating the version number, make sure the dev dependencies are installed and run `bumpversion patch`,
`bumpversion minor`, or `bumpversion major` as appropriate.
- Don't forget to update the version number before [making a release](https://guide.esciencecenter.nl/#/best_practices/releases)!

## Publish on Python Package Index (PyPI)
Expand Down
10 changes: 3 additions & 7 deletions {{cookiecutter.project_name}}/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# - https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html
# - https://www.python.org/dev/peps/pep-0314/


[metadata]
author = {{ cookiecutter.full_name }}
author_email = {{ cookiecutter.email }}
Expand Down Expand Up @@ -32,23 +31,21 @@ project_urls =
url = {{ cookiecutter.repository }}
version = {{ cookiecutter.version }}


[options]
zip_safe = False
include_package_data = True
packages =
{{ cookiecutter.package_name }}
install_requires =


[options.data_files]
# This section requires setuptools>=40.6.0
# It remains empty for now
# Check if MANIFEST.in works for your purposes


[options.extras_require]
dev =
bump2version
prospector[with_pyroma]
yapf
isort
Expand All @@ -61,12 +58,10 @@ dev =
sphinx_rtd_theme
recommonmark


[coverage:run]
branch = True
source = {{ cookiecutter.package_name }}


[tool:isort]
lines_after_imports = 2
force_single_line = 1
Expand All @@ -75,7 +70,8 @@ known_first_party = {{ cookiecutter.package_name }}
src_paths = {{ cookiecutter.package_name }},tests
line_length = 120


[tool:pytest]
testpaths = tests
# Note that visual debugger in some editors like pycharm gets confused by coverage calculation.
# As a workaround, configure the test configuration in pycharm et al with a --no-cov argument
addopts = --cov --cov-report xml --cov-report term --cov-report html
Comment thread
jspaaks marked this conversation as resolved.