diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6113db8..572f716 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: rev: ffb6a759a979008c0e6dff86e39f4745a2d9eac4 # frozen: v3.1.0 hooks: - id: prettier - files: \.(html|md|yml|yaml|toml) + files: \.(html|yml|yaml|toml) args: [--prose-wrap=preserve] - repo: https://github.com/astral-sh/ruff-pre-commit @@ -30,6 +30,14 @@ repos: args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"] - id: ruff-format + - repo: https://github.com/executablebooks/mdformat + rev: 6c1288142f351100fb24babd44aedd20e1599e99 # frozen: 0.7.17 + hooks: + - id: mdformat + additional_dependencies: + - mdformat-gfm + - mdformat_frontmatter + - repo: https://github.com/codespell-project/codespell rev: "193cd7d27cd571f79358af09a8fb8997e54f8fff" # frozen: v2.3.0 hooks: diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/README.md b/README.md index e1f9ec4..43f8914 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Motivation 1. Allow subpackages to be made visible to users without incurring import costs. -2. Allow external libraries to be imported only when used, improving import times. +1. Allow external libraries to be imported only when used, improving import times. For a more detailed discussion, see [the SPEC](https://scientific-python.org/specs/spec-0001/). @@ -140,9 +140,6 @@ the `np` module returned will raise an error on attribute access. Using this feature is not all-or-nothing: One module may rely on one version of numpy, while another module may not set any requirement. -_Note that the requirement must use the package [distribution name][] instead -of the module [import name][]. For example, the `pyyaml` distribution provides +_Note that the requirement must use the package [distribution name](https://packaging.python.org/en/latest/glossary/#term-Distribution-Package) instead +of the module [import name](https://packaging.python.org/en/latest/glossary/#term-Import-Package). For example, the `pyyaml` distribution provides the `yaml` module for import._ - -[distribution name]: https://packaging.python.org/en/latest/glossary/#term-Distribution-Package -[import name]: https://packaging.python.org/en/latest/glossary/#term-Import-Package diff --git a/RELEASE.md b/RELEASE.md index a749d39..d328e80 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -13,38 +13,48 @@ Example `version number` ## Process - Set release variables: - - export VERSION= - export PREVIOUS= - export ORG="scientific-python" - export REPO="lazy-loader" - export LOG="CHANGELOG.md" - + ```bash + export VERSION= + export PREVIOUS= + export ORG="scientific-python" + export REPO="lazy-loader" + export LOG="CHANGELOG.md" + ``` - Autogenerate release notes - changelist ${ORG}/${REPO} v${PREVIOUS} main --version ${VERSION} --config pyproject.toml --out ${VERSION}.md + ```bash + changelist ${ORG}/${REPO} v${PREVIOUS} main --version ${VERSION} --config pyproject.toml --out ${VERSION}.md + ``` - Put the output of the above command at the top of `CHANGELOG.md` - cat ${VERSION}.md | cat - ${LOG} > temp && mv temp ${LOG} + ```bash + cat ${VERSION}.md | cat - ${LOG} > temp && mv temp ${LOG} + ``` - Update `version` in `lazy_loader/__init__.py`. - Commit changes: - git add lazy_loader/__init__.py ${LOG} - git commit -m "Designate ${VERSION} release" + ```bash + git add lazy_loader/__init__.py ${LOG} + git commit -m "Designate ${VERSION} release" + ``` - Tag the release in git: - git tag -s v${VERSION} -m "signed ${VERSION} tag" + ```bash + git tag -s v${VERSION} -m "signed ${VERSION} tag" + ``` If you do not have a gpg key, use -u instead; it is important for Debian packaging that the tags are annotated - Push the new meta-data to github: - git push --tags origin main + ```bash + git push --tags origin main + ``` where `origin` is the name of the `github.com:scientific-python/lazy-loader` repository @@ -58,13 +68,15 @@ Example `version number` - Update https://github.com/scientific-python/lazy-loader/milestones: - - close old milestone - - ensure new milestone exists (perhaps setting due date) + - close old milestone + - ensure new milestone exists (perhaps setting due date) - Update `version` in `lazy_loader/__init__.py`. - Commit changes: - git add lazy_loader/__init__.py - git commit -m 'Bump version' - git push origin main + ```bash + git add lazy_loader/__init__.py + git commit -m 'Bump version' + git push origin main + ```