Skip to content

Commit 00f7c97

Browse files
committed
small fixes
1 parent 6523657 commit 00f7c97

File tree

5 files changed

+18
-41
lines changed

5 files changed

+18
-41
lines changed

{{cookiecutter.project_slug}}/.pre-commit-config.yaml

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ repos:
88
- id: check-added-large-files
99
- id: check-ast
1010
- id: check-case-conflict
11-
- id: fix-encoding-pragma
1211
- id: check-docstring-first
1312
- id: check-merge-conflict
1413
- id: detect-private-key
@@ -20,22 +19,13 @@ repos:
2019
rev: 5.10.1
2120
hooks:
2221
- id: isort
23-
- repo: local
24-
hooks:
25-
- id: black-formatter
26-
name: black-formatter
27-
stages: [commit, push]
28-
language: system
29-
entry: nox -s black
30-
types: [python]
31-
pass_filenames: false
3222
- repo: local
3323
hooks:
3424
- id: flake8-lint
3525
name: flake8-lint
3626
stages: [commit, push]
3727
language: system
38-
entry: nox -s lint
28+
entry: poe lint
3929
types: [python]
4030
pass_filenames: false
4131
- repo: local
@@ -44,16 +34,7 @@ repos:
4434
name: pytest
4535
stages: [commit]
4636
language: system
47-
entry: nox -s tests
48-
types: [python]
49-
pass_filenames: false
50-
- repo: local
51-
hooks:
52-
- id: pytest-docs
53-
name: pytest-docs
54-
stages: [push]
55-
language: system
56-
entry: nox -s test-docs
37+
entry: poe test
5738
types: [python]
5839
pass_filenames: false
5940
- repo: local
@@ -62,15 +43,6 @@ repos:
6243
name: api-documentation
6344
stages: [push]
6445
language: system
65-
entry: nox -s api-docs
66-
types: [python]
67-
pass_filenames: false
68-
- repo: local
69-
hooks:
70-
- id: uml-diagram
71-
name: uml-diagram
72-
stages: [push]
73-
language: system
74-
entry: nox -s uml
46+
entry: poe doc
7547
types: [python]
7648
pass_filenames: false

{{cookiecutter.project_slug}}/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<p align="center">
2626
{{cookiecutter.project_short_description}}
2727
<br />
28-
<a href="https://htmlpreview.github.io/?https://raw.githubusercontent.com/{{cookiecutter.github_username}}/{{cookiecutter.project_slug}}/main/docs/api/{{cookiecutter.project_slug}}/index.html"><strong>Explore the docs »</strong></a>
28+
<a href="https://{{cookiecutter.github_username}}.github.io/{{cookiecutter.project_slug}}/readme.html"><strong>Explore the docs »</strong></a>
2929
<br />
3030
<br />
3131
<a href="https://github.com/{{cookiecutter.github_username}}/{{cookiecutter.project_slug}}/issues">Report Bug</a>
@@ -42,9 +42,6 @@
4242
<ol>
4343
<li>
4444
<a href="#about-the-project">About The Project</a>
45-
<ul>
46-
<li><a href="#uml-diagrams">UML Diagrams</a></li>
47-
</ul>
4845
</li>
4946
<li>
5047
<a href="#getting-started">Getting Started</a>
@@ -74,7 +71,7 @@
7471
<!-- GETTING STARTED -->
7572
## Getting Started
7673

77-
To run this project locally, you will need to install the prerequisites and follow the installation section
74+
To run this project locally, you will need to install the prerequisites and follow the installation section.
7875

7976
### Prerequisites
8077

@@ -146,7 +143,7 @@ Some useful examples of how this project can be used:
146143
```
147144

148145

149-
_For more examples, please refer to the [Documentation](https://htmlpreview.github.io/?https://raw.githubusercontent.com/{{cookiecutter.github_username}}/{{cookiecutter.project_slug}}/main/docs/api/{{cookiecutter.project_slug}}/index.html)_
146+
_For more examples, please refer to the [Documentation](https://{{cookiecutter.github_username}}.github.io/{{cookiecutter.project_slug}}/readme.html)_
150147

151148
<p align="right">(<a href="#top">back to top</a>)</p>
152149

{{cookiecutter.project_slug}}/docs/gen_pages.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import mkdocs_gen_files
21
from pathlib import Path
32

4-
docs_parent_dir = Path(__file__).parent.parent
3+
import mkdocs_gen_files
54

5+
docs_parent_dir = Path(__file__).parent.parent
66

7+
# Automagically injects README file into the documentation
78
readme_path = docs_parent_dir / "README.md"
89
if readme_path.exists():
910
with open(readme_path, "r") as r:
1011
with mkdocs_gen_files.open("readme.md", "w") as f:
1112
f.write(r.read())
1213

1314

15+
# Injects feature files into the documentation
1416
head_lines = (
1517
"Feature:",
1618
"Scenario:",
@@ -37,4 +39,3 @@
3739
write_line = f"> {line}"
3840

3941
gf.write(write_line)
40-

{{cookiecutter.project_slug}}/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ pre-commit = "pre-commit run --all-files"
151151
lint = "flake8"
152152
doc = "mkdocs serve --use-directory-urls -f docs/mkdocs.yaml"
153153
doc-html = "mkdocs build --no-directory-urls -f docs/mkdocs.yaml"
154+
doc-publish = """mkdocs gh-deploy \
155+
--config-file docs/mkdocs.yaml \
156+
--no-directory-urls \
157+
--remote-branch docs"""
154158

155159
[tool.poe.tasks.docker-build]
156160
cmd = """

{{cookiecutter.project_slug}}/tests/scenarios/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111

1212

1313
def pytest_configure(config: pytest.Config) -> None:
14-
"""Configure tests tp include new features.
14+
"""Configure tests to include new features.
15+
16+
This function adds new features automatically as test files.
17+
Adding new features will trigger errors because steps are not implemented.
1518
1619
Args:
1720
config (Config): Configuration provided by pytest.

0 commit comments

Comments
 (0)