From 514e8e9f16144f2eeb9d609869f1cea45eec0bc6 Mon Sep 17 00:00:00 2001 From: Dorian Turba <froggit.commit.z3jqj@simplelogin.com> Date: Wed, 6 Sep 2023 15:48:00 +0200 Subject: [PATCH] add pre-commit pymarkdown --- .pre-commit-config.yaml | 5 +++++ CONTRIBUTING.md | 27 +++++++++++++++++++++++++++ pyproject.toml | 9 +++++++++ 3 files changed, 41 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..7abc2ee --- /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 5acc729..864f877 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 de310a1..96d8c59 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 -- GitLab