Update README to reflect current tooling and best practices - #1
Merged
Conversation
- Fix DOI badge to use {github_id} placeholder instead of hardcoded ID
- Drop stale commented-out black/isort badges; add a ruff badge to
match the actual pre-commit configuration
- Fix typos and shouty caps; switch code fences to triple-backticks
- Replace insecure jupyter command (auth disabled, bound to all
interfaces) with the safe default
- Note GNU vs macOS sed -i portability for the rename one-liner
- Bump example python version from 3.10 to 3.12
- Tighten and de-duplicate the Documentation, Tests, and Linting
sections; rename Linting -> Linting and Formatting since ruff
handles both
- Note that mypy is not wired into pre-commit
- Link the citation-file-format docs from the Citation section
Workflow (.github/workflows/python-app.yml): - Bump actions/checkout v2 -> v4 and actions/setup-python v2 -> v5 - Bump example python from 3.10 to 3.12, enable pip cache - Drop unused flake8 install - Collapse the duplicate plain pytest run; the coverage run already exercises the same tests Pre-commit (.pre-commit-config.yaml): - Bump pre-commit-hooks v4.3.0 -> v5.0.0 - Remove duplicate check-yaml entry - Drop unmaintained pydocstyle hook (covered by ruff's pydocstyle rules) - Drop blacken-docs pinned to black==20.8b1 (ruff-format handles docstring code blocks) - Drop pygrep-hooks python-use-type-annotations (also covered by ruff) - Bump yamllint v1.28.0 -> v1.35.1
- Replace `from my_package import *` placeholder in tests/test_example.py with a plain `import my_package` (with a noqa for the unused-import rule, since this is a template stub) - Apply ruff-format and trailing-whitespace / end-of-file fixes across docs/conf.py, my_package/__init__.py, pyproject.toml, and the tests package, so a fresh `pre-commit run --all-files` is green
The license file was previously deleted, but pyproject.toml's
`license = {file = "LICENSE.md"}` and a link in docs/index.rst still
referenced it. Restore the file as a clearly-marked placeholder so the
package builds and the docs link resolves, while making it obvious that
the user must replace it with a real license before publishing.
Also add a step to the README setup checklist directing the user to
swap in their chosen license and update pyproject.toml.
Three lightweight additions to keep a forked template healthy without demanding active maintenance: - .github/dependabot.yml: weekly PRs for outdated GitHub Actions and pip dependencies (limit 5 open PRs each). - .github/workflows/pre-commit.yml: runs `pre-commit run --all-files` on push and PR to main so lint/format are enforced in CI, not only locally. - .github/workflows/codeql.yml: GitHub's CodeQL static analysis on push, PR, and a weekly Monday schedule, surfacing findings in the Security tab. Document all three in a new CI/CD section of the README.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
match the actual pre-commit configuration
interfaces) with the safe default
sections; rename Linting -> Linting and Formatting since ruff
handles both