Skip to content

Commit

Permalink
Updated cookiecutter commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
56kyle committed Apr 1, 2024
1 parent a5015f6 commit 3eb226f
Show file tree
Hide file tree
Showing 29 changed files with 1,390 additions and 1,174 deletions.
8 changes: 5 additions & 3 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"_checkout": null,
"_output_dir": "C:\\Users\\56kyl\\source\\repos",
"_template": "gh:cjolowicz/cookiecutter-hypermodern-python",
"_repo_dir": "./cookiecutter-hypermodern-python",
"_template": "./cookiecutter-hypermodern-python",
"author": "Kyle Oliver",
"copyright_year": "2022",
"copyright_year": "2024",
"development_status": "Development Status :: 1 - Planning",
"email": "56kyleoliver@gmail.com",
"friendly_name": "btd6",
"friendly_name": "Btd6",
"github_user": "56kyle",
"license": "MIT",
"package_name": "btd6",
Expand Down
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{py,toml}]
indent_style = space
indent_size = 4

[*.yml,yaml,json]
indent_style = space
indent_size = 2
4 changes: 2 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[flake8]
select = B,B9,C,D,DAR,E,F,N,RST,S,W
select = B,B9,C,D,DAR,E,F,N,RST,W
ignore = E203,E501,RST201,RST203,RST301,W503
max-line-length = 80
max-complexity = 10
docstring-convention = google
per-file-ignores = tests/*:S101
per-file-ignores = tests/*:S101,D100,D101,D102,D103,D104 exceptions.py:D107
rst-roles = class,const,func,meth,mod,ref
rst-directives = deprecated
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
interval: weekly
- package-ecosystem: pip
directory: "/.github/workflows"
schedule:
interval: daily
interval: weekly
- package-ecosystem: pip
directory: "/docs"
schedule:
interval: daily
interval: weekly
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
interval: weekly
versioning-strategy: lockfile-only
allow:
- dependency-type: "all"
10 changes: 5 additions & 5 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip==22.1.2
nox==2022.1.7
nox-poetry==1.0.0
poetry==1.1.13
virtualenv==20.14.1
pip==23.2.1
nox==2022.8.7
nox-poetry==1.0.2
poetry==1.6.1
virtualenv==20.25.0
5 changes: 4 additions & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ on:
jobs:
labeler:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v4.0.0
uses: crazy-max/ghaction-github-labeler@v4.2.0
with:
skip-delete: true
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
release:
name: Release
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Check out the repository
Expand All @@ -17,9 +20,9 @@ jobs:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4.6.3
with:
python-version: "3.10"
python-version: "3.12"

- name: Upgrade pip
run: |
Expand All @@ -39,7 +42,7 @@ jobs:
- name: Detect and tag new version
id: check-version
if: steps.check-parent-commit.outputs.sha
uses: salsify/action-detect-and-tag-new-version@v2.0.1
uses: salsify/action-detect-and-tag-new-version@v2.0.3
with:
version-command: |
bash -o pipefail -c "poetry version | awk '{ print \$2 }'"
Expand All @@ -57,21 +60,21 @@ jobs:
- name: Publish package on PyPI
if: steps.check-version.outputs.tag
uses: pypa/gh-action-pypi-publish@v1.5.0
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Publish package on TestPyPI
if: "! steps.check-version.outputs.tag"
uses: pypa/gh-action-pypi-publish@v1.5.0
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish the release notes
uses: release-drafter/release-drafter@v5.20.0
uses: release-drafter/release-drafter@v5.23.0
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ jobs:
fail-fast: false
matrix:
include:
- { python: "3.10", os: "ubuntu-latest", session: "pre-commit" }
- { python: "3.10", os: "ubuntu-latest", session: "safety" }
- { python: "3.12", os: "ubuntu-latest", session: "pre-commit" }
- { python: "3.12", os: "ubuntu-latest", session: "safety" }
- { python: "3.12", os: "ubuntu-latest", session: "mypy" }
- { python: "3.11", os: "ubuntu-latest", session: "mypy" }
- { python: "3.10", os: "ubuntu-latest", session: "mypy" }
- { python: "3.9", os: "ubuntu-latest", session: "mypy" }
- { python: "3.8", os: "ubuntu-latest", session: "mypy" }
- { python: "3.7", os: "ubuntu-latest", session: "mypy" }
- { python: "3.12", os: "ubuntu-latest", session: "tests" }
- { python: "3.11", os: "ubuntu-latest", session: "tests" }
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
- { python: "3.9", os: "ubuntu-latest", session: "tests" }
- { python: "3.8", os: "ubuntu-latest", session: "tests" }
- { python: "3.7", os: "ubuntu-latest", session: "tests" }
- { python: "3.10", os: "windows-latest", session: "tests" }
- { python: "3.10", os: "macos-latest", session: "tests" }
- { python: "3.10", os: "ubuntu-latest", session: "typeguard" }
- { python: "3.10", os: "ubuntu-latest", session: "xdoctest" }
- { python: "3.10", os: "ubuntu-latest", session: "docs-build" }
- { python: "3.12", os: "windows-latest", session: "tests" }
- { python: "3.12", os: "macos-latest", session: "tests" }
- { python: "3.12", os: "ubuntu-latest", session: "typeguard" }
- { python: "3.12", os: "ubuntu-latest", session: "xdoctest" }
- { python: "3.12", os: "ubuntu-latest", session: "docs-build" }

env:
NOXSESSION: ${{ matrix.session }}
Expand All @@ -38,7 +38,7 @@ jobs:
uses: actions/checkout@v3

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

Expand Down Expand Up @@ -117,9 +117,9 @@ jobs:
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4.6.1
with:
python-version: "3.10"
python-version: "3.12"

- name: Upgrade pip
run: |
Expand Down Expand Up @@ -151,4 +151,4 @@ jobs:
nox --session=coverage -- xml
- name: Upload coverage report
uses: codecov/codecov-action@v3.1.0
uses: codecov/codecov-action@v3.1.4
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
repos:
- repo: local
hooks:
- id: bandit
name: bandit
entry: bandit
language: system
types: [python]
require_serial: true
args: ["-c", "bandit.yml"]
- id: black
name: black
entry: black
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: "3.10"
python: "3.12"
sphinx:
configuration: docs/conf.py
formats: all
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Request features on the [Issue Tracker].

## How to set up your development environment

You need Python 3.7+ and the following tools:
You need Python 3.9+ and the following tools:

- [Poetry]
- [Nox]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright © 2022 Kyle Oliver
Copyright © 2024 Kyle Oliver

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# btd6
# Btd6

[![PyPI](https://img.shields.io/pypi/v/btd6.svg)][pypi_]
[![Status](https://img.shields.io/pypi/status/btd6.svg)][status]
[![Python Version](https://img.shields.io/pypi/pyversions/btd6)][python version]
[![PyPI](https://img.shields.io/pypi/v/btd6.svg)][pypi status]
[![Status](https://img.shields.io/pypi/status/btd6.svg)][pypi status]
[![Python Version](https://img.shields.io/pypi/pyversions/btd6)][pypi status]
[![License](https://img.shields.io/pypi/l/btd6)][license]

[![Read the documentation at https://btd6.readthedocs.io/](https://img.shields.io/readthedocs/btd6/latest.svg?label=Read%20the%20Docs)][read the docs]
Expand All @@ -12,9 +12,7 @@
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]

[pypi_]: https://pypi.org/project/btd6/
[status]: https://pypi.org/project/btd6/
[python version]: https://pypi.org/project/btd6
[pypi status]: https://pypi.org/project/btd6/
[read the docs]: https://btd6.readthedocs.io/
[tests]: https://github.com/56kyle/btd6/actions?workflow=Tests
[codecov]: https://app.codecov.io/gh/56kyle/btd6
Expand All @@ -31,7 +29,7 @@

## Installation

You can install _btd6_ via [pip] from [PyPI]:
You can install _Btd6_ via [pip] from [PyPI]:

```console
$ pip install btd6
Expand All @@ -49,7 +47,7 @@ To learn more, see the [Contributor Guide].
## License

Distributed under the terms of the [MIT license][license],
_btd6_ is free and open source software.
_Btd6_ is free and open source software.

## Issues

Expand Down
2 changes: 2 additions & 0 deletions bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
assert_used:
skips: ["*/test_*.py"]
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Sphinx configuration."""
project = "btd6"

project = "Btd6"
author = "Kyle Oliver"
copyright = "2022, Kyle Oliver"
copyright = "2024, Kyle Oliver"
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
Expand Down
8 changes: 4 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
furo==2022.4.7
sphinx==4.5.0
sphinx-click==4.1.0
myst_parser==0.17.2
furo==2022.12.7
sphinx==5.3.0
sphinx-click==4.4.0
myst_parser==0.18.1
7 changes: 4 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Nox sessions."""

import os
import shlex
import shutil
Expand All @@ -23,7 +24,7 @@


package = "btd6"
python_versions = ["3.10", "3.9", "3.8", "3.7"]
python_versions = ["3.12", "3.11", "3.10", "3.9"]
nox.needs_version = ">= 2021.6.6"
nox.options.sessions = (
"pre-commit",
Expand All @@ -46,7 +47,7 @@ def activate_virtualenv_in_precommit_hooks(session: Session) -> None:
Args:
session: The Session object.
"""
assert session.bin is not None # noqa: S101
assert session.bin is not None # nosec

# Only patch hooks containing a reference to this session's bindir. Support
# quoting rules for Python and bash, but strip the outermost quotes so we
Expand Down Expand Up @@ -120,10 +121,10 @@ def precommit(session: Session) -> None:
"--show-diff-on-failure",
]
session.install(
"bandit",
"black",
"darglint",
"flake8",
"flake8-bandit",
"flake8-bugbear",
"flake8-docstrings",
"flake8-rst-docstrings",
Expand Down
Loading

0 comments on commit 3eb226f

Please sign in to comment.