Skip to content

Commit

Permalink
Move citation.cff validation to pre-commit check (#165)
Browse files Browse the repository at this point in the history
* move citation.cff validation to pre-commit check

* remove cffconvert from dev deps

* update docs

* update lockfile

* update lockfile with new changes
  • Loading branch information
d33bs authored Mar 16, 2024
1 parent 4f4b6da commit f50d42e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 133 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,5 @@ jobs:
run: poetry install --no-interaction --no-ansi
- name: Run sphinx-docs build test
run: poetry run sphinx-build docs/source doctest -W
- name: Run citation file test
run: poetry run cffconvert --validate
- name: Run pytest
run: poetry run pytest
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ repos:
rev: v1.8.0
hooks:
- id: mypy
- repo: https://github.com/citation-file-format/cffconvert
rev: 5295f87c0e261da61a7b919fc754e3a77edd98a7
hooks:
- id: validate-cff
- repo: https://github.com/PyCQA/pylint
rev: v3.0.3
hooks:
Expand Down
1 change: 0 additions & 1 deletion docs/source/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ Automated testing is performed using [GitHub Actions](https://docs.github.com/en
Example test command: `% poetry run pytest`
1. [sphinx-build](https://www.sphinx-doc.org/en/master/man/sphinx-build.html) provides documentation website build checks via [`-W`](https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-W) (which turns warnings into errors).
Example command: `% poetry run sphinx-build docs/source docs/build -W`
1. [cffconvert](https://github.com/citation-file-format/cffconvert) provides [CITATION.cff file](https://citation-file-format.github.io/) formatting checks. Example command: `% poetry run cffconvert --validate`
1. [pre-commit](https://pre-commit.com/) provides various checks which are treated as failures in automated testing.
Example command `% pre-commit run -all-files`

Expand Down
132 changes: 3 additions & 129 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Sphinx = "^6.0.0"
myst-parser = "^2.0.0"
sphinxcontrib-mermaid = "^0.9.0"
moto = {extras = ["s3", "server"], version = "^4.0.0"}
cffconvert = "^2.0.0"
cytominer-database = "^0.3.4"
pycytominer = "^1.1.0"
dunamai = "^1.19.0"
Expand Down

0 comments on commit f50d42e

Please sign in to comment.