pyscaffoldext-pre-commit-ruff 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. pyscaffoldext_pre_commit_ruff-1.0.0/.cirrus.yml +195 -0
  2. pyscaffoldext_pre_commit_ruff-1.0.0/.coveragerc +28 -0
  3. pyscaffoldext_pre_commit_ruff-1.0.0/.github/workflows/publish-package.yml +188 -0
  4. pyscaffoldext_pre_commit_ruff-1.0.0/.gitignore +54 -0
  5. pyscaffoldext_pre_commit_ruff-1.0.0/.pre-commit-config.yaml +45 -0
  6. pyscaffoldext_pre_commit_ruff-1.0.0/.readthedocs.yml +27 -0
  7. pyscaffoldext_pre_commit_ruff-1.0.0/AUTHORS.rst +5 -0
  8. pyscaffoldext_pre_commit_ruff-1.0.0/CHANGELOG.rst +57 -0
  9. pyscaffoldext_pre_commit_ruff-1.0.0/CONTRIBUTING.rst +342 -0
  10. pyscaffoldext_pre_commit_ruff-1.0.0/LICENSE.txt +21 -0
  11. pyscaffoldext_pre_commit_ruff-1.0.0/PKG-INFO +87 -0
  12. pyscaffoldext_pre_commit_ruff-1.0.0/README.rst +61 -0
  13. pyscaffoldext_pre_commit_ruff-1.0.0/docs/Makefile +29 -0
  14. pyscaffoldext_pre_commit_ruff-1.0.0/docs/_static/.gitignore +1 -0
  15. pyscaffoldext_pre_commit_ruff-1.0.0/docs/authors.rst +2 -0
  16. pyscaffoldext_pre_commit_ruff-1.0.0/docs/changelog.rst +2 -0
  17. pyscaffoldext_pre_commit_ruff-1.0.0/docs/conf.py +286 -0
  18. pyscaffoldext_pre_commit_ruff-1.0.0/docs/contributing.rst +1 -0
  19. pyscaffoldext_pre_commit_ruff-1.0.0/docs/index.rst +43 -0
  20. pyscaffoldext_pre_commit_ruff-1.0.0/docs/license.rst +7 -0
  21. pyscaffoldext_pre_commit_ruff-1.0.0/docs/readme.rst +2 -0
  22. pyscaffoldext_pre_commit_ruff-1.0.0/docs/requirements.txt +6 -0
  23. pyscaffoldext_pre_commit_ruff-1.0.0/environment.yml +9 -0
  24. pyscaffoldext_pre_commit_ruff-1.0.0/pyproject.toml +43 -0
  25. pyscaffoldext_pre_commit_ruff-1.0.0/setup.cfg +99 -0
  26. pyscaffoldext_pre_commit_ruff-1.0.0/setup.py +22 -0
  27. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext/pre_commit_ruff/__init__.py +12 -0
  28. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext/pre_commit_ruff/extension.py +139 -0
  29. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext/pre_commit_ruff/templates/__init__.py +17 -0
  30. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext/pre_commit_ruff/templates/pre-commit-ruff-config.template +37 -0
  31. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext/pre_commit_ruff/templates/pyproject_toml.template +30 -0
  32. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext/pre_commit_ruff/templates/setup_cfg.template +9 -0
  33. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext_pre_commit_ruff.egg-info/PKG-INFO +87 -0
  34. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext_pre_commit_ruff.egg-info/SOURCES.txt +43 -0
  35. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext_pre_commit_ruff.egg-info/dependency_links.txt +1 -0
  36. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext_pre_commit_ruff.egg-info/entry_points.txt +2 -0
  37. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext_pre_commit_ruff.egg-info/not-zip-safe +1 -0
  38. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext_pre_commit_ruff.egg-info/requires.txt +11 -0
  39. pyscaffoldext_pre_commit_ruff-1.0.0/src/pyscaffoldext_pre_commit_ruff.egg-info/top_level.txt +1 -0
  40. pyscaffoldext_pre_commit_ruff-1.0.0/tests/__init__.py +1 -0
  41. pyscaffoldext_pre_commit_ruff-1.0.0/tests/conftest.py +29 -0
  42. pyscaffoldext_pre_commit_ruff-1.0.0/tests/helpers.py +125 -0
  43. pyscaffoldext_pre_commit_ruff-1.0.0/tests/test_custom_extension.py +81 -0
  44. pyscaffoldext_pre_commit_ruff-1.0.0/tox.ini +74 -0
