Skip to content

Commit

Permalink
ci: validate project metadata (#8973)
Browse files Browse the repository at this point in the history
## Summary

As per #8943 (comment),
adding a CI step to validate project metadata. Documentation for the
tool: https://validate-pyproject.readthedocs.io/en/stable/readme.html.
`store` is an extra that uses [this
package](https://github.com/henryiii/validate-pyproject-schema-store) to
get a weekly update of the schema in SchemaStore.

## Test Plan

Step passes on CI, and testing the same command locally while
voluntarily using a wrong classifier fails:
```console
$ uvx --from 'validate-pyproject[all,store]' validate-pyproject pyproject.toml
Invalid file: pyproject.toml
[ERROR] `project.classifiers[5]` must be trove-classifier
```
  • Loading branch information
mkniewallner authored Nov 9, 2024
1 parent 8a3e5d4 commit ecb3e98
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ jobs:
- name: "Python type check"
run: uvx mypy

- name: "Validate project metadata"
run: uvx --from 'validate-pyproject[all,store]' validate-pyproject pyproject.toml

- name: "Lint shell scripts"
uses: ludeeus/[email protected]
env:
Expand Down

0 comments on commit ecb3e98

Please sign in to comment.