diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2138914..c030c0d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,11 +5,11 @@ version: 2 updates: - - package-ecosystem: "pip" - directory: "/" + - package-ecosystem: pip + directory: / schedule: - interval: "weekly" - - package-ecosystem: "github-actions" - directory: "/" + interval: weekly + - package-ecosystem: github-actions + directory: / schedule: - interval: "weekly" + interval: weekly diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index a51251d..8ba6567 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -1,7 +1,7 @@ name: Check links in Markdown files on: schedule: - - cron: "0 0 * * 1" # midnight every Monday + - cron: 0 0 * * 1 # midnight every Monday push: branches: [main] pull_request: @@ -14,5 +14,5 @@ jobs: - uses: actions/checkout@v4 - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: - use-quiet-mode: "yes" - use-verbose-mode: "yes" + use-quiet-mode: yes + use-verbose-mode: yes diff --git a/.github/workflows/ci-pip-tools.yml b/.github/workflows/ci-pip-tools.yml index d5d6426..1d75f4e 100644 --- a/.github/workflows/ci-pip-tools.yml +++ b/.github/workflows/ci-pip-tools.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: ["3.12"] + python-version: ['3.12'] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci-poetry.yml b/.github/workflows/ci-poetry.yml index d43758f..a3678dd 100644 --- a/.github/workflows/ci-poetry.yml +++ b/.github/workflows/ci-poetry.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: ["3.12"] + python-version: ['3.12'] steps: - uses: actions/checkout@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 43b35b1..63115fb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,23 +5,23 @@ repos: - id: check-merge-conflict - id: trailing-whitespace - id: end-of-file-fixer + - id: pretty-format-json + args: [--autofix, --indent, '4', --no-sort] + - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.14.0 + hooks: + - id: pretty-format-yaml + args: [--autofix, --indent, '2', --offset, '2'] + exclude: '{{ cookiecutter.project_slug }}/.+' - repo: https://github.com/python-jsonschema/check-jsonschema - rev: "0.29.1" + rev: 0.29.1 hooks: - id: check-github-workflows - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.8 - hooks: - - id: prettier - # Prettier supports many other file formats (e.g., JavaScript, HTML; see - # https://prettier.io for list). Add other types here. - types_or: [yaml, json] - exclude: "{{ cookiecutter.project_slug }}/.+" - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.41.0 hooks: - id: markdownlint-fix - exclude: "{{ cookiecutter.project_slug }}" + exclude: '{{ cookiecutter.project_slug }}' - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: diff --git a/cookiecutter.json b/cookiecutter.json index 23d00fd..0a9db92 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -4,7 +4,10 @@ "project_description": "[Description for project.]", "author": "Jane Doe", "author_email": "jane_doe@imperial.ac.uk", - "packaging": ["poetry", "pip-tools"], + "packaging": [ + "poetry", + "pip-tools" + ], "use_bsd3_licence": false, "add_precommit_workflows": true, "automerge_bot_prs": false, diff --git a/{{ cookiecutter.project_slug }}/.github/dependabot.yml b/{{ cookiecutter.project_slug }}/.github/dependabot.yml index 2138914..c030c0d 100644 --- a/{{ cookiecutter.project_slug }}/.github/dependabot.yml +++ b/{{ cookiecutter.project_slug }}/.github/dependabot.yml @@ -5,11 +5,11 @@ version: 2 updates: - - package-ecosystem: "pip" - directory: "/" + - package-ecosystem: pip + directory: / schedule: - interval: "weekly" - - package-ecosystem: "github-actions" - directory: "/" + interval: weekly + - package-ecosystem: github-actions + directory: / schedule: - interval: "weekly" + interval: weekly diff --git a/{{ cookiecutter.project_slug }}/.github/workflows/check-links.yml b/{{ cookiecutter.project_slug }}/.github/workflows/check-links.yml index a51251d..8ba6567 100644 --- a/{{ cookiecutter.project_slug }}/.github/workflows/check-links.yml +++ b/{{ cookiecutter.project_slug }}/.github/workflows/check-links.yml @@ -1,7 +1,7 @@ name: Check links in Markdown files on: schedule: - - cron: "0 0 * * 1" # midnight every Monday + - cron: 0 0 * * 1 # midnight every Monday push: branches: [main] pull_request: @@ -14,5 +14,5 @@ jobs: - uses: actions/checkout@v4 - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: - use-quiet-mode: "yes" - use-verbose-mode: "yes" + use-quiet-mode: yes + use-verbose-mode: yes diff --git a/{{ cookiecutter.project_slug }}/.github/workflows/ci.yml b/{{ cookiecutter.project_slug }}/.github/workflows/ci.yml index 87f5468..09f48cf 100644 --- a/{{ cookiecutter.project_slug }}/.github/workflows/ci.yml +++ b/{{ cookiecutter.project_slug }}/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: {%- endif %} {%- if cookiecutter.use_macos_ci_runner %} - macos-latest{% endif %} - python-version: ["3.12"] + python-version: ['3.12'] steps: - uses: actions/checkout@v4 diff --git a/{{ cookiecutter.project_slug }}/.github/workflows/pre-commit_autoupdate.yml b/{{ cookiecutter.project_slug }}/.github/workflows/pre-commit_autoupdate.yml index 0dd7634..b610641 100644 --- a/{{ cookiecutter.project_slug }}/.github/workflows/pre-commit_autoupdate.yml +++ b/{{ cookiecutter.project_slug }}/.github/workflows/pre-commit_autoupdate.yml @@ -2,7 +2,7 @@ name: Pre-commit auto-update on: schedule: - - cron: "0 0 * * 1" # midnight every Monday + - cron: 0 0 * * 1 # midnight every Monday jobs: auto-update: @@ -16,5 +16,5 @@ jobs: token: ${{ "{{" }} secrets.GITHUB_TOKEN {{ "}}" }} branch: update/pre-commit-hooks title: Update pre-commit hooks - commit-message: "chore: update pre-commit hooks" + commit-message: 'chore: update pre-commit hooks' body: Update versions of pre-commit hooks to latest version. diff --git a/{{ cookiecutter.project_slug }}/.markdownlint.yaml b/{{ cookiecutter.project_slug }}/.markdownlint.yaml index 0c53543..0641225 100644 --- a/{{ cookiecutter.project_slug }}/.markdownlint.yaml +++ b/{{ cookiecutter.project_slug }}/.markdownlint.yaml @@ -1,3 +1,2 @@ ---- # Disable checks here MD013: false diff --git a/{{ cookiecutter.project_slug }}/.pre-commit-config.yaml b/{{ cookiecutter.project_slug }}/.pre-commit-config.yaml index 3ca5b9e..6a6c355 100644 --- a/{{ cookiecutter.project_slug }}/.pre-commit-config.yaml +++ b/{{ cookiecutter.project_slug }}/.pre-commit-config.yaml @@ -6,25 +6,25 @@ repos: - id: debug-statements - id: trailing-whitespace - id: end-of-file-fixer + - id: pretty-format-json + args: [--autofix, --indent, '4', --no-sort] + - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.14.0 + hooks: + - id: pretty-format-yaml + args: [--autofix, --indent, '2', --offset, '2'] - repo: https://github.com/python-jsonschema/check-jsonschema - rev: "0.28.3" + rev: 0.28.3 hooks: - id: check-github-workflows - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.8 - hooks: - - id: prettier - # Prettier supports many other file formats (e.g., JavaScript, HTML; see - # https://prettier.io for list). Add other types here. - types_or: [yaml, json] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.4.4" + rev: v0.4.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.10.0" + rev: v1.10.0 hooks: - id: mypy - repo: https://github.com/igorshubovych/markdownlint-cli diff --git a/{{ cookiecutter.project_slug }}/.vscode/extensions.json b/{{ cookiecutter.project_slug }}/.vscode/extensions.json index 04bd1a4..2d06122 100644 --- a/{{ cookiecutter.project_slug }}/.vscode/extensions.json +++ b/{{ cookiecutter.project_slug }}/.vscode/extensions.json @@ -3,7 +3,6 @@ "ms-python.mypy-type-checker", "ms-python.python", "editorconfig.editorconfig", - "esbenp.prettier-vscode", "davidanson.vscode-markdownlint", "charliermarsh.ruff" ] diff --git a/{{ cookiecutter.project_slug }}/.vscode/settings.json b/{{ cookiecutter.project_slug }}/.vscode/settings.json index 4ccee8d..d4817cc 100644 --- a/{{ cookiecutter.project_slug }}/.vscode/settings.json +++ b/{{ cookiecutter.project_slug }}/.vscode/settings.json @@ -3,8 +3,9 @@ "editor.formatOnSave": true, "editor.defaultFormatter": "charliermarsh.ruff" }, - "editor.rulers": [88], - + "editor.rulers": [ + 88 + ], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true }