Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single location for package version number. #29

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"organisation": "StatCan",
"repo_name": "{{ cookiecutter.project_name_en.lower().replace(' ', '-') }}",
"project_version": "0.0.1",

"package_name": "{{ cookiecutter.repo_name.replace('-', '_') }}",
"using_R": ["No", "Yes"]
}
6 changes: 3 additions & 3 deletions {{ cookiecutter.repo_name }}/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import os
import sys
import {{ cookiecutter.package_name }}

sys.path.insert(0, os.path.abspath(".."))

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

Expand Down Expand Up @@ -55,9 +55,9 @@
# |version| and |release|, also used in various other places throughout the built
# documents.
# The short X.Y.Z version.
version = "{{ cookiecutter.project_version }}"
version = {{ cookiecutter.package_name }}.__version__
# The full version, including alpha/beta/rc tags.
release = "{{ cookiecutter.project_version }}"
release = {{ cookiecutter.package_name }}.__version__

# List of patterns, relative to source directory, that match files and directories to
# ignore when looking for source files. These patterns also affect html_static_path and
Expand Down
2 changes: 1 addition & 1 deletion {{ cookiecutter.repo_name }}/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = {{ cookiecutter.project_name_en }}
version = {{ cookiecutter.project_version }}
version = attr: {{ cookiecutter.package_name }}.__version__
description = My package description
long_description = file: README.md
keywords = one, two
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "{{ cookiecutter.project_version }}"