Skip to content

Commit

Permalink
Merge branch 'release-v2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
fedejaure committed Mar 9, 2023
2 parents 35aff5c + 1370a64 commit 849be33
Show file tree
Hide file tree
Showing 31 changed files with 1,193 additions and 1,132 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.1.0
current_version = 2.2.0

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3.3.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
10 changes: 5 additions & 5 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
name: autoupdate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3.3.0
with:
ref: develop

- name: Set up Python 3.7
uses: actions/setup-python@v2.2.2
- name: Set up Python 3.8
uses: actions/setup-python@v4.5.0
with:
python-version: 3.7
python-version: 3.8

- name: Install pre-commit
run: pip install pre-commit
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Run pre-commit
run: pre-commit run --all-files

- uses: peter-evans/create-pull-request@v3.10.1
- uses: peter-evans/create-pull-request@v4.2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: chore-update-pre-commit-hooks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Create Github Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3.3.0

- name: Get version from tag
id: tag_name
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2.0.0
uses: mindsers/changelog-reader-action@v2.2.2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3.3.0

- name: Set up Python 3.7
uses: actions/setup-python@v2.2.2
- name: Set up Python 3.8
uses: actions/setup-python@v4.5.0
with:
python-version: 3.7
python-version: 3.8

- name: Linting
run: |
Expand All @@ -33,20 +33,20 @@ jobs:
strategy:
matrix:
os: [Ubuntu, MacOS]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10', '3.11']
fail-fast: true
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3.3.0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.2
uses: actions/setup-python@v4.5.0
with:
python-version: ${{ matrix.python-version }}

- name: Install system deps
shell: bash
run: |
pip install nox
pip install nox-poetry
pip install poetry
poetry config virtualenvs.in-project true
Expand All @@ -59,6 +59,6 @@ jobs:
run: nox --force-color -s tests-${{ matrix.python-version }}

- name: Run safety check
if: matrix.python-version == '3.10'
if: matrix.python-version == '3.11'
shell: bash
run: nox --force-color -s safety
38 changes: 16 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.4.0
hooks:
- id: check-toml
exclude: "^{{cookiecutter.project_name}}/"
Expand All @@ -14,35 +14,29 @@ repos:
- id: end-of-file-fixer
exclude: "^{{cookiecutter.project_name}}/"
- repo: https://github.com/timothycrosley/isort
rev: 5.9.3
rev: 5.12.0
hooks:
- id: isort
exclude: "^{{cookiecutter.project_name}}/"
- repo: https://github.com/psf/black
rev: 21.9b0
rev: 23.1.0
hooks:
- id: black
exclude: "^{{cookiecutter.project_name}}/"
- repo: local
- repo: https://github.com/flakeheaven/flakeheaven
rev: 3.2.1
hooks:
- id: flakehell
name: flakehell
description: "`Flakehell` it's a Flake8 wrapper to make it cools."
entry: flakehell
args: [lint]
language: python
types: [python]
require_serial: true
- id: flakeheaven
additional_dependencies: [
'flake8~=3.9.2',
'flakehell~=0.9.0',
'flake8-builtins~=1.5.3',
'flake8-blind-except~=0.2.0',
'flake8-logging-format~=0.6.0',
'flake8-bugbear~=21.9.2',
'flake8-annotations~=2.6.2',
'flake8-docstrings~=1.6.0',
'flake8-bandit~=2.1.2',
'darglint~=1.8.0'
'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.2.13',
'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'
]
exclude: "^{{cookiecutter.project_name}}/"
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ sphinx:
configuration: docs/conf.py

python:
version: 3.7
version: 3.8
install:
- requirements: docs/requirements.txt
45 changes: 44 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.2.0] - 2023-03-09
### Added
- Python `3.11` support.
- nox-poetry.
- flake8-broken-line `^0.6.0`.
- flakeheaven `^3.2.1`.

