diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7abc2eeff043da2f6c50f4c19f7d1ab4db1c199c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,5 @@ +repos: +- repo: https://github.com/jackdewinter/pymarkdown + rev: v0.9.13.3 + hooks: + - id: pymarkdown diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5acc729b5f6bb55aef1d7031652f42910e46a073..864f8772b0f2df8f3476d0746aab534d1de22dc7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1,28 @@ # Contributing to r2devops_catalog + +## Development environment + +### Quality Standards + +#### Style Guide + +#### Pre-commit hooks + +Please use the pre-commit hooks provided in this repository to maintain consistency in +the codebase. + +```bash +pip install --upgrade pip +pip install -e .[QUALITY] +pre-commit install +``` + +You can manually run the pre-commit hooks on all files: + +```bash +pre-commit run --all-files +``` + +This will run the following hooks: + +- `pymarkdown` diff --git a/pyproject.toml b/pyproject.toml index de310a19f6c00a18283a5faa0997b5d0e712fe20..96d8c590e9cc4fbb108fb55e20fcb7ac5176c72b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,3 +19,12 @@ dependencies = [ "pytest_project @ {root:uri}/tests/pytest_project", "mypy_project @ {root:uri}/tests/mypy_project", ] + +[project.optional-dependencies] +QUALITY = [ + "pre-commit", +] + +[tool.pymarkdown] +strict-config = true +plugins.line-length.line_length = 88