File tree Expand file tree Collapse file tree
src/{% include pathjoin('vars', 'package_name.j2') %} Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ templating versions are not perfect matches for semantic versions.
66
77## [ Unreleased]
88
9+ ### Changed
10+
11+ - No longer asking ` package_name ` as question with a default that's
12+ overrideable, now derived from ` project_name ` (converted to
13+ lowercase_with_underscore) without asking, as it was always intended.
14+
915### Added
1016
1117- Allow setting a container registry when building. Run `make
Original file line number Diff line number Diff line change @@ -50,7 +50,3 @@ author_email:
5050project_slug :
5151 type : str
5252 default : " {{project_name|trim|lower|replace(' ', '-')}}"
53-
54- package_name :
55- type : str
56- default : " {{project_slug|replace('-', '_')}}"
Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ The project uses semantic versioning (see [semver](https://semver.org)).
99
1010### Added
1111
12- - New python module `{{ package_name} }`, exposed as shell command `{{project_slug}}`
12+ - New python module `{% include "vars/ package_name.j2" % } `, exposed as shell command `{{project_slug}}`
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ poetry shell
3737
3838This repository uses Python{{python_version}}, using
3939[Poetry](https://python-poetry.org) as package manager to define a
40- Python package inside `src/{{ package_name} }/`.
40+ Python package inside `src/{% include "vars/ package_name.j2" % } /`.
4141
4242`poetry` will create virtual environments if needed, fetch
4343dependencies, and install them for development.
@@ -59,7 +59,7 @@ Python in Poetry:
5959
6060```shell
6161$ poetry run python
62- >>> from {{ package_name} } import main
62+ >>> from {% include "vars/ package_name.j2" % } import main
6363>>> main("blabla")
6464```
6565
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ html_static_path = ["_static"]
6060
6161
6262autodoc2_packages = [
63- "../../src/{{ package_name} }",
63+ "../../src/{% include "vars/ package_name.j2" % } ",
6464]
6565# Enable all docstrings as Myst Markdown
6666autodoc2_docstring_parser_regexes = [
Original file line number Diff line number Diff line change 11[tool.poetry]
2- name = "{{ package_name} }"
2+ name = "{% include "vars/ package_name.j2" % } "
33version = "0.1.0"
44description = "{{description}}"
55authors = ["{{author_name}} <{{author_email}}>"]
66readme = "README.md"
77
88[tool.poetry.scripts]
9- {{project_slug}} = "{{ package_name} }.cli:cli"
9+ {{project_slug}} = "{% include "vars/ package_name.j2" % } .cli:cli"
1010
1111[tool.poetry.dependencies]
1212python = "^{{python_version}}"
@@ -56,7 +56,7 @@ disable = ["logging-fstring-interpolation"]
5656[tool.pytest.ini_options]
5757addopts = " " " -vv \
5858 --doctest-modules \
59- --cov={{ package_name} } \
59+ --cov={% include " vars / package_name.j2 " % } \
6060 --cov-report=xml:test_results/coverage.xml \
6161 --cov-report=html:test_results/coverage.html \
6262 --cov-report=term \
File renamed without changes.
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def parse_arguments(arguments: list[str]) -> argparse.Namespace:
1515
1616
1717def cli(arguments: Optional[list[str]] = None):
18- """Run the {{ package_name} } cli"""
18+ """Run the {% include "vars/ package_name.j2" % } cli"""
1919 if arguments is None:
2020 arguments = sys.argv[1:]
2121 args = parse_arguments(arguments)
File renamed without changes.
Original file line number Diff line number Diff line change 1- """Basic tests of {{ package_name} } CLI"""
1+ """Basic tests of {% include "vars/ package_name.j2" % } CLI"""
22
3- from {{ package_name} }.cli import cli
3+ from {% include "vars/ package_name.j2" % } .cli import cli
44
55API_AUTH_TOK = "not-a-real-pass123deadb0b"
66
You can’t perform that action at this time.
0 commit comments