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
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug
about: Create a bug report to help us improve
labels: bug
---

## Description
<!-- A clear and concise description of what the bug is. -->

## Steps to reproduce
<!-- Steps to reproduce the behavior:
1. Run ...
2. ...
3. ... -->

## Current behavior
<!-- What happens actually so you think this is a bug. -->

## Desired behavior
<!-- A clear and concise description of what you expected to happen. -->

## Environment
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature Request
about: Suggest a new feature or change
labels: feature request
---

## Description
<!-- A clear and concise description for us to know your idea. -->

## Possible Solution
<!-- A clear and concise description of what you want to happen. -->

## Additional context
<!-- Add any other context or screenshots about the feature request here. -->

## Related Issue
<!-- If applicable, add link to existing issue also help us know better. -->
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Question
about: Ask a question about how to use the template
labels: question
---

<!--
* [ ] I added a descriptive title to this issue.
* [ ] I have searched (google, github) for similar issues and couldn't find
anything.
-->

## Question
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
Thank you for sending a pull request!

Please describe what the change is, trying to link it with open issues.
-->


## Checklist

* [ ] Add test cases to all the changes you introduce
* [ ] Update the documentation for the changes
19 changes: 19 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Security Policy

## Supported Versions

We will endeavour to support:

* The most recent minor release with bug fixes.
* The latest minor release from the last major version for 6 months after a new
major version is released with critical bug fixes.
* All versions if a security vulnerability is found provided:
* Upgrading to a later version is non-trivial.
* Sufficient people are using that version to make support worthwhile.

## Reporting a Vulnerability

If you find what you think might be a security vulnerability with the project,
please do not create an issue on github. Instead please email
adrianlattes@disroot.org. I'll reply to your email promptly and try to get a
patch out ASAP.
1 change: 1 addition & 0 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
"GNU General Public License v3",
"Not open source"
],
"security_advisories_email": "{{ cookiecutter.email }}",
"__gh_slug": "{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}"
}
24 changes: 24 additions & 0 deletions tests/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,30 @@ def run_command(
text=True,
)

@pytest.mark.parametrize("project", ["minimalist"], indirect=True)
def test_version(project: Result):
project_path = project.project_path
assert project_path is not None
project_name = os.path.basename(project_path)
version_file = project_path / "src" / project_name / "version.py"

process = run_command(f"uv run python {version_file}", project_path)

assert process.returncode == 0, f"Version failed with error: {process.stderr}"

assert (
project_name in process.stdout
), f"Expected '{project_name}' not found in output: {process.stdout}"

@pytest.mark.parametrize("project", ["default", "minimalist"], indirect=True)
def test_nix_build(project: Result):
project_path = project.project_path
assert project_path is not None

process = run_command(f"nix build", project_path)

assert process.returncode == 0, f"Version failed with error: {process.stderr}"


@pytest.mark.parametrize("project", ["click", "argparse", "minimalist"], indirect=True)
def test_main_entrypoint(project: Result):
Expand Down
27 changes: 27 additions & 0 deletions {{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug
about: Create a bug report to help us improve {{ cookiecutter.project_slug }}
labels: bug
---

## Description
<!-- A clear and concise description of what the bug is. -->

## Steps to reproduce
<!-- Steps to reproduce the behavior:
1. Run ...
2. ...
3. ... -->

## Current behavior
<!-- What happens actually so you think this is a bug. -->

## Desired behavior
<!--
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
-->

## Environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature Request
about: Suggest a new feature or change to {{ cookiecutter.project_slug }}
labels: feature request
---

## Description
<!-- A clear and concise description for us to know your idea. -->

## Possible Solution
<!-- A clear and concise description of what you want to happen. -->

## Additional context
<!-- Add any other context or screenshots about the feature request here. -->

## Related Issue
<!-- If applicable, add link to existing issue also help us know better. -->
15 changes: 15 additions & 0 deletions {{cookiecutter.project_slug}}/.github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Question
about: Ask a question about how to use {{ cookiecutter.project_slug }}
labels: question
---

<!--
* [ ] I added a descriptive title to this issue.
* [ ] I have searched (google, github) for similar issues and couldn't find
anything.
* [ ] I have read and followed [the docs](https://{{ cookiecutter.github_username }}.github.io/{{ cookiecutter.project_slug }})
and couldn't find an answer.
-->

## Question
10 changes: 10 additions & 0 deletions {{cookiecutter.project_slug}}/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--
Thank you for sending a pull request!

Please describe what the change is, trying to link it with open issues.
-->

## Checklist

* [ ] Add test cases to all the changes you introduce
* [ ] Update the documentation for the changes
19 changes: 19 additions & 0 deletions {{cookiecutter.project_slug}}/.github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Security Policy

## Supported Versions

We will endeavour to support:

* The most recent minor release with bug fixes.
* The latest minor release from the last major version for 6 months after a new
major version is released with critical bug fixes.
* All versions if a security vulnerability is found provided:
* Upgrading to a later version is non-trivial.
* Sufficient people are using that version to make support worthwhile.

## Reporting a Vulnerability

If you find what you think might be a security vulnerability with
{{ cookiecutter.project_slug }}, please do not create an issue on github. Instead please
email {{ cookiecutter.security_advisories_email }} I'll reply to your email promptly
and try to get a patch out ASAP.
7 changes: 1 addition & 6 deletions {{cookiecutter.project_slug}}/.github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% if cookiecutter.use_mkdocs == 'y' %}
name: docs

on:
Expand Down Expand Up @@ -39,11 +38,8 @@ jobs:
- name: Install the project with docs dependencies
run: uv sync --all-extras --dev --group docs

- name: Generate API documentation
run: python docs/gen_api_docs.py

- name: Build documentation
run: mkdocs build
run: uv run mkdocs build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand All @@ -61,4 +57,3 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
{% endif %}
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
python-version-file: "pyproject.toml"

- name: Install the project
run: uv sync --all-extras --dev --group test
run: uv sync --all-extras --dev

- name: Run tests
run: uv run pytest tests -sv
5 changes: 3 additions & 2 deletions {{cookiecutter.project_slug}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ repos:
hooks:
- id: commitizen
name: commitizen
entry: commitizen
language: system
entry: cz check
args: [--allow-abort, --commit-msg-file]
language: python
stages: [commit-msg]
- repo: local
hooks:
Expand Down
21 changes: 2 additions & 19 deletions {{cookiecutter.project_slug}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,5 @@
{{ cookiecutter.project_short_description }}

{% if cookiecutter.use_mkdocs == 'y' %}
## Documentation

This project uses MkDocs for documentation. To build and view the documentation locally:

```bash
# Install documentation dependencies
uv sync --group docs

# Generate API documentation
python docs/gen_api_docs.py

# Serve documentation locally
mkdocs serve
```

The documentation will be available at http://127.0.0.1:8000/

When you push to the main branch, the documentation will automatically be built and deployed to GitHub Pages.
{% endif %}
[docs](https://{{cookiecutter.github_username}}.github.io/{{cookiecutter.project_slug}})
{%- endif %}
7 changes: 0 additions & 7 deletions {{cookiecutter.project_slug}}/docs/api/index.md

This file was deleted.

Loading