From 27e5eba8042f2bdaacbf7e75af119672b1b49bef Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Tue, 31 Oct 2023 14:51:03 +0200 Subject: [PATCH] style: feedback --- CONTRIBUTING.md | 30 ++++--------------------- docs/docs/developer/contributing.md | 30 ++++--------------------- hooks/gen_docs/gen_docs_contributing.py | 2 +- 3 files changed, 9 insertions(+), 53 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d75a7ab52..6f3e3f29f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributions +# Contribution **Welcome!** We are glad to have you visit our contributibg guide! @@ -6,36 +6,14 @@ If you find any bugs or have suggestions for improvements, please open an [issue ## Style -We advise that you stick to our `pre-commit` hooks, which you can run with `poetry run pre-commit run -a`. In order for `dprint` to work, you have to manually [install](#markdown) it locally. It will work in the CI, so it is also possible to manually carry out formatting changes flagged by `dprint` in the CI and skip installing it locally. +We advise that you stick to our `pre-commit` hooks for code linting, formatting, and auto-generation of documentation. After you install them using `poetry run pre-commit install` they're triggered automatically during `git commit`. Additionally, you can manually invoke them with `poetry run pre-commit run -a`. In order for `dprint` to work, you have to manually [install](#markdown) it locally. It will work in the CI, so it is also possible to manually carry out formatting changes flagged by `dprint` in the CI and skip installing it locally. ### Python -To ensure a consistent Python code style, we use [Ruff](https://docs.astral.sh/ruff/) for both linting and formatting. - -**Configuration** +To ensure a consistent Python code style, we use [Ruff](https://docs.astral.sh/ruff/) for both linting and formatting. The official docs contain a guide on [editor integration](https://docs.astral.sh/ruff/integrations/). Our configuration can be found in [KPOps](https://github.com/bakdata/kpops)' top-level `pyproject.toml`. -**Editor integration** - -Below are listed existing Ruff plugins/extensions for some of the most popular python IDEs. - -- [VSCode](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) -- [JetBrains](https://plugins.jetbrains.com/plugin/20574-ruff) - -If you cannot find your Editor of choices or you want something more custom, [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) enables Ruff to be used in any editor that supports the LSP - ### Markdown -To ensure a consistent markdown style, we use [dprint](https://dprint.dev)'s [Markdown code formatter](https://dprint.dev/plugins/markdown/). - -**Configuration** - -Our configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json). - -**Editor integration** - -Below are listed existing `dprint` plugins/extensions for some of the most popular python IDEs. - -- [VSCode](https://marketplace.visualstudio.com/items?itemName=dprint.dprint) -- [JetBrains](https://plugins.jetbrains.com/plugin/18192-dprint) +To ensure a consistent markdown style, we use [dprint](https://dprint.dev)'s [Markdown code formatter](https://dprint.dev/plugins/markdown/). Our configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json). diff --git a/docs/docs/developer/contributing.md b/docs/docs/developer/contributing.md index 517fc4294..44473c294 100644 --- a/docs/docs/developer/contributing.md +++ b/docs/docs/developer/contributing.md @@ -1,6 +1,6 @@ -# Contributions +# Contribution **Welcome!** We are glad to have you visit our contributibg guide! @@ -8,36 +8,14 @@ If you find any bugs or have suggestions for improvements, please open an [issue ## Style -We advise that you stick to our `pre-commit` hooks, which you can run with `poetry run pre-commit run -a`. In order for `dprint` to work, you have to manually [install](#markdown) it locally. It will work in the CI, so it is also possible to manually carry out formatting changes flagged by `dprint` in the CI and skip installing it locally. +We advise that you stick to our `pre-commit` hooks for code linting, formatting, and auto-generation of documentation. After you install them using `poetry run pre-commit install` they're triggered automatically during `git commit`. Additionally, you can manually invoke them with `poetry run pre-commit run -a`. In order for `dprint` to work, you have to manually [install](#markdown) it locally. It will work in the CI, so it is also possible to manually carry out formatting changes flagged by `dprint` in the CI and skip installing it locally. ### Python -To ensure a consistent Python code style, we use [Ruff](https://docs.astral.sh/ruff/) for both linting and formatting. - -**Configuration** +To ensure a consistent Python code style, we use [Ruff](https://docs.astral.sh/ruff/) for both linting and formatting. The official docs contain a guide on [editor integration](https://docs.astral.sh/ruff/integrations/). Our configuration can be found in [KPOps](https://github.com/bakdata/kpops)' top-level `pyproject.toml`. -**Editor integration** - -Below are listed existing Ruff plugins/extensions for some of the most popular python IDEs. - -- [VSCode](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) -- [JetBrains](https://plugins.jetbrains.com/plugin/20574-ruff) - -If you cannot find your Editor of choices or you want something more custom, [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp) enables Ruff to be used in any editor that supports the LSP - ### Markdown -To ensure a consistent markdown style, we use [dprint](https://dprint.dev)'s [Markdown code formatter](https://dprint.dev/plugins/markdown/). - -**Configuration** - -Our configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json). - -**Editor integration** - -Below are listed existing `dprint` plugins/extensions for some of the most popular python IDEs. - -- [VSCode](https://marketplace.visualstudio.com/items?itemName=dprint.dprint) -- [JetBrains](https://plugins.jetbrains.com/plugin/18192-dprint) +To ensure a consistent markdown style, we use [dprint](https://dprint.dev)'s [Markdown code formatter](https://dprint.dev/plugins/markdown/). Our configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json). diff --git a/hooks/gen_docs/gen_docs_contributing.py b/hooks/gen_docs/gen_docs_contributing.py index dbadc1b30..867a42edd 100644 --- a/hooks/gen_docs/gen_docs_contributing.py +++ b/hooks/gen_docs/gen_docs_contributing.py @@ -1,4 +1,4 @@ -"""Copies ``CONTROBUTING.md`` from root to the docs.""" +"""Copies ``CONTRIBUTING.md`` from root to the docs.""" import shutil from pathlib import Path from tempfile import TemporaryFile