### Changed
- black from `^21.9b0` to `^23.1.0`.
- flake8 from `^3.9.2` to `>=4.0.1,<5.0.0`.
- checkout action from `v2.3.4` to `v2.4.0`.
- darglint from `^1.8.0` to `^1.8.1`.
- actions/setup-python from `v2.2.2` to `v4.5.0`.
- actions/checkout from `v2.4.0` to `v3.3.0`.
- github/codeql-action from `v1` to `v2`.
- peter-evans/create-pull-request from `v3.10.1` to `v4.2.3`.
- mindsers/changelog-reader-action from `v2.0.0` to `v2.2.2`.
- pre-commit from `^2.15.0` to `^3.1.1.
- isort from `^5.9.3` to `^5.12.0`.
- sphinx from `^4.2.0` to `^6.1.3`.
- flake8-bugbear from `^21.9.2` to `^23.2.13`.
- mypy from `^0.910` to `^1.0.1`.
- pre-commit-hooks from `v4.0.1` to `v4.4.0`.
- watchdog from `^2.1.6` to `^2.3.1`.
- invoke from `^1.6.0` to `^2.0.0`.
- pytest from `^6.2.5` to `^7.2.2`.
- xdoctest from `^0.15.10` to `^1.0.0`.
- flake8-bandit from `^2.1.2` to `^3.0.0`.
- safety from `^1.10.3` to `^2.4.0b1`.
- flake8-annotations from `^2.6.2` to `^2.9.1`.
- flake8-blind-except from `^0.2.0` to `^0.2.1`.
- flake8-logging-format from `^0.6.0` to `^0.9.0`.
- xdoctest from `^1.0.0` to `^1.1.1`.
- coverage from `^6.0.1` to `^7.2.1`.
- flake8-docstrings from `1.6.0` to `1.7.0`.
- flake8-builtins from `1.5.3` to `2.1.0`.
- click from `^8.0.3` to `^8.1.3`.

### Removed
- Python `3.7` support.
- flakehell `^0.9.0`.

## [2.1.0] - 2021-10-12
### Added
- Python `3.10` support.
Expand Down Expand Up @@ -263,7 +305,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.1.0...develop
[Unreleased]: https://github.com/fedejaure/cookiecutter-modern-pypackage/compare/v2.2.0...develop
[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
[2.0.1]: https://github.com/fedejaure/cookiecutter-modern-pypackage/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/fedejaure/cookiecutter-modern-pypackage/compare/v1.2.3...v2.0.0
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div align="center">

[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/fedejaure/cookiecutter-modern-pypackage?logo=github)](https://github.com/fedejaure/cookiecutter-modern-pypackage/releases)
[![Python Version](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue?logo=python)](https://www.python.org/)
[![Python Version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue?logo=python)](https://www.python.org/)
[![Tests](https://github.com/fedejaure/cookiecutter-modern-pypackage/workflows/tests/badge.svg)](https://github.com/fedejaure/cookiecutter-modern-pypackage/actions?workflow=tests)
[![Read the Docs](https://readthedocs.org/projects/cookiecutter-modern-pypackage/badge/)](https://cookiecutter-modern-pypackage.readthedocs.io/)
[![License](https://img.shields.io/badge/license-MIT-brightgreen)](https://opensource.org/licenses/MIT)
Expand All @@ -25,7 +25,7 @@
* Dependency tracking using [Poetry][poetry]
* Testing setup with [Pytest][pytest]
* [Github Actions][github actions] ready for Continuous Integration testing
* Linting provided by [Flake8][flake8] with [Flakehell][flakehell]
* Linting provided by [Flake8][flake8] with [flakeheaven][flakeheaven]
* Docstring linting provided by [Darglint][darglint] using the [Google Python Style Guide][google styleguide]
* Static type checking by [Mypy][mypy]
* Formatting provided by [Black][black] and [Isort][isort]
Expand All @@ -50,7 +50,7 @@ pip install -U cookiecutter
Generate a Python package project:

```
cookiecutter gh:fedejaure/cookiecutter-modern-pypackage --checkout v2.1.0
cookiecutter gh:fedejaure/cookiecutter-modern-pypackage --checkout v2.2.0
```

Then:
Expand Down Expand Up @@ -78,7 +78,7 @@ This cookiecutter was built for learning purpose and inspired by:
[pytest]: https://github.com/pytest-dev/pytest
[github actions]: https://github.com/features/actions
[flake8]: https://gitlab.com/pycqa/flake8
[flakehell]: https://github.com/life4/flakehell
[flakeheaven]: https://github.com/flakeheaven/flakeheaven
[isort]: https://github.com/timothycrosley/isort
[black]: https://github.com/psf/black
[darglint]: https://github.com/terrencepreilly/darglint
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.1.0"
version = "2.2.0"
# The full version, including alpha/beta/rc tags.
release = "2.1.0"
release = "2.2.0"

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

Expand Down
2 changes: 1 addition & 1 deletion docs/console_script_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Console Script Setup
====================

Optionally, your package can include a console script using Click (Python 3.7+).
Optionally, your package can include a console script using Click (Python 3.8+).

How It Works
------------
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sphinx==4.2.0
sphinx==6.1.3
recommonmark==0.7.1
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.1.0
$ cookiecutter gh:fedejaure/cookiecutter-modern-pypackage --checkout v2.2.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
1 change: 0 additions & 1 deletion hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def add_symlink(path: Path, target: Union[str, Path], target_is_directory: bool


if __name__ == "__main__":

if "No command-line interface" in "{{ cookiecutter.command_line_interface }}":
remove_file(PROJECT_TESTS / "test_cli.py")
remove_file(PROJECT_SRC / "cli.py")
Expand Down
1 change: 0 additions & 1 deletion hooks/pre_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def validate_value(value: str, regex: str, fail_msg: str) -> None:


if __name__ == "__main__":

validate_value(
"{{ cookiecutter.project_name }}",
NAME_REGEX,
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[mypy]

[mypy-cookiecutter.*,pytest.*,pytest_cookies.*,invoke.*,nox.*]
[mypy-cookiecutter.*,pytest.*,pytest_cookies.*,invoke.*,nox.*,nox_poetry.*]
allow_redefinition = false
check_untyped_defs = true
ignore_errors = false
Expand Down
Loading

0 comments on commit 849be33

Please sign in to comment.