diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0a63903 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,9 @@ +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.8.1 + hooks: + # Run the linter. + - id: ruff + # Run the formatter. + - id: ruff-format diff --git a/README.md b/README.md index 2080184..61fecbd 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,14 @@ To integrate this plugin with your NOMAD installation: 2. For more detailed installation instructions, visit our [docs for NOMAD plugins](https://nomad-lab.eu/prod/v1/staging/docs/plugins/plugins.html). +## Developers + +It's nice to not miss a ruff format before pushing your commits. To set up pre-commit hook: +```console + pip install pre-commit + pre-commit install +``` + ### Acknowledgments Special thanks to Jinzhao Li and all contributors who have made this project possible.