Skip to content

Commit

Permalink
👽 Apply changes from cookiecutter-python-cli-app
Browse files Browse the repository at this point in the history
  • Loading branch information
sgraaf committed Jun 13, 2024
1 parent f7ce8ab commit fccbc19
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/input-for-demo.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cookiecutter-python-package-demo
Cookiecutter Python Package Demo


Demo of https://github.com/sgraaf/cookiecutter-python-package.
Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.3
rev: 0.28.5
hooks:
- id: check-dependabot
- id: check-github-workflows
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.4.4
rev: v0.4.8
hooks:
- id: ruff
args:
Expand All @@ -34,3 +34,4 @@ repos:
rev: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies: ["prettier@3.1.0"]
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

[![Supported Python Versions](https://img.shields.io/badge/python-3.8%20|%203.9%20|%203.10%20|%203.11%20|%203.12-blue)](https://github.com/sgraaf/cookiecutter-python-package)
[![Nox](https://img.shields.io/badge/%F0%9F%A6%8A-Nox-D85E00.svg)](https://github.com/wntrblm/nox)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Code style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/format.json)](https://github.com/astral-sh/ruff)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

Expand Down
6 changes: 3 additions & 3 deletions cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"project_name": "python-project",
"friendly_name": "Python Package",
"project_name": "{{ cookiecutter.friendly_name | slugify }}",
"package_name": "{{ cookiecutter.project_name.replace('-', '_').lower() }}",
"friendly_name": "{{ cookiecutter.project_name.replace('-', ' ').title() }}",
"short_description": "{{ cookiecutter.friendly_name }} is a Python package for ...",
"author": "",
"email": "",
Expand Down Expand Up @@ -29,9 +29,9 @@
"init_git": [true, false],
"init_venv": [true, false],
"__prompts__": {
"friendly_name": "The friendly name of your project (for use in documentation, etc.)",
"project_name": "The name (slug) of your project",
"package_name": "The name of your package",
"friendly_name": "The friendly name of your project (for use in documentation, etc.)",
"short_description": "A short description of your projec",
"author": "Your (full) name",
"email": "Your e-mail address",
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tool.ruff]
lint.select = ["ALL"]
lint.ignore = [
"E501", # line too long, handled by black
"COM", # flake8-commas, handled by black
"E501", # line too long, handled by ruff-format
"COM", # flake8-commas, handled by ruff-format
"CPY", # flake8-copyright
"ISC001", # single-line-implicit-string-concatenation
"INP", # flake8-no-pep420
Expand Down
9 changes: 5 additions & 4 deletions {{ cookiecutter.project_name }}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.17
rev: v0.18
hooks:
- id: validate-pyproject
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.3
rev: 0.28.5
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.4.4
rev: v0.4.8
hooks:
- id: ruff
args:
Expand All @@ -42,10 +42,11 @@ repos:
hooks:
- id: mypy
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies: ["prettier@3.1.0"]
8 changes: 6 additions & 2 deletions {{ cookiecutter.project_name }}/docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"""Sphinx configuration."""

from __future__ import annotations

import sys
from pathlib import Path
from typing import Any

sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
import {{ cookiecutter.package_name }} # noqa: E402
Expand Down Expand Up @@ -47,6 +51,6 @@

html_theme = "furo"
html_static_path = ["_static"]
html_theme_options = {
"top_of_page_button": None,
html_theme_options: dict[str, Any] = {
"top_of_page_buttons": [],
}
4 changes: 2 additions & 2 deletions {{ cookiecutter.project_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ name = "{{ cookiecutter.package_name }}"
[tool.ruff]
lint.select = ["ALL"]
lint.ignore = [
"E501", # line too long, handled by black (pycodestyle)
"E501", # line too long (pycodestyle), handled by ruff-format
"ANN003", # missing-type-kwargs (flake8-annotations)
"ANN101", # missing-type-self (flake8-annotations)
"ANN102", # missing-type-cls (flake8-annotations)
"ANN401", # any-type (flake8-annotations)
"COM", # flake8-commas, handled by black
"COM", # flake8-commas, handled by ruff-format
"CPY", # flake8-copyright
"ISC001", # single-line-implicit-string-concatenation (flake8-implicit-str-concat)
"INP", # flake8-no-pep420
Expand Down

1 comment on commit fccbc19

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.