Skip to content

Commit 425bbb8

Browse files
authored
Fix some small rendering issues. (#20)
1 parent 1363a6c commit 425bbb8

File tree

8 files changed

+41
-18
lines changed

8 files changed

+41
-18
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
exclude: |
2+
(?x)^(
3+
{{cookiecutter.project_slug}}/tests/test_import.py
4+
)$
5+
16
repos:
27
- repo: https://github.com/pre-commit/pre-commit-hooks
38
rev: v4.2.0
@@ -71,7 +76,9 @@ repos:
7176
--fail-under=40,
7277
--config,
7378
pyproject.toml,
74-
"{{cookiecutter.project_slug}}"
79+
"{{cookiecutter.project_slug}}",
80+
--exclude,
81+
"{{cookiecutter.project_slug}}/tests/test_import.py"
7582
]
7683
pass_filenames: false
7784
- repo: https://github.com/executablebooks/mdformat

docs/source/changes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
This is a record of all past cookiecutter-pytask-project releases and what went into
44
them in reverse chronological order.
55

6-
## 1.2.0 - 2022-xx-xx
6+
## 1.2.1 - 2022-05-13
7+
8+
- {pull}`20` fixes some small rendering issues.
9+
10+
## 1.2.0 - 2022-04-14
711

812
- {pull}`7` skips concurrent CI builds.
913
- {pull}`8` harmonizes cookiecutter-pytask-project with econ-project-templates.

tests/test_cookie.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,21 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
108108
check=True,
109109
)
110110

111-
# Test building documentation
111+
# Install package.
112112
subprocess.run(
113113
("conda", "run", "-n", "__test__", "pip", "install", "-e", "."),
114114
cwd=result.project_path,
115115
check=True,
116116
)
117+
118+
# Run tests.
119+
subprocess.run(
120+
("conda", "run", "-n", "__test__", "pytest"),
121+
cwd=result.project_path,
122+
check=True,
123+
)
124+
125+
# Test building documentation
117126
subprocess.run(
118127
("conda", "run", "-n", "__test__", "make", "html"),
119128
cwd=result.project_path / "docs",

{{cookiecutter.project_slug}}/CITATION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@Unpublished{{ "{" }}{{ cookiecutter.project_slug }}{% now 'local', '%Y' %},
2-
Title = {{ "{" }}A Python tool for managing scientific workflows.{{ "}" }},
2+
Title = {{ "{" }}{{ cookiecutter.project_description }}{{ "}" }},
33
Author = {{ "{" }}{{ cookiecutter.author }}{{ "}" }},
44
Year = {{ "{" }}{% now 'local', '%Y' %}{{ "}" }},
55
Url = {{ "{" }}https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}{{ "}" }}

{{cookiecutter.project_slug}}/MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include CITATION
2-
{% if cookiecutter.open_source_license == 'Not open source' %}include LICENSE
2+
{% if cookiecutter.open_source_license != 'Not open source' %}include LICENSE
33
{% endif %}
44
exclude *.yaml
55
exclude *.yml

{{cookiecutter.project_slug}}/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,19 @@ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/main)
2222

2323
To get started, create the environment with
2424

25-
.. code-block:: console
26-
27-
```
25+
```console
2826
$ conda/mamba env create
2927
```
3028

3129
To build the project, type
3230

33-
.. code-block:: console
34-
35-
```
31+
```console
3632
$ pytask
3733
```
3834

3935
## Credits
4036

41-
This project was created with `cookiecutter <https://github.com/audreyr/cookiecutter>`\_
37+
This project was created with [cookiecutter](https://github.com/audreyr/cookiecutter)
4238
and the
43-
`cookiecutter-pytask-project <https://github.com/pytask-dev/cookiecutter-pytask-project>`\_
39+
[cookiecutter-pytask-project](https://github.com/pytask-dev/cookiecutter-pytask-project)
4440
template.

{{cookiecutter.project_slug}}/setup.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[metadata]
22
name = {{ cookiecutter.project_slug }}
3-
description = A project with pytask.
4-
long_description = file: README.rst
5-
long_description_content_type = text/x-rst
3+
description = {{ cookiecutter.project_description }}
4+
long_description = file: README.md
5+
long_description_content_type = text/markdown
66
url = hhttps://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}
77
author = {{ cookiecutter.author }}
88
author_email = {{ cookiecutter.email }}
99
license = {{ cookiecutter.open_source_license }}
10-
license_file = LICENSE
11-
platforms = unix, linux, osx, cygwin, win32
10+
{% if cookiecutter.open_source_license != 'Not open source' %}license_file = LICENSE
11+
{% endif %}platforms = unix, linux, osx, cygwin, win32
1212
classifiers =
1313
Intended Audience :: Science/Research
1414
License :: OSI Approved :: {{ cookiecutter.open_source_license }} License
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from __future__ import annotations
2+
3+
import {{ cookiecutter.project_slug }}
4+
5+
6+
def test_import():
7+
assert hasattr({{ cookiecutter.project_slug }}, "__version__")

0 commit comments

Comments
 (0)