Skip to content

Commit

Permalink
Merge branch 'release-v2.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
fedejaure committed May 28, 2023
2 parents 8d802ea + b55c44a commit 88f0172
Show file tree
Hide file tree
Showing 19 changed files with 140 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[bumpversion]
commit = True
tag = False
current_version = 2.2.1
current_version = 2.3.0

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ jobs:
with:
python-version: 3.8

- name: Install pre-commit
run: pip install pre-commit
- name: Install system deps
shell: bash
run: |
pip install poetry
poetry config virtualenvs.in-project true
poetry install --no-root --only dev --only linters --sync
- name: Run autoupdate
run: pre-commit autoupdate
run: poetry run pre-commit autoupdate

- name: Run pre-commit
run: pre-commit run --all-files
run: poetry run pre-commit run --all-files

- uses: peter-evans/[email protected]
with:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ jobs:
with:
python-version: 3.8

- name: Linting
- name: Install system deps
shell: bash
run: |
pip install pre-commit
pre-commit run --all-files
pip install poetry
poetry config virtualenvs.in-project true
poetry install --no-root --only dev --only linters --sync
- name: Linting
shell: bash
run: poetry run pre-commit run --all-files

tests:
needs: linting
Expand Down Expand Up @@ -58,7 +64,7 @@ jobs:
shell: bash
run: nox --force-color -s tests-${{ matrix.python-version }}

- name: Run safety check
- name: Run security check
if: matrix.python-version == '3.11'
shell: bash
run: nox --force-color -s safety
run: nox --force-color -s security
22 changes: 8 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,14 @@ repos:
hooks:
- id: black
exclude: "^{{cookiecutter.project_name}}/"
- repo: https://github.com/flakeheaven/flakeheaven
rev: 3.3.0
- repo: local
hooks:
- id: flakeheaven
additional_dependencies: [
'flake8>=4.0.1,<5.0.0',
'flake8-builtins~=2.1.0',
'flake8-blind-except~=0.2.1',
'flake8-logging-format~=0.9.0',
'flake8-bugbear~=23.3.12',
'flake8-annotations~=2.9.1',
'flake8-docstrings~=1.7.0',
'flake8-bandit~=3.0.0',
'flake8-broken-line~=0.6.0',
'darglint~=1.8.1'
]
name: flakeheaven
description: "`FlakeHeaven` it's a Flake8 wrapper to make it cools."
entry: poetry run flakeheaven
args: [lint]
language: system
types: [python]
require_serial: true
exclude: "^{{cookiecutter.project_name}}/"
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.3.0] - 2023-05-28

### Changed
- Reorganized dev dependencies into groups.
- Renamed invoke safety task to invoke security.
- flakeheaven pre-coomit hook with local deps.

## [2.2.1] - 2023-05-25

### Changed
Expand Down Expand Up @@ -330,7 +337,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- First release.


[Unreleased]: https://github.com/fedejaure/cookiecutter-modern-pypackage/compare/v2.2.1...develop
[Unreleased]: https://github.com/fedejaure/cookiecutter-modern-pypackage/compare/v2.3.0...develop
[2.3.0]: https://github.com/fedejaure/cookiecutter-modern-pypackage/compare/v2.2.1...v2.3.0
[2.2.1]: https://github.com/fedejaure/cookiecutter-modern-pypackage/compare/v2.2.0...v2.2.1
[2.2.0]: https://github.com/fedejaure/cookiecutter-modern-pypackage/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/fedejaure/cookiecutter-modern-pypackage/compare/v2.0.1...v2.1.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pip install -U cookiecutter
Generate a Python package project:

```
cookiecutter gh:fedejaure/cookiecutter-modern-pypackage --checkout v2.2.1
cookiecutter gh:fedejaure/cookiecutter-modern-pypackage --checkout v2.3.0
```

Then:
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
# built documents.
#
# The short X.Y version.
version = "2.2.1"
version = "2.3.0"
# The full version, including alpha/beta/rc tags.
release = "2.2.1"
release = "2.3.0"

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/invoke.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Execute `inv[oke] --list` to see the list of available commands.
install-hooks Install pre-commit hooks.
lint Run all linting.
mypy Run mypy.
safety Run safety.
security Run security related checks.
tests Run tests.
version Bump version.
2 changes: 1 addition & 1 deletion docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Use cookiecutter, pointing it at the cookiecutter-pypackage repo:

.. code-block:: bash
$ cookiecutter gh:fedejaure/cookiecutter-modern-pypackage --checkout v2.2.1
$ cookiecutter gh:fedejaure/cookiecutter-modern-pypackage --checkout v2.3.0
You'll be asked to enter a bunch of values to set the package up.
If you don't know what to enter, stick with the defaults.
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def mypy(session: Session) -> None:


@session(python="3.11")
def safety(session: Session) -> None:
def security(session: Session) -> None:
"""Scan dependencies for insecure packages."""
session.install("invoke", "safety")
session.run("inv", "safety")
session.run("inv", "security")
40 changes: 20 additions & 20 deletions poetry.lock

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

30 changes: 21 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cookiecutter-modern-pypackage"
version = "2.2.1"
version = "2.3.0"
description = "Cookiecutter template for a modern Python package."
authors = ["Federico Jaureguialzo <[email protected]>"]
license = "MIT"
Expand Down Expand Up @@ -31,10 +31,24 @@ classifiers=[

[tool.poetry.dependencies]
python = "<3.12,>=3.8"
cookiecutter = "^2.1.1"

[tool.poetry.group.dev.dependencies]
pre-commit = "^3.3.2"
invoke = "^2.1.2"
bump2version = "^1.0.1"
watchdog = {version = "^3.0.0", extras = ["watchmedo"]}

[tool.poetry.group.test.dependencies]
pytest = "^7.3.1"
xdoctest = "^1.1.1"
pytest-cookies = "^0.7.0"

[tool.poetry.group.format.dependencies]
isort = "^5.12.0"
black = "^23.3.0"

[tool.poetry.group.linters.dependencies]
flake8 = ">=4.0.1,<5.0.0"
flakeheaven = "^3.3.0"
flake8-builtins = "^2.1.0"
Expand All @@ -46,18 +60,16 @@ flake8-docstrings = "^1.7.0"
flake8-bandit = "^3.0.0"
flake8-broken-line = "^0.6.0"
darglint = "^1.8.1"
isort = "^5.12.0"
black = "^23.3.0"

[tool.poetry.group.security.dependencies]
safety = "^2.4.0b1"

[tool.poetry.group.typing.dependencies]
mypy = "^1.3.0"

[tool.poetry.group.docs.dependencies]
sphinx = "^7.0.1"
recommonmark = "^0.7.1"
bump2version = "^1.0.1"
pytest = "^7.3.1"
xdoctest = "^1.1.1"
cookiecutter = "^2.1.1"
pytest-cookies = "^0.7.0"
watchdog = {version = "^3.0.0", extras = ["watchmedo"]}

[tool.flakeheaven]
format = "grouped"
Expand Down
Loading

0 comments on commit 88f0172

Please sign in to comment.