Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck committed Dec 8, 2023
1 parent 46f5a98 commit d0c5241
Show file tree
Hide file tree
Showing 17 changed files with 200 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_commit: '9815413'
_commit: cd034ea
_src_path: gh:bswck/skeleton
author_username: bswck
docs: true
Expand Down
3 changes: 1 addition & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
github: "bswck"
custom: "https://www.paypal.me/bswck"
github: "bswck"
9 changes: 3 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ on: ["push"]
jobs:
lint:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: "actions/checkout@v4"
- name: "Set up Python ${{matrix.python-version}}"
uses: "actions/setup-python@v3"
- name: "Set up Python 3.8"
uses: "actions/setup-python@v4"
with:
python-version: "${{matrix.python-version}}"
python-version: "3.8"
- name: "Install Ruff"
run: |
pipx install ruff
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ on: ["push"]
jobs:
typecheck:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: "actions/checkout@v4"
- name: "Set up Python ${{matrix.python-version}}"
uses: "actions/setup-python@v3"
- name: "Set up Python 3.8"
uses: "actions/setup-python@v5"
with:
python-version: "${{matrix.python-version}}"
python-version: "3.8"
- name: "Install the project"
run: |
pipx install poetry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smokeshow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: "ubuntu-latest"
environment: "Smokeshow"
steps:
- uses: "actions/setup-python@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.8"
- run: "pip install smokeshow"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: "actions/checkout@v4"
- name: "Set up Python ${{matrix.python-version}}"
uses: "actions/setup-python@v3"
uses: "actions/setup-python@v5"
with:
python-version: "${{matrix.python-version}}"
- name: "Install the project"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# VSCode workspace files
*.code-workspace
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).<br/>
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- insertion marker -->
<!-- insertion marker -->