@@ -0,0 +1,195 @@
1
+ # Cirrus CI configuration file using the matrix feature
2
+ # Read more under:
3
+ # - https://cirrus-ci.org/guide/quick-start/
4
+ # - https://cirrus-ci.org/guide/writing-tasks/
5
+ # THIS FILE IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!
6
+
7
+ ---
8
+ # ---- Default values to be merged into tasks ----
9
+
10
+ env:
11
+ LC_ALL: C
12
+ LC_CTYPE: UTF-8
13
+ LANG: C
14
+ PIP_CACHE_DIR: ${CIRRUS_WORKING_DIR}/.cache/pip
15
+ PRE_COMMIT_HOME: ${CIRRUS_WORKING_DIR}/.cache/pre-commit
16
+ CIRRUS_ARTIFACT_URL: https://api.cirrus-ci.com/v1/artifact/build/${CIRRUS_BUILD_ID}
17
+ # Coveralls configuration
18
+ CI_NAME: cirrus-ci
19
+ CI_BRANCH: ${CIRRUS_BRANCH}
20
+ CI_PULL_REQUEST: ${CIRRUS_PR}
21
+ CI_BUILD_NUMBER: ${CIRRUS_BUILD_ID}
22
+ CI_BUILD_URL: https://cirrus-ci.com/build/${CIRRUS_BUILD_ID}
23
+ COVERALLS_PARALLEL: "true"
24
+ COVERALLS_FLAG_NAME: ${CIRRUS_TASK_NAME}
25
+ # TODO: You will also need to set `COVERALLS_REPO_TOKEN` to work with coveralls.
26
+ # We recommend that you do that via Cirrus CI web interface via
27
+ # `Environment variable overrides`.
28
+ # See: https://coveralls-python.readthedocs.io/en/latest/usage/index.html
29
+
30
+ # ---- Templates ----
31
+
32
+ .task_template: &task-template
33
+ debug_information_script:
34
+ - echo "$(which python) -- $(python -VV)"
35
+ - echo "$(which pip) -- $(pip -VV)"
36
+ - python -c 'import os, sys; print(os.name, sys.platform, getattr(sys, "abiflags", None))'
37
+ prepare_script: # avoid git failing with setuptools-scm
38
+ - git config --global user.email "you@example.com"
39
+ - git config --global user.name "Your Name"
40
+ pip_cache:
41
+ folder: "${CIRRUS_WORKING_DIR}/.cache/pip"
42
+ fingerprint_script: echo "${CIRRUS_OS}-${CIRRUS_TASK_NAME}"
43
+ reupload_on_changes: true
44
+ pre_commit_cache:
45
+ folder: "${CIRRUS_WORKING_DIR}/.cache/pre-commit"
46
+ fingerprint_script: echo "${CIRRUS_OS}-${CIRRUS_TASK_NAME}" | cat - .pre-commit-config.yaml
47
+ reupload_on_changes: true
48
+
49
+ .test_template: &test-template
50
+ # Requires pip, tox, and pipx to be installed via OS/pip
51
+ alias: test
52
+ depends_on: [build]
53
+ <<: *task-template
54
+ download_artifact_script: &download-artifact
55
+ - curl -L -O ${CIRRUS_ARTIFACT_URL}/build/upload/dist.tar.gz
56
+ - tar xzf dist.tar.gz
57
+ - rm dist.tar.gz
58
+ test_script:
59
+ - tox --installpkg dist/*.whl -- -rfEx --durations 10 --color yes
60
+ submit_coverage_script:
61
+ - pipx run coverage xml -o coverage.xml
62
+ - pipx run 'coveralls<4' --submit coverage.xml
63
+ # ^-- https://github.com/TheKevJames/coveralls-python/issues/434
64
+
65
+ # Deep clone script for POSIX environments (required for setuptools-scm)
66
+ .clone_script: &clone |
67
+ if [ -z "$CIRRUS_PR" ]; then
68
+ git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
69
+ git reset --hard $CIRRUS_CHANGE_IN_REPO
70
+ else
71
+ git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
72
+ git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
73
+ git reset --hard $CIRRUS_CHANGE_IN_REPO
74
+ fi
75
+
76
+ # ---- CI Pipeline ----
77
+
78
+ build_task:
79
+ name: build and check (Linux - 3.11)
80
+ alias: build
81
+ container: {image: "python:3.11-bullseye"}
82
+ clone_script: *clone
83
+ <<: *task-template
84
+ install_script: pip install tox pre-commit
85
+ check_script:
86
+ - pre-commit run --all-files --show-diff-on-failure --color always
87
+ build_script:
88
+ - tox -e clean,build
89
+ - tar czf dist.tar.gz dist
90
+ upload_artifacts:
91
+ path: dist.tar.gz
92
+
93
+ linux_task:
94
+ matrix:
95
+ - name: test (Linux - 3.8)
96
+ container: {image: "python:3.8-bookworm"}
97
+ - name: test (Linux - 3.10)
98
+ container: {image: "python:3.10-bookworm"}
99
+ skip: $BRANCH !=~ "^(main|master)$"
100
+ - name: test (Linux - 3.12)
101
+ container: {image: "python:3.12-bookworm"}
102
+ # - name: test (Linux - 3.13)
103
+ # container: {image: "python:3.13-rc-bookworm"}
104
+ # allow_failures: true # Experimental
105
+ install_script:
106
+ - python -m pip install --upgrade pip tox pipx
107
+ <<: *test-template
108
+ alias: base-test
109
+
110
+ mamba_task:
111
+ name: test (Linux - mambaforge)
112
+ container: {image: "condaforge/mambaforge"}
113
+ install_script: # Overwrite template
114
+ - mamba install -y pip pipx tox curl
115
+ <<: *test-template
116
+ depends_on: [base-test]
117
+
118
+ macos_task:
119
+ name: test (macOS - brew)
120
+ macos_instance:
121
+ image: ghcr.io/cirruslabs/macos-runner:sonoma
122
+ env:
123
+ PATH: "/opt/homebrew/opt/python/libexec/bin:${PATH}"
124
+ brew_cache: {folder: "$HOME/Library/Caches/Homebrew"}
125
+ install_script: brew install python tox pipx
126
+ <<: *test-template
127
+ depends_on: [build, base-test]
128
+
129
+ freebsd_task:
130
+ name: test (freebsd - 3.11)
131
+ freebsd_instance: {image_family: freebsd-14-0}
132
+ install_script:
133
+ - pkg remove -y python lang/python
134
+ - pkg install -y git python311 py311-pip py311-gdbm py311-sqlite3 py311-tox py311-tomli py311-pipx
135
+ - ln -s /usr/local/bin/python3.11 /usr/local/bin/python
136
+ <<: *test-template
137
+ depends_on: [build, base-test]
138
+
139
+ windows_task:
140
+ name: test (Windows - 3.12.5)
141
+ windows_container:
142
+ image: "cirrusci/windowsservercore:2019"
143
+ os_version: 2019
144
+ env:
145
+ CIRRUS_SHELL: bash
146
+ PATH: /c/Python312:/c/Python312/Scripts:/c/tools:${PATH}
147
+ install_script:
148
+ # Activate long file paths to avoid some errors
149
+ - ps: New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
150
+ - choco install -y --no-progress python3 --version=3.12.5 --params "/NoLockdown"
151
+ - choco install -y --no-progress curl
152
+ - pip install --upgrade certifi
153
+ - python -m pip install -U pip tox pipx
154
+ <<: *test-template
155
+ depends_on: [build, base-test]
156
+
157
+ finalize_task:
158
+ container: {image: "python:3.10-bullseye"}
159
+ depends_on: [test]
160
+ <<: *task-template
161
+ install_script: pip install 'coveralls<4'
162
+ # ^-- https://github.com/TheKevJames/coveralls-python/issues/434
163
+ finalize_coverage_script: coveralls --finish
164
+
165
+ linkcheck_task:
166
+ name: linkcheck (Linux - 3.10)
167
+ only_if: $BRANCH =~ "^(main|master)$"
168
+ container: {image: "python:3.10-bullseye"}
169
+ depends_on: [finalize]
170
+ allow_failures: true
171
+ <<: *task-template
172
+ install_script: pip install tox
173
+ download_artifact_script: *download-artifact
174
+ linkcheck_script: tox --installpkg dist/*.whl -e linkcheck -- -q
175
+
176
+ publish_task:
177
+ name: publish (Linux - 3.10)
178
+ container: {image: "python:3.10-bookworm"}
179
+ depends_on: [build, base-test, test]
180
+ only_if: $CIRRUS_TAG =~ 'v\d.*' && $CIRRUS_USER_PERMISSION == "admin"
181
+ <<: *task-template
182
+ env:
183
+ TWINE_REPOSITORY: pypi
184
+ TWINE_USERNAME: __token__
185
+ TWINE_PASSWORD: $PYPI_TOKEN
186
+ # TODO: You can set a `environment variable override` for PYPI_TOKEN
187
+ # in Cirrus CI web interface using an encrypted variable.
188
+ # See:
189
+ # - https://pypi.org/help/#apitoken
190
+ # - https://cirrus-ci.org/guide/writing-tasks/#encrypted-variables
191
+ install_script: pip install tox
192
+ download_artifact_script: *download-artifact
193
+ publish_script:
194
+ - ls dist/*
195
+ - tox -e publish
@@ -0,0 +1,28 @@
1
+ # .coveragerc to control coverage.py
2
+ [run]
3
+ branch = True
4
+ source = pyscaffoldext.pre_commit_ruff
5
+ # omit = bad_file.py
6
+
7
+ [paths]
8
+ source =
9
+ src/
10
+ */site-packages/
11
+
12
+ [report]
13
+ # Regexes for lines to exclude from consideration
14
+ exclude_lines =
15
+ # Have to re-enable the standard pragma
16
+ pragma: no cover
17
+
18
+ # Don't complain about missing debug-only code:
19
+ def __repr__
20
+ if self\.debug
21
+
22
+ # Don't complain if tests don't hit defensive assertion code:
23
+ raise AssertionError
24
+ raise NotImplementedError
25
+
26
+ # Don't complain if non-runnable code isn't run:
27
+ if 0:
28
+ if __name__ == .__main__.:
@@ -0,0 +1,188 @@
1
+ # GitHub Actions configuration **EXAMPLE**,
2
+ # MODIFY IT ACCORDING TO YOUR NEEDS!
3
+ # Reference: https://docs.github.com/en/actions
4
+
5
+ name: Test and Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
6
+
7
+ on:
8
+ push:
9
+ # Avoid using all the resources/limits available by checking only
10
+ # relevant branches and tags. Other branches can be checked via PRs.
11
+ branches: [main]
12
+ tags: ["v[0-9]*", "[0-9]+.[0-9]+*"] # Match tags that resemble a version
13
+ pull_request: # Run in every PR
14
+ workflow_dispatch: # Allow manually triggering the workflow
15
+ schedule:
16
+ # Run roughly every 15 days at 00:00 UTC
17
+ # (useful to check if updates on dependencies break the package)
18
+ - cron: "0 0 1,16 * *"
19
+
20
+ permissions:
21
+ contents: read
22
+
23
+ concurrency:
24
+ group: >-
25
+ ${{ github.workflow }}-${{ github.ref_type }}-
26
+ ${{ github.event.pull_request.number || github.sha }}
27
+ cancel-in-progress: true
28
+
29
+ jobs:
30
+ prepare:
31
+ runs-on: ubuntu-latest
32
+ outputs:
33
+ wheel-distribution: ${{ steps.wheel-distribution.outputs.path }}
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+ with: { fetch-depth: 0 } # deep clone for setuptools-scm
37
+ - uses: actions/setup-python@v5
38
+ id: setup-python
39
+ with: { python-version: "3.10" }
40
+ - name: Run static analysis and format checkers
41
+ run: pipx run pre-commit run --all-files --show-diff-on-failure
42
+ - name: Build package distribution files 📦
43
+ run: >-
44
+ pipx run --python '${{ steps.setup-python.outputs.python-path }}'
45
+ tox -e clean,build
46
+ - name: Record the path of wheel distribution
47
+ id: wheel-distribution
48
+ run: echo "path=$(ls dist/*.whl)" >> $GITHUB_OUTPUT
49
+ - name: Store the distribution files for use in other stages
50
+ # `tests` and `publish` will use the same pre-built distributions,
51
+ # so we make sure to release the exact same package that was tested
52
+ uses: actions/upload-artifact@v4
53
+ with:
54
+ name: python-distribution-files
55
+ path: dist/
56
+ retention-days: 1
57
+
58
+ test:
59
+ needs: prepare
60
+ strategy:
61
+ matrix:
62
+ python:
63
+ - "3.9" # oldest Python supported by PSF
64
+ - "3.13" # newest Python that is stable
65
+ platform:
66
+ - ubuntu-latest
67
+ # - macos-latest
68
+ # - windows-latest
69
+ runs-on: ${{ matrix.platform }}
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+ - name: Setup git user
73
+ run: |
74
+ git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
75
+ git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
76
+ - uses: actions/setup-python@v5
77
+ id: setup-python
78
+ with:
79
+ python-version: ${{ matrix.python }}
80
+ - uses: rhysd/action-setup-vim@v1.3.5
81
+ - name: Retrieve pre-built distribution files
82
+ uses: actions/download-artifact@v4
83
+ with: { name: python-distribution-files, path: dist/ }
84
+ - name: Run tests
85
+ run: >-
86
+ pipx run --python '${{ steps.setup-python.outputs.python-path }}'
87
+ tox --installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
88
+ -e '${{ matrix.python }}' -- -rFEx --durations 10 --color yes -vv # pytest args
89
+ - name: Generate coverage report
90
+ run: pipx run coverage lcov -o coverage.lcov
91
+ - name: Coveralls GitHub Action
92
+ uses: coverallsapp/github-action@v2.3.4
93
+ with:
94
+ path-to-lcov: coverage.lcov
95
+ github-token: ${{ secrets.GITHUB_TOKEN }}
96
+ flag-name: ${{ matrix.platform }} - py${{ matrix.python }}
97
+ parallel: true
98
+
99
+ finalize:
100
+ needs: test
101
+ runs-on: ubuntu-latest
102
+ steps:
103
+ - name: Finalize coverage report
104
+ uses: coverallsapp/github-action@v2.3.4
105
+ with:
106
+ github-token: ${{ secrets.GITHUB_TOKEN }}
107
+ parallel-finished: true
108
+
109
+ publish-to-testpypi:
110
+ name: Publish Python 🐍 distribution 📦 to TestPyPI
111
+ needs: finalize
112
+ if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
113
+ runs-on: ubuntu-latest
114
+
115
+ environment:
116
+ name: testpypi
117
+ url: https://test.pypi.org/p/panvimwiki
118
+
119
+ permissions:
120
+ id-token: write # IMPORTANT: mandatory for trusted publishing
121
+
122
+ steps:
123
+ - name: Retrieve pre-built distribution files
124
+ uses: actions/download-artifact@v4
125
+ with: { name: python-distribution-files, path: dist/ }
126
+ - name: Publish distribution 📦 to TestPyPI
127
+ uses: pypa/gh-action-pypi-publish@release/v1
128
+ with:
129
+ repository-url: https://test.pypi.org/legacy/
130
+
131
+ publish-to-pypi:
132
+ name: >-
133
+ Publish Python 🐍 distribution 📦 to PyPI
134
+ needs: [finalize, publish-to-testpypi]
135
+ if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
136
+ runs-on: ubuntu-latest
137
+ environment:
138
+ name: pypi
139
+ url: https://pypi.org/p/panvimwiki # Replace <package-name> with your PyPI project name
140
+ permissions:
141
+ # contents: write
142
+ id-token: write # IMPORTANT: mandatory for trusted publishing
143
+ steps:
144
+ - name: Retrieve pre-built distribution files
145
+ uses: actions/download-artifact@v4
146
+ with: { name: python-distribution-files, path: dist/ }
147
+ - name: Publish distribution 📦 to PyPI
148
+ uses: pypa/gh-action-pypi-publish@release/v1
149
+ github-release:
150
+ name: >-
151
+ Sign the Python 🐍 distribution 📦 with Sigstore
152
+ and upload them to GitHub Release
153
+ needs:
154
+ - publish-to-pypi
155
+ runs-on: ubuntu-latest
156
+
157
+ permissions:
158
+ contents: write # IMPORTANT: mandatory for making GitHub Releases
159
+ id-token: write # IMPORTANT: mandatory for sigstore
160
+
161
+ steps:
162
+ - name: Download all the dists
163
+ uses: actions/download-artifact@v4
164
+ with: { name: python-distribution-files, path: dist/ }
165
+ - name: Sign the dists with Sigstore
166
+ uses: sigstore/gh-action-sigstore-python@v3.0.0
167
+ with:
168
+ inputs: >-
169
+ ./dist/*.tar.gz
170
+ ./dist/*.whl
171
+ - name: Create GitHub Release
172
+ env:
173
+ GITHUB_TOKEN: ${{ github.token }}
174
+ run: >-
175
+ gh release create
176
+ '${{ github.ref_name }}'
177
+ --repo '${{ github.repository }}'
178
+ --notes ""
179
+ - name: Upload artifact signatures to GitHub Release
180
+ env:
181
+ GITHUB_TOKEN: ${{ github.token }}
182
+ # Upload to GitHub Release using the `gh` CLI.
183
+ # `dist/` contains the built packages, and the
184
+ # sigstore-produced signatures and certificates.
185
+ run: >-
186
+ gh release upload
187
+ '${{ github.ref_name }}' dist/**
188
+ --repo '${{ github.repository }}'
@@ -0,0 +1,54 @@
1
+ # Temporary and binary files
2
+ *~
3
+ *.py[cod]
4
+ *.so
5
+ *.cfg
6
+ !.isort.cfg
7
+ !setup.cfg
8
+ *.orig
9
+ *.log
10
+ *.pot
11
+ __pycache__/*
12
+ .cache/*
13
+ .*.swp
14
+ */.ipynb_checkpoints/*
15
+ .DS_Store
16
+
17
+ # Project files
18
+ .ropeproject
19
+ .project
20
+ .pydevproject
21
+ .settings
22
+ .idea
23
+ .vscode
24
+ tags
25
+
26
+ # Package files
27
+ *.egg
28
+ *.eggs/
29
+ .installed.cfg
30
+ *.egg-info
31
+
32
+ # Unittest and coverage
33
+ htmlcov/*
34
+ .coverage
35
+ .coverage.*
36
+ .tox
37
+ junit*.xml
38
+ coverage.xml
39
+ .pytest_cache/
40
+
41
+ # Build and docs folder/files
42
+ build/*
43
+ dist/*
44
+ sdist/*
45
+ docs/api/*
46
+ docs/_rst/*
47
+ docs/_build/*
48
+ cover/*
49
+ MANIFEST
50
+
51
+ # Per-project virtualenvs
52
+ .venv*/
53
+ .conda*/
54
+ .python-version
@@ -0,0 +1,45 @@
1
+ exclude: "^docs/conf.py"
2
+
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: check-added-large-files
9
+ - id: check-ast
10
+ - id: check-json
11
+ - id: check-merge-conflict
12
+ - id: check-xml
13
+ - id: check-yaml
14
+ - id: debug-statements
15
+ - id: end-of-file-fixer
16
+ - id: requirements-txt-fixer
17
+ - id: mixed-line-ending
18
+ args: ["--fix=auto"] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
19
+
20
+ ## ruff-pre-commit
21
+ - repo: https://github.com/astral-sh/ruff-pre-commit
22
+ # Ruff version.
23
+ rev: v0.7.0
24
+ hooks:
25
+ # Run the linter.
26
+ - id: ruff
27
+ types_or: [python, pyi]
28
+ args: [--fix]
29
+ # Run the formatter.
30
+ - id: ruff-format
31
+ types_or: [python, pyi]
32
+
33
+ ## Check for misspells in documentation files:
34
+ - repo: https://github.com/codespell-project/codespell
35
+ rev: v2.3.0
36
+ hooks:
37
+ - id: codespell
38
+
39
+ ## pre-commit-rst-lint
40
+ - repo: https://github.com/hoefling/pre-commit-rst-lint
41
+ rev: "0ea7c4e56416e3d38012dfcccecd35a7d95bd1dd"
42
+ hooks:
43
+ - id: rst-lint
44
+ exclude: ^docs
45
+ additional_dependencies: [pygments]
@@ -0,0 +1,27 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Build documentation in the docs/ directory with Sphinx
8
+ sphinx:
9
+ configuration: docs/conf.py
10
+
11
+ # Build documentation with MkDocs
12
+ #mkdocs:
13
+ # configuration: mkdocs.yml
14
+
15
+ # Optionally build your docs in additional formats such as PDF
16
+ formats:
17
+ - pdf
18
+
19
+ build:
20
+ os: ubuntu-22.04
21
+ tools:
22
+ python: "3.11"
23
+
24
+ python:
25
+ install:
26
+ - requirements: docs/requirements.txt
27
+ - {path: ., method: pip}
@@ -0,0 +1,5 @@
1
+ ============
2
+ Contributors
3
+ ============
4
+
5
+ * John D. Fisher <jdfenw@gmail.com>
@@ -0,0 +1,57 @@
1
+ Changelog
2
+ =========
3
+
4
+ All notable changes to this project will be documented in this file.
5
+
6
+ The format is based on `Keep a Changelog`_, and this project adheres to
7
+ `Semantic Versioning`_.
8
+
9
+ `Unreleased`_
10
+ -------------
11
+
12
+ Added
13
+ ~~~~~
14
+
15
+ Changed
16
+ ~~~~~~~
17
+
18
+ Removed
19
+ ~~~~~~~
20
+
21
+ `1.0.0`_ - 2024-11-21
22
+ ---------------------
23
+
24
+ .. _added-1:
25
+
26
+ Added
27
+ ~~~~~
28
+
29
+ - Include –pre-commit by default because –pre-commit-ruff extends
30
+ –pre-commit.
31
+ - Add ``ruff`` configuration to ``pyproject.toml`` because ``ruff`` does
32
+ not support ``setup.cfg``.
33
+ - Extend pre-commit template with ``ruff`` lint and fix.
34
+ - Add ``mypy`` configuration to ``setup.cfg`` and template.
35
+
36
+ .. _changed-1:
37
+
38
+ Changed
39
+ ~~~~~~~
40
+
41
+ - Minimum ``tox`` version 4.2.23
42
+ - Adopt ``ruff``, ``ruff-format``, ``codespell``, and ``rst-lint`` for
43
+ project.
44
+
45
+ .. _removed-1:
46
+
47
+ Removed
48
+ ~~~~~~~
49
+
50
+ - ``isort`` configuration
51
+ - ``flake8`` template and configuration
52
+ - ``[testenv:publish]`` in ``tox.ini``
53
+
54
+ .. _Keep a Changelog: https://keepachangelog.com/en/1.0.0/
55
+ .. _Semantic Versioning: https://semver.org/spec/v2.0.0.html
56
+ .. _Unreleased: https://github.com/jfishe/pyscaffoldext-pre-commit-ruff/compare/1.0.0...HEAD
57
+ .. _1.0.0: https://github.com/jfishe/pyscaffoldext-pre-commit-ruff/compare/3e1993e7efea9da6d7e8007317cc6d3ea3333a65...1.0.0