Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mdformat for MD files #113

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
File renamed without changes.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

Expand Down Expand Up @@ -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
48 changes: 30 additions & 18 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,48 @@ Example `version number`
## Process

- Set release variables:

export VERSION=<version number>
export PREVIOUS=<previous version number>
export ORG="scientific-python"
export REPO="lazy-loader"
export LOG="CHANGELOG.md"

```bash
export VERSION=<version number>
export PREVIOUS=<previous version number>
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
Expand All @@ -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
```