17 changes: 13 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing to [runtime_generics](https://github.com/bswck/runtime_generics) 🎉
Contributions are very welcome. 🚀

There are many ways to contribute, ranging from **writing tutorials and improving the documentation**, to **submitting bug reports and feature requests or writing code** which can be **incorporated into runtime_generics**.
There are many ways to contribute, ranging from **writing tutorials and improving the documentation**, to **submitting bug reports and feature requests** or **writing code** which can be incorporated into runtime_generics.

## Report bugs and request features 🐛
Report these in the [issue tracker](https://github.com/bswck/runtime_generics/issues).
Expand Down Expand Up @@ -40,6 +40,7 @@ Ready to contribute? Here's a quick guide on how to set up runtime_generics and

1. [Install Poetry](https://python-poetry.org/docs/#installation).<br/>
Poetry is an amazing tool for managing dependencies & virtual environments, building packages and publishing them.
You might use [pipx](https://github.com/pypa/pipx#readme) to install it globally (recommended):

```shell
pipx install poetry
Expand All @@ -60,6 +61,11 @@ Ready to contribute? Here's a quick guide on how to set up runtime_generics and
cd path/to/runtime_generics
poetry env use $(cat .python-version)
poetry install
```

Next up, simply activate the virtual environment and install pre-commit hooks:

```shell
poetry shell
pre-commit install --hook-type pre-commit --hook-type pre-push
```
Expand Down Expand Up @@ -92,6 +98,9 @@ Ready to contribute? Here's a quick guide on how to set up runtime_generics and
## Pull Request guidelines 📝
1. Initially mark the PR as a draft, so that the maintainers know that you are making final touches.
2. Ensure that the [test coverage](https://coverage-badge.samuelcolvin.workers.dev/redirect/bswck/runtime_generics) is not decreased. If you add a new feature, please add tests for it. [Read more about coverage](https://coverage.readthedocs.io/en/latest/index.html).
3. Ensure that all GitHub checks pass. If they are disabled in your PR, ping the maintainers to request enabling them.
4. Don't forget to link the relevant issue(s) in the PR description and describe the changes you made.
1. Ensure that the [test coverage](https://coverage-badge.samuelcolvin.workers.dev/redirect/bswck/runtime_generics) is not decreased. If you add a new feature, please add tests for it. [Read more about coverage](https://coverage.readthedocs.io/en/latest/index.html).
1. Ensure that all GitHub checks pass. If they are disabled in your PR, ping the maintainers to request enabling them.
1. Don't forget to link the relevant issue(s) in the PR description and describe the changes you made.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# runtime_generics [![Package version](https://img.shields.io/pypi/v/runtime-generics?label=PyPI)](https://pypi.org/project/runtime-generics/) [![Supported Python versions](https://img.shields.io/pypi/pyversions/runtime-generics.svg?logo=python&label=Python)](https://pypi.org/project/runtime-generics/)
[![Tests](https://github.com/bswck/runtime_generics/actions/workflows/test.yml/badge.svg)](https://github.com/bswck/runtime_generics/actions/workflows/test.yml)
[![Coverage](https://coverage-badge.samuelcolvin.workers.dev/bswck/runtime_generics.svg)](https://coverage-badge.samuelcolvin.workers.dev/redirect/bswck/runtime_generics)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Code style](https://img.shields.io/badge/code%20style-black-000000.svg?label=Code%20style)](https://github.com/psf/black)
[![License](https://img.shields.io/github/license/bswck/runtime_generics.svg?label=License)](https://github.com/bswck/runtime_generics/blob/HEAD/LICENSE)
Expand Down Expand Up @@ -97,6 +98,7 @@ poetry add runtime-generics

1. [Install Poetry](https://python-poetry.org/docs/#installation).<br/>
Poetry is an amazing tool for managing dependencies & virtual environments, building packages and publishing them.
You might use [pipx](https://github.com/pypa/pipx#readme) to install it globally (recommended):

```shell
pipx install poetry
Expand All @@ -117,6 +119,11 @@ poetry add runtime-generics
cd path/to/runtime_generics
poetry env use $(cat .python-version)
poetry install
```

Next up, simply activate the virtual environment and install pre-commit hooks:

```shell
poetry shell
pre-commit install --hook-type pre-commit --hook-type pre-push
```
Expand Down
1 change: 1 addition & 0 deletions changes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.gitignore
17 changes: 13 additions & 4 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Contributing to [runtime_generics](https://github.com/bswck/runtime_generics) 🎉
Contributions are very welcome. 🚀

There are many ways to contribute, ranging from **writing tutorials and improving the documentation**, to **submitting bug reports and feature requests or writing code** which can be **incorporated into runtime_generics**.
There are many ways to contribute, ranging from **writing tutorials and improving the documentation**, to **submitting bug reports and feature requests** or **writing code** which can be incorporated into runtime_generics.

## Report bugs and request features 🐛
Report these in the [issue tracker](https://github.com/bswck/runtime_generics/issues).
Expand Down Expand Up @@ -41,6 +41,7 @@ Ready to contribute? Here's a quick guide on how to set up runtime_generics and

1. [Install Poetry](https://python-poetry.org/docs/#installation).<br/>
Poetry is an amazing tool for managing dependencies & virtual environments, building packages and publishing them.
You might use [pipx](https://github.com/pypa/pipx#readme) to install it globally (recommended):

```shell
pipx install poetry
Expand All @@ -61,6 +62,11 @@ Ready to contribute? Here's a quick guide on how to set up runtime_generics and
cd path/to/runtime_generics
poetry env use $(cat .python-version)
poetry install
```

Next up, simply activate the virtual environment and install pre-commit hooks:

```shell
poetry shell
pre-commit install --hook-type pre-commit --hook-type pre-push
```
Expand Down Expand Up @@ -93,6 +99,9 @@ Ready to contribute? Here's a quick guide on how to set up runtime_generics and
## Pull Request guidelines 📝
1. Initially mark the PR as a draft, so that the maintainers know that you are making final touches.
2. Ensure that the [test coverage](https://coverage-badge.samuelcolvin.workers.dev/redirect/bswck/runtime_generics) is not decreased. If you add a new feature, please add tests for it. [Read more about coverage](https://coverage.readthedocs.io/en/latest/index.html).
3. Ensure that all GitHub checks pass. If they are disabled in your PR, ping the maintainers to request enabling them.
4. Don't forget to link the relevant issue(s) in the PR description and describe the changes you made.
1. Ensure that the [test coverage](https://coverage-badge.samuelcolvin.workers.dev/redirect/bswck/runtime_generics) is not decreased. If you add a new feature, please add tests for it. [Read more about coverage](https://coverage.readthedocs.io/en/latest/index.html).
1. Ensure that all GitHub checks pass. If they are disabled in your PR, ping the maintainers to request enabling them.
1. Don't forget to link the relevant issue(s) in the PR description and describe the changes you made.
7 changes: 7 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# runtime_generics [![Package version](https://img.shields.io/pypi/v/runtime-generics?label=PyPI)](https://pypi.org/project/runtime-generics/) [![Supported Python versions](https://img.shields.io/pypi/pyversions/runtime-generics.svg?logo=python&label=Python)](https://pypi.org/project/runtime-generics/)
[![Tests](https://github.com/bswck/runtime_generics/actions/workflows/test.yml/badge.svg)](https://github.com/bswck/runtime_generics/actions/workflows/test.yml)
[![Coverage](https://coverage-badge.samuelcolvin.workers.dev/bswck/runtime_generics.svg)](https://coverage-badge.samuelcolvin.workers.dev/redirect/bswck/runtime_generics)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Code style](https://img.shields.io/badge/code%20style-black-000000.svg?label=Code%20style)](https://github.com/psf/black)
[![License](https://img.shields.io/github/license/bswck/runtime_generics.svg?label=License)](https://github.com/bswck/runtime_generics/blob/HEAD/LICENSE)
Expand Down Expand Up @@ -39,6 +40,7 @@ poetry add runtime-generics

1. [Install Poetry](https://python-poetry.org/docs/#installation).<br/>
Poetry is an amazing tool for managing dependencies & virtual environments, building packages and publishing them.
You might use [pipx](https://github.com/pypa/pipx#readme) to install it globally (recommended):

```shell
pipx install poetry
Expand All @@ -59,6 +61,11 @@ poetry add runtime-generics
cd path/to/runtime_generics
poetry env use $(cat .python-version)
poetry install
```

Next up, simply activate the virtual environment and install pre-commit hooks:

```shell
poetry shell
pre-commit install --hook-type pre-commit --hook-type pre-push
```
Expand Down
56 changes: 55 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 65 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ python = "^3.8"
[tool.poetry.group.dev.dependencies]
mypy = "^1.7.0"
ruff = "^0.1.2"
towncrier = "^23.11.0"
pytest = "^7.4.3"
coverage = "^7.3.2"
poethepoet = "^0.24.3"
Expand All @@ -44,10 +45,34 @@ bump = "scripts/bump.sh"
check = [
{ ref="test" },
{ ref="lint" },
{ ref="lock" }
{ ref="lock" },
]
release.script = "scripts.release:main"

[tool.poe.tasks.added]
shell = "towncrier create $TICKET.added.md --edit"
args = [{name = "TICKET", positional = true}]

[tool.poe.tasks.changed]
shell = "towncrier create $TICKET.changed.md --edit"
args = [{name = "TICKET", positional = true}]

[tool.poe.tasks.fixed]
shell = "towncrier create $TICKET.fixed.md --edit"
args = [{name = "TICKET", positional = true}]

[tool.poe.tasks.deprecated]
shell = "towncrier create $TICKET.deprecated.md --edit"
args = [{name = "TICKET", positional = true}]

[tool.poe.tasks.removed]
shell = "towncrier create $TICKET.removed.md --edit"
args = [{name = "TICKET", positional = true}]

[tool.poe.tasks.security]
shell = "towncrier create $TICKET.security.md --edit"
args = [{name = "TICKET", positional = true}]

[tool.ruff]
exclude = ["tests/", "scripts/"]
# To discuss the presented rationales, contact the author (bswck).
Expand Down Expand Up @@ -88,6 +113,45 @@ strict = true
[tool.isort]
profile = "black"

[tool.towncrier]
directory = "changes"
package = "runtime_generics"
filename = "CHANGELOG.md"
start_string = "<!-- insertion marker -->\n"
underlines = ["", "", ""] # We use Markdown
title_format = "## [{version}](https://github.com/bswck/runtime_generics/tree/{version}) – {project_date}"
issue_format = "[#{issue}](https://github.com/bswck/runtime_generics/issues/{issue})"

[[tool.towncrier.type]]
directory = "security"
name = "Security"
showcontent = true

[[tool.towncrier.type]]
directory = "removed"
name = "Removed"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecated"
name = "Deprecated"
showcontent = true

[[tool.towncrier.type]]
directory = "added"
name = "Added"
showcontent = true

[[tool.towncrier.type]]
directory = "changed"
name = "Changed"
showcontent = true

[[tool.towncrier.type]]
directory = "fixed"
name = "Fixed"
showcontent = true

[tool.coverage.report]
omit = ["tests/*"]
# fail_under = 96
Expand Down
Loading

0 comments on commit d0c5241

Please sign in to comment.