From a6c69940d41966a55f959b68de1d66c05b97bdce Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Sat, 4 Nov 2023 00:22:11 +0200 Subject: [PATCH 01/16] ci: add malva to dprint --- dprint.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dprint.json b/dprint.json index d702f9ea9..e0509ce4b 100644 --- a/dprint.json +++ b/dprint.json @@ -2,6 +2,7 @@ "$schema": "https://dprint.dev/schemas/v0.json", "incremental": true, "markdown": {}, + "malva": {}, "includes": [ "**/*.{md}" ], @@ -15,6 +16,7 @@ "**/config_env_vars.md" ], "plugins": [ - "https://plugins.dprint.dev/markdown-0.16.0.wasm" + "https://plugins.dprint.dev/markdown-0.16.0.wasm", + "https://plugins.dprint.dev/g-plane/malva-v0.1.2.wasm" ] } From ea9341ca048e5f841f7e9a32bd870958953d0505 Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Sat, 4 Nov 2023 00:25:53 +0200 Subject: [PATCH 02/16] ci: add toml formatter --- dprint.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dprint.json b/dprint.json index d702f9ea9..a7ab5804d 100644 --- a/dprint.json +++ b/dprint.json @@ -2,6 +2,7 @@ "$schema": "https://dprint.dev/schemas/v0.json", "incremental": true, "markdown": {}, + "toml": {}, "includes": [ "**/*.{md}" ], @@ -15,6 +16,7 @@ "**/config_env_vars.md" ], "plugins": [ - "https://plugins.dprint.dev/markdown-0.16.0.wasm" + "https://plugins.dprint.dev/markdown-0.16.0.wasm", + "https://plugins.dprint.dev/toml-0.5.4.wasm" ] } From a86375fd1be93da1a2673d188217eb8a3a21a2ef Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Wed, 8 Nov 2023 10:04:07 +0200 Subject: [PATCH 03/16] fix(ci): Add toml extension to dprint --- dprint.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dprint.json b/dprint.json index a7ab5804d..296f5b2f9 100644 --- a/dprint.json +++ b/dprint.json @@ -4,7 +4,8 @@ "markdown": {}, "toml": {}, "includes": [ - "**/*.{md}" + "**/*.{md}", + "**/*.{toml}" ], "excludes": [ ".pytest_cache/**", From f5052ef5abfb76c7abddae7f77a12e8d78985081 Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Wed, 8 Nov 2023 10:10:51 +0200 Subject: [PATCH 04/16] fix(ci): add css extensions to dprint --- dprint.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dprint.json b/dprint.json index e0509ce4b..206e5b6d1 100644 --- a/dprint.json +++ b/dprint.json @@ -4,7 +4,10 @@ "markdown": {}, "malva": {}, "includes": [ - "**/*.{md}" + "**/*.{md}", + "**/*.{css}", + "**/*.{scss}", + "**/*.{sass}" ], "excludes": [ ".pytest_cache/**", From adb1663a04d61a991aa33d53f5a4acc0437895a5 Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Mon, 6 Nov 2023 14:32:01 +0200 Subject: [PATCH 05/16] Replace black with ruff (#365) --- .github/workflows/ci.yaml | 6 +- .github/workflows/release.yaml | 1 + .pre-commit-config.yaml | 21 +- CHANGELOG.md | 481 +------------------------ CONTRIBUTING.md | 1 + docs/docs/developer/contributing.md | 19 + docs/docs/developer/formatting.md | 12 - docs/docs/developer/getting-started.md | 12 + docs/docs/stylesheets/extra.css | 17 + docs/docs/user/changelog.md | 480 ++++++++++++++++++++++++ docs/mkdocs.yml | 8 +- hooks/__init__.py | 2 +- hooks/gen_docs/gen_docs_cli_usage.py | 6 +- hooks/gen_docs/gen_docs_components.py | 14 +- hooks/gen_docs/gen_docs_env_vars.py | 7 +- hooks/gen_schema.py | 4 +- kpops/cli/main.py | 16 +- poetry.lock | 94 +---- pyproject.toml | 28 +- 19 files changed, 608 insertions(+), 621 deletions(-) mode change 100644 => 120000 CHANGELOG.md create mode 120000 CONTRIBUTING.md create mode 100644 docs/docs/developer/contributing.md delete mode 100644 docs/docs/developer/formatting.md create mode 100644 docs/docs/developer/getting-started.md create mode 100644 docs/docs/user/changelog.md diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fe87e8436..07338b2dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,11 +43,11 @@ jobs: echo "::add-matcher::.github/ruff-matcher.json" poetry run ruff check . --config pyproject.toml --output-format text --no-fix else - poetry run pre-commit run ruff --all-files --show-diff-on-failure + poetry run pre-commit run ruff-lint --all-files --show-diff-on-failure fi; - - name: Formatting (black) - run: poetry run pre-commit run black --all-files --show-diff-on-failure + - name: Formatting (ruff) + run: poetry run pre-commit run ruff-format --all-files --show-diff-on-failure - name: Typing (pyright) run: poetry run pre-commit run pyright --all-files diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9171e6c70..d560502be 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,6 +22,7 @@ jobs: poetry-version: "1.5.1" changelog: true changelog-config: "./.github/changelog-config.json" + changelog-file: "./docs/docs/user/changelog.md" secrets: github-username: "${{ secrets.GH_USERNAME }}" github-email: "${{ secrets.GH_EMAIL }}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c709b20a..457a712b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,20 @@ repos: - repo: local hooks: - - id: ruff - name: ruff - entry: ruff check . - args: [ --config, pyproject.toml, --fix, --show-fixes, --exit-non-zero-on-fix ] + - id: ruff-lint + name: ruff-lint + entry: ruff check + args: [ --force-exclude, --config, pyproject.toml, --fix, --show-fixes, --exit-non-zero-on-fix ] language: system types_or: [python] require_serial: true # run once for all files - pass_filenames: false - - id: black - name: black - entry: black + - id: ruff-format + name: ruff-format + entry: ruff format + args: [ --force-exclude, --config, pyproject.toml ] language: system - types_or: [python, pyi] + types_or: [python] require_serial: true # run once for all files - exclude: ^tests/.*snapshots/ - id: pyright name: pyright entry: pyright @@ -38,6 +37,7 @@ repos: types: [python] require_serial: true exclude: ^tests/.*snapshots/ + pass_filenames: false - id: gen-docs-env-vars name: gen-docs-env-vars entry: python hooks/gen_docs/gen_docs_env_vars.py @@ -45,6 +45,7 @@ repos: types: [python] require_serial: true exclude: ^tests/.*snapshots/ + pass_filenames: false - id: gen-docs-components name: gen-docs-components entry: python hooks/gen_docs/gen_docs_components.py diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index b964b7de2..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,480 +0,0 @@ -# Changelog -## [2.0.11](https://github.com/bakdata/kpops/releases/tag/2.0.11) - Release Date: [2023-10-24] - -### 🐛 Fixes - -- Fix early exit upon Helm exit code 1 - [#376](https://github.com/bakdata/kpops/pull/376) - -- Fix docs setup page list indentation - [#377](https://github.com/bakdata/kpops/pull/377) - - -### 📝 Documentation - -- Migrate deprecated mkdocs-material-extensions - [#378](https://github.com/bakdata/kpops/pull/378) - -- Fix docs setup page list indentation - [#377](https://github.com/bakdata/kpops/pull/377) - -- Exclude resources from docs search - [#371](https://github.com/bakdata/kpops/pull/371) - - - - - - -## [2.0.10](https://github.com/bakdata/kpops/releases/tag/2.0.10) - Release Date: [2023-10-12] - -### 🌀 Miscellaneous - -- Fix environment variables documentation generation - [#362](https://github.com/bakdata/kpops/pull/362) - -- Introduce ruff - [#363](https://github.com/bakdata/kpops/pull/363) - -- Print details on connector name mismatch error - [#369](https://github.com/bakdata/kpops/pull/369) - -- Enable transparent OS environment lookups from internal environment - [#368](https://github.com/bakdata/kpops/pull/368) - - - - - - -## [2.0.9](https://github.com/bakdata/kpops/releases/tag/2.0.9) - Release Date: [2023-09-19] - -### 🐛 Fixes - -- Fix Kafka connect config name for deletion - [#361](https://github.com/bakdata/kpops/pull/361) - - -### 📝 Documentation - -- Fix link to kpops-examples - [#357](https://github.com/bakdata/kpops/pull/357) - - - - - - -## [2.0.8](https://github.com/bakdata/kpops/releases/tag/2.0.8) - Release Date: [2023-09-06] - -### 🐛 Fixes - -- Fix config.yaml overriding environment variables - [#353](https://github.com/bakdata/kpops/pull/353) - - -### 🏭 Refactor - -- Refactor component prefix & name - [#326](https://github.com/bakdata/kpops/pull/326) - -- Remove unnecessary condition during inflate - [#328](https://github.com/bakdata/kpops/pull/328) - - - - - - -## [2.0.7](https://github.com/bakdata/kpops/releases/tag/2.0.7) - Release Date: [2023-08-31] - -### 🐛 Fixes - -- Print only rendered templates when `--template` flag is set - [#350](https://github.com/bakdata/kpops/pull/350) - - -### 📝 Documentation - -- Add migration guide - [#352](https://github.com/bakdata/kpops/pull/352) - - - - - - -## [2.0.6](https://github.com/bakdata/kpops/releases/tag/2.0.6) - Release Date: [2023-08-30] - -### 🏭 Refactor - -- Simplify deployment with local Helm charts - [#349](https://github.com/bakdata/kpops/pull/349) - - - - - - -## [2.0.5](https://github.com/bakdata/kpops/releases/tag/2.0.5) - Release Date: [2023-08-30] - -### 🐛 Fixes - -- Fix versioning of docs when releasing - [#346](https://github.com/bakdata/kpops/pull/346) - - - - - - -## [2.0.4](https://github.com/bakdata/kpops/releases/tag/2.0.4) - Release Date: [2023-08-29] - -### 🐛 Fixes - -- Fix GitHub ref variable for pushing docs to main branch - [#343](https://github.com/bakdata/kpops/pull/343) - - -### 📝 Documentation - -- Add `dprint` as the markdown formatter - [#337](https://github.com/bakdata/kpops/pull/337) - -- Publish pre-release docs for PRs & main branch - [#339](https://github.com/bakdata/kpops/pull/339) - -- Align docs colours - [#345](https://github.com/bakdata/kpops/pull/345) - - -### 🌀 Miscellaneous - -- Exclude abstract components from pipeline schema - [#332](https://github.com/bakdata/kpops/pull/332) - - - - - - -## [2.0.3](https://github.com/bakdata/kpops/releases/tag/2.0.3) - Release Date: [2023-08-24] - -### 🐛 Fixes - -- Fix GitHub action error in non-Python projects - [#340](https://github.com/bakdata/kpops/pull/340) - - -### 🌀 Miscellaneous - -- Lint GitHub action - [#342](https://github.com/bakdata/kpops/pull/342) - - - - - - -## [2.0.2](https://github.com/bakdata/kpops/releases/tag/2.0.2) - Release Date: [2023-08-23] - -### 📝 Documentation - -- Add version dropdown to the documentation - [#336](https://github.com/bakdata/kpops/pull/336) - -- Break the documentation down into smaller subsection - [#329](https://github.com/bakdata/kpops/pull/329) - - - - - - -## [2.0.1](https://github.com/bakdata/kpops/releases/tag/2.0.1) - Release Date: [2023-08-22] - -### 🐛 Fixes - -- Fix optional flags in GitHub action - [#334](https://github.com/bakdata/kpops/pull/334) - - - - - - -## [2.0.0](https://github.com/bakdata/kpops/releases/tag/2.0.0) - Release Date: [2023-08-17] - -### 🏗️ Breaking changes - -- Remove camel case conversion of internal models - [#308](https://github.com/bakdata/kpops/pull/308) - -- Derive component type automatically from class name - [#309](https://github.com/bakdata/kpops/pull/309) - -- Refactor input/output types - [#232](https://github.com/bakdata/kpops/pull/232) - -- v2 - [#321](https://github.com/bakdata/kpops/pull/321) - - -### 🚀 Features - -- Automatically support schema generation for custom components - [#307](https://github.com/bakdata/kpops/pull/307) - -- Derive component type automatically from class name - [#309](https://github.com/bakdata/kpops/pull/309) - - -### 🏭 Refactor - -- Refactor input/output types - [#232](https://github.com/bakdata/kpops/pull/232) - - -### 📝 Documentation - -- Fix editor integration example in docs - [#273](https://github.com/bakdata/kpops/pull/273) - - - - - - -## [1.7.2](https://github.com/bakdata/kpops/releases/tag/1.7.2) - Release Date: [2023-08-16] - -### 🏭 Refactor - -- Refactor Kafka Connect handler - [#322](https://github.com/bakdata/kpops/pull/322) - - -### 📝 Documentation - -- Add KPOps Runner GitHub Action to the documentation - [#325](https://github.com/bakdata/kpops/pull/325) - -- Remove `:type` and `:rtype` from docstrings - [#324](https://github.com/bakdata/kpops/pull/324) - - - - - - -## [1.7.1](https://github.com/bakdata/kpops/releases/tag/1.7.1) - Release Date: [2023-08-15] - -### 📝 Documentation - -- Modularize and autogenerate examples for the documentation - [#267](https://github.com/bakdata/kpops/pull/267) - -- Update the variable documentation - [#266](https://github.com/bakdata/kpops/pull/266) - - - - - - -## [1.7.0](https://github.com/bakdata/kpops/releases/tag/1.7.0) - Release Date: [2023-08-15] - -### 🚀 Features - -- Add flag to exclude pipeline steps - [#300](https://github.com/bakdata/kpops/pull/300) - - - - - - -## [1.6.0](https://github.com/bakdata/kpops/releases/tag/1.6.0) - Release Date: [2023-08-10] - -### 🏭 Refactor - -- Refactor handling of Helm flags - [#319](https://github.com/bakdata/kpops/pull/319) - - - - - - -## [1.5.0](https://github.com/bakdata/kpops/releases/tag/1.5.0) - Release Date: [2023-08-10] - -### 🚀 Features - -- Refactor Helm wrapper and add `--set-file` flag - [#311](https://github.com/bakdata/kpops/pull/311) - - -### 🏭 Refactor - -- Refactor Helm wrapper and add `--set-file` flag - [#311](https://github.com/bakdata/kpops/pull/311) - -- Set default for ToSection topics - [#313](https://github.com/bakdata/kpops/pull/313) - -- Annotate types for ToSection models mapping - [#315](https://github.com/bakdata/kpops/pull/315) - - -### 🌀 Miscellaneous - -- Check Poetry lock file consistency - [#316](https://github.com/bakdata/kpops/pull/316) - - - - - - -## [1.4.0](https://github.com/bakdata/kpops/releases/tag/1.4.0) - Release Date: [2023-08-02] - -### 🐛 Fixes - -- Validate unique step names - [#292](https://github.com/bakdata/kpops/pull/292) - - -### 🏭 Refactor - -- Order PipelineComponent fields - [#290](https://github.com/bakdata/kpops/pull/290) - -- Migrate requests to httpx - [#302](https://github.com/bakdata/kpops/pull/302) - -- Refactor CLI using dtyper - [#306](https://github.com/bakdata/kpops/pull/306) - - -### 🌀 Miscellaneous - -- Update Black - [#294](https://github.com/bakdata/kpops/pull/294) - -- Fix vulnerability in mkdocs-material - [#295](https://github.com/bakdata/kpops/pull/295) - -- Move breaking changes section upper in the change log config - [#287](https://github.com/bakdata/kpops/pull/287) - - - - - - -## [1.3.2](https://github.com/bakdata/kpops/releases/tag/1.3.2) - Release Date: [2023-07-13] - -### 🐛 Fixes - -- Exclude Helm tests from dry-run diff - [#293](https://github.com/bakdata/kpops/pull/293) - - - - - - -## [1.3.1](https://github.com/bakdata/kpops/releases/tag/1.3.1) - Release Date: [2023-07-11] - -### 🏭 Refactor - -- Remove workaround for pipeline steps - [#276](https://github.com/bakdata/kpops/pull/276) - - -### 🌀 Miscellaneous - -- Update codeowners - [#281](https://github.com/bakdata/kpops/pull/281) - -- Reactivate Windows CI - [#255](https://github.com/bakdata/kpops/pull/255) - -- Downgrade Poetry version on the Windows CI pipeline - [#286](https://github.com/bakdata/kpops/pull/286) - -- Set ANSI theme for output of `kpops generate` - [#289](https://github.com/bakdata/kpops/pull/289) - - - - - - -## [1.3.0](https://github.com/bakdata/kpops/releases/tag/1.3.0) - Release Date: [2023-07-07] - -### 🏭 Refactor - -- Plural broker field in pipeline config - [#278](https://github.com/bakdata/kpops/pull/278) - - -### 📝 Documentation - -- Update KPOps runner readme for dev versions - [#279](https://github.com/bakdata/kpops/pull/279) - - -### 🏗️ Breaking changes - -- Plural broker field in pipeline config - [#278](https://github.com/bakdata/kpops/pull/278) - - -### 🌀 Miscellaneous - -- Add breaking changes section to change log config - [#280](https://github.com/bakdata/kpops/pull/280) - - - - - - -## [1.2.4](https://github.com/bakdata/kpops/releases/tag/1.2.4) - Release Date: [2023-06-27] - -### 🌀 Miscellaneous - -- Update changelog action to contain miscellaneous PRs - [#269](https://github.com/bakdata/kpops/pull/269) - - - - - - -## [1.2.3](https://github.com/bakdata/kpops/releases/tag/1.2.3) - Release Date: [2023-06-22] - -### 🐛 Fixes - -- Refactor custom component validation & hide field from kpops output - [#265](https://github.com/bakdata/kpops/pull/265) - - -### 🏭 Refactor - -- Refactor custom component validation & hide field from kpops output - [#265](https://github.com/bakdata/kpops/pull/265) - - - - -### 🌀 Miscellaneous - - - -## [1.2.2](https://github.com/bakdata/kpops/releases/tag/1.2.2) - Release Date: [2023-06-21] - - - -### 🌀 Miscellaneous - -- Create workflow to lint CI - [#260](https://github.com/bakdata/kpops/pull/260) - -- Fix update docs when releasing - [#261](https://github.com/bakdata/kpops/pull/261) - -- Rename change log message for uncategorized issues - [#262](https://github.com/bakdata/kpops/pull/262) - - - -## [1.2.1](https://github.com/bakdata/kpops/releases/tag/1.2.1) - Release Date: [2023-06-21] - - - -Uncategorized - -- Fix update docs in release workflow - [#258](https://github.com/bakdata/kpops/pull/258) - - - -## [1.2.0](https://github.com/bakdata/kpops/releases/tag/1.2.0) - Release Date: [2023-06-21] - -### 🚀 Features - -- Add `helm repo update ` for Helm >3.7 - [#239](https://github.com/bakdata/kpops/pull/239) - - -### 🐛 Fixes - -- add --namespace option to Helm template command - [#237](https://github.com/bakdata/kpops/pull/237) - -- Add missing type annotation for Pydantic attributes - [#238](https://github.com/bakdata/kpops/pull/238) - -- Fix helm version check - [#242](https://github.com/bakdata/kpops/pull/242) - -- Fix Helm Version Check - [#244](https://github.com/bakdata/kpops/pull/244) - -- Fix import from external module - [#256](https://github.com/bakdata/kpops/pull/256) - - -### 🏭 Refactor - -- Remove enable option from helm diff - [#235](https://github.com/bakdata/kpops/pull/235) - -- Refactor variable substitution - [#198](https://github.com/bakdata/kpops/pull/198) - - - - -Uncategorized - -- Add background to docs home page - [#236](https://github.com/bakdata/kpops/pull/236) - -- Update Poetry version in CI - [#247](https://github.com/bakdata/kpops/pull/247) - -- Add pip cache in KPOps runner action - [#249](https://github.com/bakdata/kpops/pull/249) - -- Check types using Pyright - [#251](https://github.com/bakdata/kpops/pull/251) - -- Remove MyPy - [#252](https://github.com/bakdata/kpops/pull/252) - -- Disable broken Windows CI temporarily - [#253](https://github.com/bakdata/kpops/pull/253) - -- Update release and publish workflows - [#254](https://github.com/bakdata/kpops/pull/254) - -- Fix release & publish workflows - [#257](https://github.com/bakdata/kpops/pull/257) - - - - diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 120000 index 000000000..d31599794 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +docs/docs/user/changelog.md \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 120000 index 000000000..92403f4d9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +docs/docs/developer/contributing.md \ No newline at end of file diff --git a/docs/docs/developer/contributing.md b/docs/docs/developer/contributing.md new file mode 100644 index 000000000..ff55361cc --- /dev/null +++ b/docs/docs/developer/contributing.md @@ -0,0 +1,19 @@ +# How to contribute + +**Welcome!** We are glad to have you visit our contributing guide! + +If you find any bugs or have suggestions for improvements, please open an [issue](https://github.com/bakdata/kpops/issues/new) and optionally a [pull request (PR)](https://github.com/bakdata/kpops/compare). In the case of a PR, we would appreciate it if you preface it with an issue outlining your goal and means of achieving it. + +## Style + +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. 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`. + +### Markdown + +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/formatting.md b/docs/docs/developer/formatting.md deleted file mode 100644 index 54ea1b6d9..000000000 --- a/docs/docs/developer/formatting.md +++ /dev/null @@ -1,12 +0,0 @@ -# Formatting - -## Markdown - -To ensure a consistent markdown style, we use [dprint](https://dprint.dev) to check and reformat. - -```shell -dprint fmt -``` - -Use the [official documentation](https://dprint.dev/setup/) to set up dprint. -The configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json). diff --git a/docs/docs/developer/getting-started.md b/docs/docs/developer/getting-started.md new file mode 100644 index 000000000..e48d1221a --- /dev/null +++ b/docs/docs/developer/getting-started.md @@ -0,0 +1,12 @@ +# Getting started + +**Welcome!** We are glad to have you visit our developer guide! If you find any bugs or have suggestions for improvements, please open an [issue](https://github.com/bakdata/kpops/issues/new) and optionally a [pull request (PR)](https://github.com/bakdata/kpops/compare). In the case of a PR, we would appreciate it if you preface it with an issue outlining your goal and means of achieving it. + +Find more about our code-style or insights into KPOps' code base here in our developer guide. + + + +!!! wip "Work in progress" + The developer guide is still under construction. If you have a question left unanswered here, feel free to ask it by opening an issue. + + diff --git a/docs/docs/stylesheets/extra.css b/docs/docs/stylesheets/extra.css index ae2953c82..24d84f6c4 100644 --- a/docs/docs/stylesheets/extra.css +++ b/docs/docs/stylesheets/extra.css @@ -13,6 +13,8 @@ /* Color the links with the primary color */ --md-typeset-a-color: var(--md-primary-fg-color); + + --md-admonition-icon--wip: url('data:image/svg+xml;charset=utf-8,') } .md-typeset .md-button, .md-button--primary { @@ -22,3 +24,18 @@ .md-typeset .md-button:hover, .md-button--primary:hover { border-color: white; } + +.md-typeset .admonition.wip, +.md-typeset details.wip { +border-color: rgb(160, 45, 0); +} +.md-typeset .wip > .admonition-title, +.md-typeset .wip > summary { +background-color: rgb(255, 195, 172); +} +.md-typeset .wip > .admonition-title::before, +.md-typeset .wip > summary::before { +background-color: rgb(255, 77, 6); +-webkit-mask-image: var(--md-admonition-icon--wip); + mask-image: var(--md-admonition-icon--wip); +} diff --git a/docs/docs/user/changelog.md b/docs/docs/user/changelog.md new file mode 100644 index 000000000..b964b7de2 --- /dev/null +++ b/docs/docs/user/changelog.md @@ -0,0 +1,480 @@ +# Changelog +## [2.0.11](https://github.com/bakdata/kpops/releases/tag/2.0.11) - Release Date: [2023-10-24] + +### 🐛 Fixes + +- Fix early exit upon Helm exit code 1 - [#376](https://github.com/bakdata/kpops/pull/376) + +- Fix docs setup page list indentation - [#377](https://github.com/bakdata/kpops/pull/377) + + +### 📝 Documentation + +- Migrate deprecated mkdocs-material-extensions - [#378](https://github.com/bakdata/kpops/pull/378) + +- Fix docs setup page list indentation - [#377](https://github.com/bakdata/kpops/pull/377) + +- Exclude resources from docs search - [#371](https://github.com/bakdata/kpops/pull/371) + + + + + + +## [2.0.10](https://github.com/bakdata/kpops/releases/tag/2.0.10) - Release Date: [2023-10-12] + +### 🌀 Miscellaneous + +- Fix environment variables documentation generation - [#362](https://github.com/bakdata/kpops/pull/362) + +- Introduce ruff - [#363](https://github.com/bakdata/kpops/pull/363) + +- Print details on connector name mismatch error - [#369](https://github.com/bakdata/kpops/pull/369) + +- Enable transparent OS environment lookups from internal environment - [#368](https://github.com/bakdata/kpops/pull/368) + + + + + + +## [2.0.9](https://github.com/bakdata/kpops/releases/tag/2.0.9) - Release Date: [2023-09-19] + +### 🐛 Fixes + +- Fix Kafka connect config name for deletion - [#361](https://github.com/bakdata/kpops/pull/361) + + +### 📝 Documentation + +- Fix link to kpops-examples - [#357](https://github.com/bakdata/kpops/pull/357) + + + + + + +## [2.0.8](https://github.com/bakdata/kpops/releases/tag/2.0.8) - Release Date: [2023-09-06] + +### 🐛 Fixes + +- Fix config.yaml overriding environment variables - [#353](https://github.com/bakdata/kpops/pull/353) + + +### 🏭 Refactor + +- Refactor component prefix & name - [#326](https://github.com/bakdata/kpops/pull/326) + +- Remove unnecessary condition during inflate - [#328](https://github.com/bakdata/kpops/pull/328) + + + + + + +## [2.0.7](https://github.com/bakdata/kpops/releases/tag/2.0.7) - Release Date: [2023-08-31] + +### 🐛 Fixes + +- Print only rendered templates when `--template` flag is set - [#350](https://github.com/bakdata/kpops/pull/350) + + +### 📝 Documentation + +- Add migration guide - [#352](https://github.com/bakdata/kpops/pull/352) + + + + + + +## [2.0.6](https://github.com/bakdata/kpops/releases/tag/2.0.6) - Release Date: [2023-08-30] + +### 🏭 Refactor + +- Simplify deployment with local Helm charts - [#349](https://github.com/bakdata/kpops/pull/349) + + + + + + +## [2.0.5](https://github.com/bakdata/kpops/releases/tag/2.0.5) - Release Date: [2023-08-30] + +### 🐛 Fixes + +- Fix versioning of docs when releasing - [#346](https://github.com/bakdata/kpops/pull/346) + + + + + + +## [2.0.4](https://github.com/bakdata/kpops/releases/tag/2.0.4) - Release Date: [2023-08-29] + +### 🐛 Fixes + +- Fix GitHub ref variable for pushing docs to main branch - [#343](https://github.com/bakdata/kpops/pull/343) + + +### 📝 Documentation + +- Add `dprint` as the markdown formatter - [#337](https://github.com/bakdata/kpops/pull/337) + +- Publish pre-release docs for PRs & main branch - [#339](https://github.com/bakdata/kpops/pull/339) + +- Align docs colours - [#345](https://github.com/bakdata/kpops/pull/345) + + +### 🌀 Miscellaneous + +- Exclude abstract components from pipeline schema - [#332](https://github.com/bakdata/kpops/pull/332) + + + + + + +## [2.0.3](https://github.com/bakdata/kpops/releases/tag/2.0.3) - Release Date: [2023-08-24] + +### 🐛 Fixes + +- Fix GitHub action error in non-Python projects - [#340](https://github.com/bakdata/kpops/pull/340) + + +### 🌀 Miscellaneous + +- Lint GitHub action - [#342](https://github.com/bakdata/kpops/pull/342) + + + + + + +## [2.0.2](https://github.com/bakdata/kpops/releases/tag/2.0.2) - Release Date: [2023-08-23] + +### 📝 Documentation + +- Add version dropdown to the documentation - [#336](https://github.com/bakdata/kpops/pull/336) + +- Break the documentation down into smaller subsection - [#329](https://github.com/bakdata/kpops/pull/329) + + + + + + +## [2.0.1](https://github.com/bakdata/kpops/releases/tag/2.0.1) - Release Date: [2023-08-22] + +### 🐛 Fixes + +- Fix optional flags in GitHub action - [#334](https://github.com/bakdata/kpops/pull/334) + + + + + + +## [2.0.0](https://github.com/bakdata/kpops/releases/tag/2.0.0) - Release Date: [2023-08-17] + +### 🏗️ Breaking changes + +- Remove camel case conversion of internal models - [#308](https://github.com/bakdata/kpops/pull/308) + +- Derive component type automatically from class name - [#309](https://github.com/bakdata/kpops/pull/309) + +- Refactor input/output types - [#232](https://github.com/bakdata/kpops/pull/232) + +- v2 - [#321](https://github.com/bakdata/kpops/pull/321) + + +### 🚀 Features + +- Automatically support schema generation for custom components - [#307](https://github.com/bakdata/kpops/pull/307) + +- Derive component type automatically from class name - [#309](https://github.com/bakdata/kpops/pull/309) + + +### 🏭 Refactor + +- Refactor input/output types - [#232](https://github.com/bakdata/kpops/pull/232) + + +### 📝 Documentation + +- Fix editor integration example in docs - [#273](https://github.com/bakdata/kpops/pull/273) + + + + + + +## [1.7.2](https://github.com/bakdata/kpops/releases/tag/1.7.2) - Release Date: [2023-08-16] + +### 🏭 Refactor + +- Refactor Kafka Connect handler - [#322](https://github.com/bakdata/kpops/pull/322) + + +### 📝 Documentation + +- Add KPOps Runner GitHub Action to the documentation - [#325](https://github.com/bakdata/kpops/pull/325) + +- Remove `:type` and `:rtype` from docstrings - [#324](https://github.com/bakdata/kpops/pull/324) + + + + + + +## [1.7.1](https://github.com/bakdata/kpops/releases/tag/1.7.1) - Release Date: [2023-08-15] + +### 📝 Documentation + +- Modularize and autogenerate examples for the documentation - [#267](https://github.com/bakdata/kpops/pull/267) + +- Update the variable documentation - [#266](https://github.com/bakdata/kpops/pull/266) + + + + + + +## [1.7.0](https://github.com/bakdata/kpops/releases/tag/1.7.0) - Release Date: [2023-08-15] + +### 🚀 Features + +- Add flag to exclude pipeline steps - [#300](https://github.com/bakdata/kpops/pull/300) + + + + + + +## [1.6.0](https://github.com/bakdata/kpops/releases/tag/1.6.0) - Release Date: [2023-08-10] + +### 🏭 Refactor + +- Refactor handling of Helm flags - [#319](https://github.com/bakdata/kpops/pull/319) + + + + + + +## [1.5.0](https://github.com/bakdata/kpops/releases/tag/1.5.0) - Release Date: [2023-08-10] + +### 🚀 Features + +- Refactor Helm wrapper and add `--set-file` flag - [#311](https://github.com/bakdata/kpops/pull/311) + + +### 🏭 Refactor + +- Refactor Helm wrapper and add `--set-file` flag - [#311](https://github.com/bakdata/kpops/pull/311) + +- Set default for ToSection topics - [#313](https://github.com/bakdata/kpops/pull/313) + +- Annotate types for ToSection models mapping - [#315](https://github.com/bakdata/kpops/pull/315) + + +### 🌀 Miscellaneous + +- Check Poetry lock file consistency - [#316](https://github.com/bakdata/kpops/pull/316) + + + + + + +## [1.4.0](https://github.com/bakdata/kpops/releases/tag/1.4.0) - Release Date: [2023-08-02] + +### 🐛 Fixes + +- Validate unique step names - [#292](https://github.com/bakdata/kpops/pull/292) + + +### 🏭 Refactor + +- Order PipelineComponent fields - [#290](https://github.com/bakdata/kpops/pull/290) + +- Migrate requests to httpx - [#302](https://github.com/bakdata/kpops/pull/302) + +- Refactor CLI using dtyper - [#306](https://github.com/bakdata/kpops/pull/306) + + +### 🌀 Miscellaneous + +- Update Black - [#294](https://github.com/bakdata/kpops/pull/294) + +- Fix vulnerability in mkdocs-material - [#295](https://github.com/bakdata/kpops/pull/295) + +- Move breaking changes section upper in the change log config - [#287](https://github.com/bakdata/kpops/pull/287) + + + + + + +## [1.3.2](https://github.com/bakdata/kpops/releases/tag/1.3.2) - Release Date: [2023-07-13] + +### 🐛 Fixes + +- Exclude Helm tests from dry-run diff - [#293](https://github.com/bakdata/kpops/pull/293) + + + + + + +## [1.3.1](https://github.com/bakdata/kpops/releases/tag/1.3.1) - Release Date: [2023-07-11] + +### 🏭 Refactor + +- Remove workaround for pipeline steps - [#276](https://github.com/bakdata/kpops/pull/276) + + +### 🌀 Miscellaneous + +- Update codeowners - [#281](https://github.com/bakdata/kpops/pull/281) + +- Reactivate Windows CI - [#255](https://github.com/bakdata/kpops/pull/255) + +- Downgrade Poetry version on the Windows CI pipeline - [#286](https://github.com/bakdata/kpops/pull/286) + +- Set ANSI theme for output of `kpops generate` - [#289](https://github.com/bakdata/kpops/pull/289) + + + + + + +## [1.3.0](https://github.com/bakdata/kpops/releases/tag/1.3.0) - Release Date: [2023-07-07] + +### 🏭 Refactor + +- Plural broker field in pipeline config - [#278](https://github.com/bakdata/kpops/pull/278) + + +### 📝 Documentation + +- Update KPOps runner readme for dev versions - [#279](https://github.com/bakdata/kpops/pull/279) + + +### 🏗️ Breaking changes + +- Plural broker field in pipeline config - [#278](https://github.com/bakdata/kpops/pull/278) + + +### 🌀 Miscellaneous + +- Add breaking changes section to change log config - [#280](https://github.com/bakdata/kpops/pull/280) + + + + + + +## [1.2.4](https://github.com/bakdata/kpops/releases/tag/1.2.4) - Release Date: [2023-06-27] + +### 🌀 Miscellaneous + +- Update changelog action to contain miscellaneous PRs - [#269](https://github.com/bakdata/kpops/pull/269) + + + + + + +## [1.2.3](https://github.com/bakdata/kpops/releases/tag/1.2.3) - Release Date: [2023-06-22] + +### 🐛 Fixes + +- Refactor custom component validation & hide field from kpops output - [#265](https://github.com/bakdata/kpops/pull/265) + + +### 🏭 Refactor + +- Refactor custom component validation & hide field from kpops output - [#265](https://github.com/bakdata/kpops/pull/265) + + + + +### 🌀 Miscellaneous + + + +## [1.2.2](https://github.com/bakdata/kpops/releases/tag/1.2.2) - Release Date: [2023-06-21] + + + +### 🌀 Miscellaneous + +- Create workflow to lint CI - [#260](https://github.com/bakdata/kpops/pull/260) + +- Fix update docs when releasing - [#261](https://github.com/bakdata/kpops/pull/261) + +- Rename change log message for uncategorized issues - [#262](https://github.com/bakdata/kpops/pull/262) + + + +## [1.2.1](https://github.com/bakdata/kpops/releases/tag/1.2.1) - Release Date: [2023-06-21] + + + +Uncategorized + +- Fix update docs in release workflow - [#258](https://github.com/bakdata/kpops/pull/258) + + + +## [1.2.0](https://github.com/bakdata/kpops/releases/tag/1.2.0) - Release Date: [2023-06-21] + +### 🚀 Features + +- Add `helm repo update ` for Helm >3.7 - [#239](https://github.com/bakdata/kpops/pull/239) + + +### 🐛 Fixes + +- add --namespace option to Helm template command - [#237](https://github.com/bakdata/kpops/pull/237) + +- Add missing type annotation for Pydantic attributes - [#238](https://github.com/bakdata/kpops/pull/238) + +- Fix helm version check - [#242](https://github.com/bakdata/kpops/pull/242) + +- Fix Helm Version Check - [#244](https://github.com/bakdata/kpops/pull/244) + +- Fix import from external module - [#256](https://github.com/bakdata/kpops/pull/256) + + +### 🏭 Refactor + +- Remove enable option from helm diff - [#235](https://github.com/bakdata/kpops/pull/235) + +- Refactor variable substitution - [#198](https://github.com/bakdata/kpops/pull/198) + + + + +Uncategorized + +- Add background to docs home page - [#236](https://github.com/bakdata/kpops/pull/236) + +- Update Poetry version in CI - [#247](https://github.com/bakdata/kpops/pull/247) + +- Add pip cache in KPOps runner action - [#249](https://github.com/bakdata/kpops/pull/249) + +- Check types using Pyright - [#251](https://github.com/bakdata/kpops/pull/251) + +- Remove MyPy - [#252](https://github.com/bakdata/kpops/pull/252) + +- Disable broken Windows CI temporarily - [#253](https://github.com/bakdata/kpops/pull/253) + +- Update release and publish workflows - [#254](https://github.com/bakdata/kpops/pull/254) + +- Fix release & publish workflows - [#257](https://github.com/bakdata/kpops/pull/257) + + + + diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index f17c5267f..2d6ac97d0 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,6 +1,7 @@ site_name: KPOps -repo_url: https://github.com/bakdata/kpops/ site_url: https://bakdata.github.io/kpops/ +repo_name: KPOps +repo_url: https://github.com/bakdata/kpops/ remote_branch: gh-pages copyright: Copyright © 2023 bakdata @@ -82,6 +83,7 @@ nav: KPOps Documentation: index.md - User Guide: - What is KPOps: user/what-is-kpops.md + - Changelog: user/changelog.md - Getting Started: - Setup: user/getting-started/setup.md - Quick start: user/getting-started/quick-start.md @@ -111,5 +113,7 @@ nav: - CI integration: - GitHub Actions: user/references/ci-integration/github-actions.md - Developer Guide: + - Getting Started: developer/getting-started.md + - Contributing: developer/contributing.md + - Code base: - Auto generation: developer/auto-generation.md - - Formatting: developer/formatting.md diff --git a/hooks/__init__.py b/hooks/__init__.py index ef17ce38a..053c13419 100644 --- a/hooks/__init__.py +++ b/hooks/__init__.py @@ -1,4 +1,4 @@ """KPOps pre-commit hooks.""" from pathlib import Path -PATH_ROOT = Path(__file__).parents[1] +ROOT = Path(__file__).parents[1].resolve() diff --git a/hooks/gen_docs/gen_docs_cli_usage.py b/hooks/gen_docs/gen_docs_cli_usage.py index 469274745..25f7ecd8c 100644 --- a/hooks/gen_docs/gen_docs_cli_usage.py +++ b/hooks/gen_docs/gen_docs_cli_usage.py @@ -2,10 +2,10 @@ import subprocess -from hooks import PATH_ROOT +from hooks import ROOT -PATH_KPOPS_MAIN = PATH_ROOT / "kpops/cli/main.py" -PATH_CLI_COMMANDS_DOC = PATH_ROOT / "docs/docs/user/references/cli-commands.md" +PATH_KPOPS_MAIN = ROOT / "kpops/cli/main.py" +PATH_CLI_COMMANDS_DOC = ROOT / "docs/docs/user/references/cli-commands.md" # TODO(@sujuka99): try to use typer_cli.main.docs here instead # https://github.com/bakdata/kpops/issues/297 diff --git a/hooks/gen_docs/gen_docs_components.py b/hooks/gen_docs/gen_docs_components.py index 45ca61ae1..6fb78f767 100644 --- a/hooks/gen_docs/gen_docs_components.py +++ b/hooks/gen_docs/gen_docs_components.py @@ -7,15 +7,15 @@ import yaml -from hooks import PATH_ROOT +from hooks import ROOT from kpops.cli.registry import _find_classes from kpops.components import KafkaConnector, PipelineComponent from kpops.utils.colorify import redify, yellowify from kpops.utils.yaml_loading import load_yaml_file -PATH_KPOPS_MAIN = PATH_ROOT / "kpops/cli/main.py" -PATH_CLI_COMMANDS_DOC = PATH_ROOT / "docs/docs/user/references/cli-commands.md" -PATH_DOCS_RESOURCES = PATH_ROOT / "docs/docs/resources" +PATH_KPOPS_MAIN = ROOT / "kpops/cli/main.py" +PATH_CLI_COMMANDS_DOC = ROOT / "docs/docs/user/references/cli-commands.md" +PATH_DOCS_RESOURCES = ROOT / "docs/docs/resources" PATH_DOCS_COMPONENTS = PATH_DOCS_RESOURCES / "pipeline-components" PATH_DOCS_COMPONENTS_DEPENDENCIES = ( PATH_DOCS_COMPONENTS / "dependencies/pipeline_component_dependencies.yaml" @@ -212,16 +212,14 @@ def get_sections(component_name: str, *, exist_changes: bool) -> KpopsComponent: ] component_sections_not_inherited: list[ str - ] = DEFAULTS_PIPELINE_COMPONENT_DEPENDENCIES[ - component_file_name - ] # type: ignore [reportGeneralTypeIssues] + ] = DEFAULTS_PIPELINE_COMPONENT_DEPENDENCIES[component_file_name] # type: ignore [reportGeneralTypeIssues] return KpopsComponent(component_sections, component_sections_not_inherited) if __name__ == "__main__": # Check if the dependencies have been modified if not { - str(file.relative_to(PATH_ROOT)) for file in DANGEROUS_FILES_TO_CHANGE + str(file.relative_to(ROOT)) for file in DANGEROUS_FILES_TO_CHANGE }.isdisjoint(SCRIPT_ARGUMENTS): # Set `is_change_present` to indicate that dependencies need to be regenerated is_change_present = True diff --git a/hooks/gen_docs/gen_docs_env_vars.py b/hooks/gen_docs/gen_docs_env_vars.py index ac88b82b6..d347ed8b5 100644 --- a/hooks/gen_docs/gen_docs_env_vars.py +++ b/hooks/gen_docs/gen_docs_env_vars.py @@ -18,12 +18,12 @@ except ImportError: from typing_extensions import Self -from hooks import PATH_ROOT +from hooks import ROOT from hooks.gen_docs import IterableStrEnum from kpops.cli import main from kpops.cli.pipeline_config import PipelineConfig -PATH_DOCS_RESOURCES = PATH_ROOT / "docs/docs/resources" +PATH_DOCS_RESOURCES = ROOT / "docs/docs/resources" PATH_DOCS_VARIABLES = PATH_DOCS_RESOURCES / "variables" PATH_CONFIG_ENV_VARS_DOTENV_FILE = PATH_DOCS_VARIABLES / "config_env_vars.env" @@ -374,8 +374,7 @@ def gen_vars( if __name__ == "__main__": # copy examples from tests resources shutil.copyfile( - PATH_ROOT - / "tests/pipeline/resources/component-type-substitution/pipeline.yaml", + ROOT / "tests/pipeline/resources/component-type-substitution/pipeline.yaml", PATH_DOCS_VARIABLES / "variable_substitution.yaml", ) # Find all config-related env variables and write them into a file diff --git a/hooks/gen_schema.py b/hooks/gen_schema.py index 7d6b99f2e..726da823f 100644 --- a/hooks/gen_schema.py +++ b/hooks/gen_schema.py @@ -3,10 +3,10 @@ from io import StringIO from pathlib import Path -from hooks import PATH_ROOT +from hooks import ROOT from kpops.utils.gen_schema import SchemaScope, gen_config_schema, gen_pipeline_schema -PATH_TO_SCHEMA = PATH_ROOT / "docs/docs/schema" +PATH_TO_SCHEMA = ROOT / "docs/docs/schema" def gen_schema(scope: SchemaScope): diff --git a/kpops/cli/main.py b/kpops/cli/main.py index c7f0e26a1..b989cc01e 100644 --- a/kpops/cli/main.py +++ b/kpops/cli/main.py @@ -271,9 +271,7 @@ def generate( return pipeline -@app.command( - help="Deploy pipeline steps" -) # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 +@app.command(help="Deploy pipeline steps") # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 def deploy( pipeline_path: Path = PIPELINE_PATH_ARG, components_module: Optional[str] = COMPONENTS_MODULES, @@ -296,9 +294,7 @@ def deploy( component.deploy(dry_run) -@app.command( - help="Destroy pipeline steps" -) # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 +@app.command(help="Destroy pipeline steps") # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 def destroy( pipeline_path: Path = PIPELINE_PATH_ARG, components_module: Optional[str] = COMPONENTS_MODULES, @@ -320,9 +316,7 @@ def destroy( component.destroy(dry_run) -@app.command( - help="Reset pipeline steps" -) # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 +@app.command(help="Reset pipeline steps") # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 def reset( pipeline_path: Path = PIPELINE_PATH_ARG, components_module: Optional[str] = COMPONENTS_MODULES, @@ -345,9 +339,7 @@ def reset( component.reset(dry_run) -@app.command( - help="Clean pipeline steps" -) # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 +@app.command(help="Clean pipeline steps") # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 def clean( pipeline_path: Path = PIPELINE_PATH_ARG, components_module: Optional[str] = COMPONENTS_MODULES, diff --git a/poetry.lock b/poetry.lock index e0cabdcba..05591986a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -80,51 +80,6 @@ soupsieve = ">1.2" html5lib = ["html5lib"] lxml = ["lxml"] -[[package]] -name = "black" -version = "23.7.0" -description = "The uncompromising code formatter." -optional = false -python-versions = ">=3.8" -files = [ - {file = "black-23.7.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:5c4bc552ab52f6c1c506ccae05681fab58c3f72d59ae6e6639e8885e94fe2587"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:552513d5cd5694590d7ef6f46e1767a4df9af168d449ff767b13b084c020e63f"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:86cee259349b4448adb4ef9b204bb4467aae74a386bce85d56ba4f5dc0da27be"}, - {file = "black-23.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:501387a9edcb75d7ae8a4412bb8749900386eaef258f1aefab18adddea1936bc"}, - {file = "black-23.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:fb074d8b213749fa1d077d630db0d5f8cc3b2ae63587ad4116e8a436e9bbe995"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:b5b0ee6d96b345a8b420100b7d71ebfdd19fab5e8301aff48ec270042cd40ac2"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:893695a76b140881531062d48476ebe4a48f5d1e9388177e175d76234ca247cd"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:c333286dc3ddca6fdff74670b911cccedacb4ef0a60b34e491b8a67c833b343a"}, - {file = "black-23.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831d8f54c3a8c8cf55f64d0422ee875eecac26f5f649fb6c1df65316b67c8926"}, - {file = "black-23.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:7f3bf2dec7d541b4619b8ce526bda74a6b0bffc480a163fed32eb8b3c9aed8ad"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:f9062af71c59c004cd519e2fb8f5d25d39e46d3af011b41ab43b9c74e27e236f"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:01ede61aac8c154b55f35301fac3e730baf0c9cf8120f65a9cd61a81cfb4a0c3"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:327a8c2550ddc573b51e2c352adb88143464bb9d92c10416feb86b0f5aee5ff6"}, - {file = "black-23.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1c6022b86f83b632d06f2b02774134def5d4d4f1dac8bef16d90cda18ba28a"}, - {file = "black-23.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:27eb7a0c71604d5de083757fbdb245b1a4fae60e9596514c6ec497eb63f95320"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:8417dbd2f57b5701492cd46edcecc4f9208dc75529bcf76c514864e48da867d9"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:47e56d83aad53ca140da0af87678fb38e44fd6bc0af71eebab2d1f59b1acf1d3"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:25cc308838fe71f7065df53aedd20327969d05671bac95b38fdf37ebe70ac087"}, - {file = "black-23.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:642496b675095d423f9b8448243336f8ec71c9d4d57ec17bf795b67f08132a91"}, - {file = "black-23.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:ad0014efc7acf0bd745792bd0d8857413652979200ab924fbf239062adc12491"}, - {file = "black-23.7.0-py3-none-any.whl", hash = "sha256:9fd59d418c60c0348505f2ddf9609c1e1de8e7493eab96198fc89d9f865e7a96"}, - {file = "black-23.7.0.tar.gz", hash = "sha256:022a582720b0d9480ed82576c920a8c1dde97cc38ff11d8d8859b3bd6ca9eedb"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -packaging = ">=22.0" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - [[package]] name = "cachetools" version = "5.2.0" @@ -735,17 +690,6 @@ files = [ {file = "mkdocs_material_extensions-1.3.tar.gz", hash = "sha256:f0446091503acb110a7cab9349cbc90eeac51b58d1caa92a704a81ca1e24ddbd"}, ] -[[package]] -name = "mypy-extensions" -version = "0.4.3" -description = "Experimental type system extensions for programs checked with the mypy typechecker." -optional = false -python-versions = "*" -files = [ - {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, - {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, -] - [[package]] name = "nodeenv" version = "1.7.0" @@ -1433,28 +1377,28 @@ jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] [[package]] name = "ruff" -version = "0.1.1" +version = "0.1.3" description = "An extremely fast Python linter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.1.1-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:b7cdc893aef23ccc14c54bd79a8109a82a2c527e11d030b62201d86f6c2b81c5"}, - {file = "ruff-0.1.1-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:620d4b34302538dbd8bbbe8fdb8e8f98d72d29bd47e972e2b59ce6c1e8862257"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a909d3930afdbc2e9fd893b0034479e90e7981791879aab50ce3d9f55205bd6"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3305d1cb4eb8ff6d3e63a48d1659d20aab43b49fe987b3ca4900528342367145"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c34ae501d0ec71acf19ee5d4d889e379863dcc4b796bf8ce2934a9357dc31db7"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:6aa7e63c3852cf8fe62698aef31e563e97143a4b801b57f920012d0e07049a8d"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2d68367d1379a6b47e61bc9de144a47bcdb1aad7903bbf256e4c3d31f11a87ae"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bc11955f6ce3398d2afe81ad7e49d0ebf0a581d8bcb27b8c300281737735e3a3"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cbbd8eead88ea83a250499074e2a8e9d80975f0b324b1e2e679e4594da318c25"}, - {file = "ruff-0.1.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f4780e2bb52f3863a565ec3f699319d3493b83ff95ebbb4993e59c62aaf6e75e"}, - {file = "ruff-0.1.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8f5b24daddf35b6c207619301170cae5d2699955829cda77b6ce1e5fc69340df"}, - {file = "ruff-0.1.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d3f9ac658ba29e07b95c80fa742b059a55aefffa8b1e078bc3c08768bdd4b11a"}, - {file = "ruff-0.1.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:3521bf910104bf781e6753282282acc145cbe3eff79a1ce6b920404cd756075a"}, - {file = "ruff-0.1.1-py3-none-win32.whl", hash = "sha256:ba3208543ab91d3e4032db2652dcb6c22a25787b85b8dc3aeff084afdc612e5c"}, - {file = "ruff-0.1.1-py3-none-win_amd64.whl", hash = "sha256:3ff3006c97d9dc396b87fb46bb65818e614ad0181f059322df82bbfe6944e264"}, - {file = "ruff-0.1.1-py3-none-win_arm64.whl", hash = "sha256:e140bd717c49164c8feb4f65c644046fe929c46f42493672853e3213d7bdbce2"}, - {file = "ruff-0.1.1.tar.gz", hash = "sha256:c90461ae4abec261609e5ea436de4a4b5f2822921cf04c16d2cc9327182dbbcc"}, + {file = "ruff-0.1.3-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:b46d43d51f7061652eeadb426a9e3caa1e0002470229ab2fc19de8a7b0766901"}, + {file = "ruff-0.1.3-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:b8afeb9abd26b4029c72adc9921b8363374f4e7edb78385ffaa80278313a15f9"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca3cf365bf32e9ba7e6db3f48a4d3e2c446cd19ebee04f05338bc3910114528b"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4874c165f96c14a00590dcc727a04dca0cfd110334c24b039458c06cf78a672e"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eec2dd31eed114e48ea42dbffc443e9b7221976554a504767ceaee3dd38edeb8"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:dc3ec4edb3b73f21b4aa51337e16674c752f1d76a4a543af56d7d04e97769613"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e3de9ed2e39160800281848ff4670e1698037ca039bda7b9274f849258d26ce"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c595193881922cc0556a90f3af99b1c5681f0c552e7a2a189956141d8666fe8"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f75e670d529aa2288cd00fc0e9b9287603d95e1536d7a7e0cafe00f75e0dd9d"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:76dd49f6cd945d82d9d4a9a6622c54a994689d8d7b22fa1322983389b4892e20"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:918b454bc4f8874a616f0d725590277c42949431ceb303950e87fef7a7d94cb3"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d8859605e729cd5e53aa38275568dbbdb4fe882d2ea2714c5453b678dca83784"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:0b6c55f5ef8d9dd05b230bb6ab80bc4381ecb60ae56db0330f660ea240cb0d4a"}, + {file = "ruff-0.1.3-py3-none-win32.whl", hash = "sha256:3e7afcbdcfbe3399c34e0f6370c30f6e529193c731b885316c5a09c9e4317eef"}, + {file = "ruff-0.1.3-py3-none-win_amd64.whl", hash = "sha256:7a18df6638cec4a5bd75350639b2bb2a2366e01222825562c7346674bdceb7ea"}, + {file = "ruff-0.1.3-py3-none-win_arm64.whl", hash = "sha256:12fd53696c83a194a2db7f9a46337ce06445fb9aa7d25ea6f293cf75b21aca9f"}, + {file = "ruff-0.1.3.tar.gz", hash = "sha256:3ba6145369a151401d5db79f0a47d50e470384d0d89d0d6f7fab0b589ad07c34"}, ] [[package]] @@ -1817,4 +1761,4 @@ watchmedo = ["PyYAML (>=3.10)"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "dfdbdd18867682898d908dd3a3e19741993478eb7b722d3dd14a5c2acd0b9826" +content-hash = "cfa6447fe58b9cffa8247c4d2e09fa988bbb7484a2a728e432a63c05872e3bd8" diff --git a/pyproject.toml b/pyproject.toml index e65abe824..f07648ca0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,8 +45,7 @@ pytest-mock = "^3.10.0" pytest-timeout = "^2.1.0" snapshottest = "^0.6.0" pre-commit = "^2.19.0" -ruff = "^0.1.1" -black = "^23.7.0" +ruff = "^0.1.3" typer-cli = "^0.0.13" pyright = "^1.1.314" pytest-rerunfailures = "^11.1.2" @@ -68,8 +67,23 @@ mike = "^1.1.2" [tool.ruff] ignore = [ - # "E203", # whitespace before ':' -- Not PEP8 compliant, black won't correct it, add when out of nursery - "E501", # Line too long -- Clashes with `black` +# Rules in conflict with `ruff-format` -- START + "W191", # Checks for indentation that uses tabs. Spaces are preferred. + # "E111", # Checks for indentation with a non-multiple of 4 spaces, add when out of nursery + # "E114", # Checks for indentation of comments with a non-multiple of 4 spaces, add when out of nursery + # "E117", # Checks for over-indented code, add when out of nursery + "E501", # Line too long + "D206", # Checks for docstrings that are indented with tabs. + "D300", # Checks for docstrings that use '''triple single quotes''' instead of """triple double quotes""". + "Q000", # Checks for inline strings that use single quotes. + "Q001", # Checks for multiline strings that use single quotes + "Q002", # Checks for docstrings that use single quotes. + "Q003", # Checks for strings that include escaped quotes. + "COM812", # Checks for the absence of trailing commas. + "COM819", # Checks for the presence of prohibited trailing commas. + "ISC001", # Checks for implicitly concatenated strings on a single line. + "ISC002", # Checks for implicitly concatenated strings that span multiple lines. +# Rules in conflict with `ruff-format` -- END "D1", # Missing docstring for {} -- Inconvenient to enforce # The following "D" rules do not correspond to our coding style. We use the pep257 convention, but # "D212" should not be ignored. In ruff (0.0.291) we cannot select a rule that is excluded by specifying @@ -94,7 +108,6 @@ ignore = [ "B010", # Do not call setattr with a constant attribute value. -- Not always applicable "RUF012", # type class attrs with `ClassVar` -- Too strict/trigger-happy "UP007", # Use X | Y for type annotations -- `typer` doesn't support it - "COM812", # Checks for the absence of trailing commas -- leads to undesirable behavior from formatters "PIE804", # Unnecessary `dict` kwargs -- Inconvenient to enforce "RET505", # Unnecessary {branch} after return statement -- Lots of false positives "RET506", # Unnecessary {branch} after raise statement -- Lots of false positives @@ -146,14 +159,11 @@ output-format = "grouped" show-fixes = true task-tags = ["TODO", "HACK", "FIXME", "XXX"] target-version = "py310" -exclude = ["tests/*snapshots/*"] +extend-exclude = ["tests/*snapshots/*"] [tool.ruff.extend-per-file-ignores] "tests/*/__init__.py" = ["F401"] -[tool.ruff.isort] -split-on-trailing-comma = false - [tool.ruff.flake8-bugbear] extend-immutable-calls = ["typer.Argument"] From 72594f93068209ecae323c8aa41cf4b33416fd65 Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Mon, 6 Nov 2023 14:32:01 +0200 Subject: [PATCH 06/16] Replace black with ruff (#365) --- .github/workflows/ci.yaml | 6 +- .github/workflows/release.yaml | 1 + .pre-commit-config.yaml | 21 +- CHANGELOG.md | 481 +------------------------ CONTRIBUTING.md | 1 + docs/docs/developer/contributing.md | 19 + docs/docs/developer/formatting.md | 12 - docs/docs/developer/getting-started.md | 12 + docs/docs/stylesheets/extra.css | 17 + docs/docs/user/changelog.md | 480 ++++++++++++++++++++++++ docs/mkdocs.yml | 8 +- hooks/__init__.py | 2 +- hooks/gen_docs/gen_docs_cli_usage.py | 6 +- hooks/gen_docs/gen_docs_components.py | 14 +- hooks/gen_docs/gen_docs_env_vars.py | 7 +- hooks/gen_schema.py | 4 +- kpops/cli/main.py | 16 +- poetry.lock | 94 +---- pyproject.toml | 28 +- 19 files changed, 608 insertions(+), 621 deletions(-) mode change 100644 => 120000 CHANGELOG.md create mode 120000 CONTRIBUTING.md create mode 100644 docs/docs/developer/contributing.md delete mode 100644 docs/docs/developer/formatting.md create mode 100644 docs/docs/developer/getting-started.md create mode 100644 docs/docs/user/changelog.md diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fe87e8436..07338b2dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,11 +43,11 @@ jobs: echo "::add-matcher::.github/ruff-matcher.json" poetry run ruff check . --config pyproject.toml --output-format text --no-fix else - poetry run pre-commit run ruff --all-files --show-diff-on-failure + poetry run pre-commit run ruff-lint --all-files --show-diff-on-failure fi; - - name: Formatting (black) - run: poetry run pre-commit run black --all-files --show-diff-on-failure + - name: Formatting (ruff) + run: poetry run pre-commit run ruff-format --all-files --show-diff-on-failure - name: Typing (pyright) run: poetry run pre-commit run pyright --all-files diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9171e6c70..d560502be 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,6 +22,7 @@ jobs: poetry-version: "1.5.1" changelog: true changelog-config: "./.github/changelog-config.json" + changelog-file: "./docs/docs/user/changelog.md" secrets: github-username: "${{ secrets.GH_USERNAME }}" github-email: "${{ secrets.GH_EMAIL }}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c709b20a..457a712b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,20 @@ repos: - repo: local hooks: - - id: ruff - name: ruff - entry: ruff check . - args: [ --config, pyproject.toml, --fix, --show-fixes, --exit-non-zero-on-fix ] + - id: ruff-lint + name: ruff-lint + entry: ruff check + args: [ --force-exclude, --config, pyproject.toml, --fix, --show-fixes, --exit-non-zero-on-fix ] language: system types_or: [python] require_serial: true # run once for all files - pass_filenames: false - - id: black - name: black - entry: black + - id: ruff-format + name: ruff-format + entry: ruff format + args: [ --force-exclude, --config, pyproject.toml ] language: system - types_or: [python, pyi] + types_or: [python] require_serial: true # run once for all files - exclude: ^tests/.*snapshots/ - id: pyright name: pyright entry: pyright @@ -38,6 +37,7 @@ repos: types: [python] require_serial: true exclude: ^tests/.*snapshots/ + pass_filenames: false - id: gen-docs-env-vars name: gen-docs-env-vars entry: python hooks/gen_docs/gen_docs_env_vars.py @@ -45,6 +45,7 @@ repos: types: [python] require_serial: true exclude: ^tests/.*snapshots/ + pass_filenames: false - id: gen-docs-components name: gen-docs-components entry: python hooks/gen_docs/gen_docs_components.py diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index b964b7de2..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,480 +0,0 @@ -# Changelog -## [2.0.11](https://github.com/bakdata/kpops/releases/tag/2.0.11) - Release Date: [2023-10-24] - -### 🐛 Fixes - -- Fix early exit upon Helm exit code 1 - [#376](https://github.com/bakdata/kpops/pull/376) - -- Fix docs setup page list indentation - [#377](https://github.com/bakdata/kpops/pull/377) - - -### 📝 Documentation - -- Migrate deprecated mkdocs-material-extensions - [#378](https://github.com/bakdata/kpops/pull/378) - -- Fix docs setup page list indentation - [#377](https://github.com/bakdata/kpops/pull/377) - -- Exclude resources from docs search - [#371](https://github.com/bakdata/kpops/pull/371) - - - - - - -## [2.0.10](https://github.com/bakdata/kpops/releases/tag/2.0.10) - Release Date: [2023-10-12] - -### 🌀 Miscellaneous - -- Fix environment variables documentation generation - [#362](https://github.com/bakdata/kpops/pull/362) - -- Introduce ruff - [#363](https://github.com/bakdata/kpops/pull/363) - -- Print details on connector name mismatch error - [#369](https://github.com/bakdata/kpops/pull/369) - -- Enable transparent OS environment lookups from internal environment - [#368](https://github.com/bakdata/kpops/pull/368) - - - - - - -## [2.0.9](https://github.com/bakdata/kpops/releases/tag/2.0.9) - Release Date: [2023-09-19] - -### 🐛 Fixes - -- Fix Kafka connect config name for deletion - [#361](https://github.com/bakdata/kpops/pull/361) - - -### 📝 Documentation - -- Fix link to kpops-examples - [#357](https://github.com/bakdata/kpops/pull/357) - - - - - - -## [2.0.8](https://github.com/bakdata/kpops/releases/tag/2.0.8) - Release Date: [2023-09-06] - -### 🐛 Fixes - -- Fix config.yaml overriding environment variables - [#353](https://github.com/bakdata/kpops/pull/353) - - -### 🏭 Refactor - -- Refactor component prefix & name - [#326](https://github.com/bakdata/kpops/pull/326) - -- Remove unnecessary condition during inflate - [#328](https://github.com/bakdata/kpops/pull/328) - - - - - - -## [2.0.7](https://github.com/bakdata/kpops/releases/tag/2.0.7) - Release Date: [2023-08-31] - -### 🐛 Fixes - -- Print only rendered templates when `--template` flag is set - [#350](https://github.com/bakdata/kpops/pull/350) - - -### 📝 Documentation - -- Add migration guide - [#352](https://github.com/bakdata/kpops/pull/352) - - - - - - -## [2.0.6](https://github.com/bakdata/kpops/releases/tag/2.0.6) - Release Date: [2023-08-30] - -### 🏭 Refactor - -- Simplify deployment with local Helm charts - [#349](https://github.com/bakdata/kpops/pull/349) - - - - - - -## [2.0.5](https://github.com/bakdata/kpops/releases/tag/2.0.5) - Release Date: [2023-08-30] - -### 🐛 Fixes - -- Fix versioning of docs when releasing - [#346](https://github.com/bakdata/kpops/pull/346) - - - - - - -## [2.0.4](https://github.com/bakdata/kpops/releases/tag/2.0.4) - Release Date: [2023-08-29] - -### 🐛 Fixes - -- Fix GitHub ref variable for pushing docs to main branch - [#343](https://github.com/bakdata/kpops/pull/343) - - -### 📝 Documentation - -- Add `dprint` as the markdown formatter - [#337](https://github.com/bakdata/kpops/pull/337) - -- Publish pre-release docs for PRs & main branch - [#339](https://github.com/bakdata/kpops/pull/339) - -- Align docs colours - [#345](https://github.com/bakdata/kpops/pull/345) - - -### 🌀 Miscellaneous - -- Exclude abstract components from pipeline schema - [#332](https://github.com/bakdata/kpops/pull/332) - - - - - - -## [2.0.3](https://github.com/bakdata/kpops/releases/tag/2.0.3) - Release Date: [2023-08-24] - -### 🐛 Fixes - -- Fix GitHub action error in non-Python projects - [#340](https://github.com/bakdata/kpops/pull/340) - - -### 🌀 Miscellaneous - -- Lint GitHub action - [#342](https://github.com/bakdata/kpops/pull/342) - - - - - - -## [2.0.2](https://github.com/bakdata/kpops/releases/tag/2.0.2) - Release Date: [2023-08-23] - -### 📝 Documentation - -- Add version dropdown to the documentation - [#336](https://github.com/bakdata/kpops/pull/336) - -- Break the documentation down into smaller subsection - [#329](https://github.com/bakdata/kpops/pull/329) - - - - - - -## [2.0.1](https://github.com/bakdata/kpops/releases/tag/2.0.1) - Release Date: [2023-08-22] - -### 🐛 Fixes - -- Fix optional flags in GitHub action - [#334](https://github.com/bakdata/kpops/pull/334) - - - - - - -## [2.0.0](https://github.com/bakdata/kpops/releases/tag/2.0.0) - Release Date: [2023-08-17] - -### 🏗️ Breaking changes - -- Remove camel case conversion of internal models - [#308](https://github.com/bakdata/kpops/pull/308) - -- Derive component type automatically from class name - [#309](https://github.com/bakdata/kpops/pull/309) - -- Refactor input/output types - [#232](https://github.com/bakdata/kpops/pull/232) - -- v2 - [#321](https://github.com/bakdata/kpops/pull/321) - - -### 🚀 Features - -- Automatically support schema generation for custom components - [#307](https://github.com/bakdata/kpops/pull/307) - -- Derive component type automatically from class name - [#309](https://github.com/bakdata/kpops/pull/309) - - -### 🏭 Refactor - -- Refactor input/output types - [#232](https://github.com/bakdata/kpops/pull/232) - - -### 📝 Documentation - -- Fix editor integration example in docs - [#273](https://github.com/bakdata/kpops/pull/273) - - - - - - -## [1.7.2](https://github.com/bakdata/kpops/releases/tag/1.7.2) - Release Date: [2023-08-16] - -### 🏭 Refactor - -- Refactor Kafka Connect handler - [#322](https://github.com/bakdata/kpops/pull/322) - - -### 📝 Documentation - -- Add KPOps Runner GitHub Action to the documentation - [#325](https://github.com/bakdata/kpops/pull/325) - -- Remove `:type` and `:rtype` from docstrings - [#324](https://github.com/bakdata/kpops/pull/324) - - - - - - -## [1.7.1](https://github.com/bakdata/kpops/releases/tag/1.7.1) - Release Date: [2023-08-15] - -### 📝 Documentation - -- Modularize and autogenerate examples for the documentation - [#267](https://github.com/bakdata/kpops/pull/267) - -- Update the variable documentation - [#266](https://github.com/bakdata/kpops/pull/266) - - - - - - -## [1.7.0](https://github.com/bakdata/kpops/releases/tag/1.7.0) - Release Date: [2023-08-15] - -### 🚀 Features - -- Add flag to exclude pipeline steps - [#300](https://github.com/bakdata/kpops/pull/300) - - - - - - -## [1.6.0](https://github.com/bakdata/kpops/releases/tag/1.6.0) - Release Date: [2023-08-10] - -### 🏭 Refactor - -- Refactor handling of Helm flags - [#319](https://github.com/bakdata/kpops/pull/319) - - - - - - -## [1.5.0](https://github.com/bakdata/kpops/releases/tag/1.5.0) - Release Date: [2023-08-10] - -### 🚀 Features - -- Refactor Helm wrapper and add `--set-file` flag - [#311](https://github.com/bakdata/kpops/pull/311) - - -### 🏭 Refactor - -- Refactor Helm wrapper and add `--set-file` flag - [#311](https://github.com/bakdata/kpops/pull/311) - -- Set default for ToSection topics - [#313](https://github.com/bakdata/kpops/pull/313) - -- Annotate types for ToSection models mapping - [#315](https://github.com/bakdata/kpops/pull/315) - - -### 🌀 Miscellaneous - -- Check Poetry lock file consistency - [#316](https://github.com/bakdata/kpops/pull/316) - - - - - - -## [1.4.0](https://github.com/bakdata/kpops/releases/tag/1.4.0) - Release Date: [2023-08-02] - -### 🐛 Fixes - -- Validate unique step names - [#292](https://github.com/bakdata/kpops/pull/292) - - -### 🏭 Refactor - -- Order PipelineComponent fields - [#290](https://github.com/bakdata/kpops/pull/290) - -- Migrate requests to httpx - [#302](https://github.com/bakdata/kpops/pull/302) - -- Refactor CLI using dtyper - [#306](https://github.com/bakdata/kpops/pull/306) - - -### 🌀 Miscellaneous - -- Update Black - [#294](https://github.com/bakdata/kpops/pull/294) - -- Fix vulnerability in mkdocs-material - [#295](https://github.com/bakdata/kpops/pull/295) - -- Move breaking changes section upper in the change log config - [#287](https://github.com/bakdata/kpops/pull/287) - - - - - - -## [1.3.2](https://github.com/bakdata/kpops/releases/tag/1.3.2) - Release Date: [2023-07-13] - -### 🐛 Fixes - -- Exclude Helm tests from dry-run diff - [#293](https://github.com/bakdata/kpops/pull/293) - - - - - - -## [1.3.1](https://github.com/bakdata/kpops/releases/tag/1.3.1) - Release Date: [2023-07-11] - -### 🏭 Refactor - -- Remove workaround for pipeline steps - [#276](https://github.com/bakdata/kpops/pull/276) - - -### 🌀 Miscellaneous - -- Update codeowners - [#281](https://github.com/bakdata/kpops/pull/281) - -- Reactivate Windows CI - [#255](https://github.com/bakdata/kpops/pull/255) - -- Downgrade Poetry version on the Windows CI pipeline - [#286](https://github.com/bakdata/kpops/pull/286) - -- Set ANSI theme for output of `kpops generate` - [#289](https://github.com/bakdata/kpops/pull/289) - - - - - - -## [1.3.0](https://github.com/bakdata/kpops/releases/tag/1.3.0) - Release Date: [2023-07-07] - -### 🏭 Refactor - -- Plural broker field in pipeline config - [#278](https://github.com/bakdata/kpops/pull/278) - - -### 📝 Documentation - -- Update KPOps runner readme for dev versions - [#279](https://github.com/bakdata/kpops/pull/279) - - -### 🏗️ Breaking changes - -- Plural broker field in pipeline config - [#278](https://github.com/bakdata/kpops/pull/278) - - -### 🌀 Miscellaneous - -- Add breaking changes section to change log config - [#280](https://github.com/bakdata/kpops/pull/280) - - - - - - -## [1.2.4](https://github.com/bakdata/kpops/releases/tag/1.2.4) - Release Date: [2023-06-27] - -### 🌀 Miscellaneous - -- Update changelog action to contain miscellaneous PRs - [#269](https://github.com/bakdata/kpops/pull/269) - - - - - - -## [1.2.3](https://github.com/bakdata/kpops/releases/tag/1.2.3) - Release Date: [2023-06-22] - -### 🐛 Fixes - -- Refactor custom component validation & hide field from kpops output - [#265](https://github.com/bakdata/kpops/pull/265) - - -### 🏭 Refactor - -- Refactor custom component validation & hide field from kpops output - [#265](https://github.com/bakdata/kpops/pull/265) - - - - -### 🌀 Miscellaneous - - - -## [1.2.2](https://github.com/bakdata/kpops/releases/tag/1.2.2) - Release Date: [2023-06-21] - - - -### 🌀 Miscellaneous - -- Create workflow to lint CI - [#260](https://github.com/bakdata/kpops/pull/260) - -- Fix update docs when releasing - [#261](https://github.com/bakdata/kpops/pull/261) - -- Rename change log message for uncategorized issues - [#262](https://github.com/bakdata/kpops/pull/262) - - - -## [1.2.1](https://github.com/bakdata/kpops/releases/tag/1.2.1) - Release Date: [2023-06-21] - - - -Uncategorized - -- Fix update docs in release workflow - [#258](https://github.com/bakdata/kpops/pull/258) - - - -## [1.2.0](https://github.com/bakdata/kpops/releases/tag/1.2.0) - Release Date: [2023-06-21] - -### 🚀 Features - -- Add `helm repo update ` for Helm >3.7 - [#239](https://github.com/bakdata/kpops/pull/239) - - -### 🐛 Fixes - -- add --namespace option to Helm template command - [#237](https://github.com/bakdata/kpops/pull/237) - -- Add missing type annotation for Pydantic attributes - [#238](https://github.com/bakdata/kpops/pull/238) - -- Fix helm version check - [#242](https://github.com/bakdata/kpops/pull/242) - -- Fix Helm Version Check - [#244](https://github.com/bakdata/kpops/pull/244) - -- Fix import from external module - [#256](https://github.com/bakdata/kpops/pull/256) - - -### 🏭 Refactor - -- Remove enable option from helm diff - [#235](https://github.com/bakdata/kpops/pull/235) - -- Refactor variable substitution - [#198](https://github.com/bakdata/kpops/pull/198) - - - - -Uncategorized - -- Add background to docs home page - [#236](https://github.com/bakdata/kpops/pull/236) - -- Update Poetry version in CI - [#247](https://github.com/bakdata/kpops/pull/247) - -- Add pip cache in KPOps runner action - [#249](https://github.com/bakdata/kpops/pull/249) - -- Check types using Pyright - [#251](https://github.com/bakdata/kpops/pull/251) - -- Remove MyPy - [#252](https://github.com/bakdata/kpops/pull/252) - -- Disable broken Windows CI temporarily - [#253](https://github.com/bakdata/kpops/pull/253) - -- Update release and publish workflows - [#254](https://github.com/bakdata/kpops/pull/254) - -- Fix release & publish workflows - [#257](https://github.com/bakdata/kpops/pull/257) - - - - diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 120000 index 000000000..d31599794 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +docs/docs/user/changelog.md \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 120000 index 000000000..92403f4d9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +docs/docs/developer/contributing.md \ No newline at end of file diff --git a/docs/docs/developer/contributing.md b/docs/docs/developer/contributing.md new file mode 100644 index 000000000..ff55361cc --- /dev/null +++ b/docs/docs/developer/contributing.md @@ -0,0 +1,19 @@ +# How to contribute + +**Welcome!** We are glad to have you visit our contributing guide! + +If you find any bugs or have suggestions for improvements, please open an [issue](https://github.com/bakdata/kpops/issues/new) and optionally a [pull request (PR)](https://github.com/bakdata/kpops/compare). In the case of a PR, we would appreciate it if you preface it with an issue outlining your goal and means of achieving it. + +## Style + +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. 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`. + +### Markdown + +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/formatting.md b/docs/docs/developer/formatting.md deleted file mode 100644 index 54ea1b6d9..000000000 --- a/docs/docs/developer/formatting.md +++ /dev/null @@ -1,12 +0,0 @@ -# Formatting - -## Markdown - -To ensure a consistent markdown style, we use [dprint](https://dprint.dev) to check and reformat. - -```shell -dprint fmt -``` - -Use the [official documentation](https://dprint.dev/setup/) to set up dprint. -The configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json). diff --git a/docs/docs/developer/getting-started.md b/docs/docs/developer/getting-started.md new file mode 100644 index 000000000..e48d1221a --- /dev/null +++ b/docs/docs/developer/getting-started.md @@ -0,0 +1,12 @@ +# Getting started + +**Welcome!** We are glad to have you visit our developer guide! If you find any bugs or have suggestions for improvements, please open an [issue](https://github.com/bakdata/kpops/issues/new) and optionally a [pull request (PR)](https://github.com/bakdata/kpops/compare). In the case of a PR, we would appreciate it if you preface it with an issue outlining your goal and means of achieving it. + +Find more about our code-style or insights into KPOps' code base here in our developer guide. + + + +!!! wip "Work in progress" + The developer guide is still under construction. If you have a question left unanswered here, feel free to ask it by opening an issue. + + diff --git a/docs/docs/stylesheets/extra.css b/docs/docs/stylesheets/extra.css index ae2953c82..24d84f6c4 100644 --- a/docs/docs/stylesheets/extra.css +++ b/docs/docs/stylesheets/extra.css @@ -13,6 +13,8 @@ /* Color the links with the primary color */ --md-typeset-a-color: var(--md-primary-fg-color); + + --md-admonition-icon--wip: url('data:image/svg+xml;charset=utf-8,') } .md-typeset .md-button, .md-button--primary { @@ -22,3 +24,18 @@ .md-typeset .md-button:hover, .md-button--primary:hover { border-color: white; } + +.md-typeset .admonition.wip, +.md-typeset details.wip { +border-color: rgb(160, 45, 0); +} +.md-typeset .wip > .admonition-title, +.md-typeset .wip > summary { +background-color: rgb(255, 195, 172); +} +.md-typeset .wip > .admonition-title::before, +.md-typeset .wip > summary::before { +background-color: rgb(255, 77, 6); +-webkit-mask-image: var(--md-admonition-icon--wip); + mask-image: var(--md-admonition-icon--wip); +} diff --git a/docs/docs/user/changelog.md b/docs/docs/user/changelog.md new file mode 100644 index 000000000..b964b7de2 --- /dev/null +++ b/docs/docs/user/changelog.md @@ -0,0 +1,480 @@ +# Changelog +## [2.0.11](https://github.com/bakdata/kpops/releases/tag/2.0.11) - Release Date: [2023-10-24] + +### 🐛 Fixes + +- Fix early exit upon Helm exit code 1 - [#376](https://github.com/bakdata/kpops/pull/376) + +- Fix docs setup page list indentation - [#377](https://github.com/bakdata/kpops/pull/377) + + +### 📝 Documentation + +- Migrate deprecated mkdocs-material-extensions - [#378](https://github.com/bakdata/kpops/pull/378) + +- Fix docs setup page list indentation - [#377](https://github.com/bakdata/kpops/pull/377) + +- Exclude resources from docs search - [#371](https://github.com/bakdata/kpops/pull/371) + + + + + + +## [2.0.10](https://github.com/bakdata/kpops/releases/tag/2.0.10) - Release Date: [2023-10-12] + +### 🌀 Miscellaneous + +- Fix environment variables documentation generation - [#362](https://github.com/bakdata/kpops/pull/362) + +- Introduce ruff - [#363](https://github.com/bakdata/kpops/pull/363) + +- Print details on connector name mismatch error - [#369](https://github.com/bakdata/kpops/pull/369) + +- Enable transparent OS environment lookups from internal environment - [#368](https://github.com/bakdata/kpops/pull/368) + + + + + + +## [2.0.9](https://github.com/bakdata/kpops/releases/tag/2.0.9) - Release Date: [2023-09-19] + +### 🐛 Fixes + +- Fix Kafka connect config name for deletion - [#361](https://github.com/bakdata/kpops/pull/361) + + +### 📝 Documentation + +- Fix link to kpops-examples - [#357](https://github.com/bakdata/kpops/pull/357) + + + + + + +## [2.0.8](https://github.com/bakdata/kpops/releases/tag/2.0.8) - Release Date: [2023-09-06] + +### 🐛 Fixes + +- Fix config.yaml overriding environment variables - [#353](https://github.com/bakdata/kpops/pull/353) + + +### 🏭 Refactor + +- Refactor component prefix & name - [#326](https://github.com/bakdata/kpops/pull/326) + +- Remove unnecessary condition during inflate - [#328](https://github.com/bakdata/kpops/pull/328) + + + + + + +## [2.0.7](https://github.com/bakdata/kpops/releases/tag/2.0.7) - Release Date: [2023-08-31] + +### 🐛 Fixes + +- Print only rendered templates when `--template` flag is set - [#350](https://github.com/bakdata/kpops/pull/350) + + +### 📝 Documentation + +- Add migration guide - [#352](https://github.com/bakdata/kpops/pull/352) + + + + + + +## [2.0.6](https://github.com/bakdata/kpops/releases/tag/2.0.6) - Release Date: [2023-08-30] + +### 🏭 Refactor + +- Simplify deployment with local Helm charts - [#349](https://github.com/bakdata/kpops/pull/349) + + + + + + +## [2.0.5](https://github.com/bakdata/kpops/releases/tag/2.0.5) - Release Date: [2023-08-30] + +### 🐛 Fixes + +- Fix versioning of docs when releasing - [#346](https://github.com/bakdata/kpops/pull/346) + + + + + + +## [2.0.4](https://github.com/bakdata/kpops/releases/tag/2.0.4) - Release Date: [2023-08-29] + +### 🐛 Fixes + +- Fix GitHub ref variable for pushing docs to main branch - [#343](https://github.com/bakdata/kpops/pull/343) + + +### 📝 Documentation + +- Add `dprint` as the markdown formatter - [#337](https://github.com/bakdata/kpops/pull/337) + +- Publish pre-release docs for PRs & main branch - [#339](https://github.com/bakdata/kpops/pull/339) + +- Align docs colours - [#345](https://github.com/bakdata/kpops/pull/345) + + +### 🌀 Miscellaneous + +- Exclude abstract components from pipeline schema - [#332](https://github.com/bakdata/kpops/pull/332) + + + + + + +## [2.0.3](https://github.com/bakdata/kpops/releases/tag/2.0.3) - Release Date: [2023-08-24] + +### 🐛 Fixes + +- Fix GitHub action error in non-Python projects - [#340](https://github.com/bakdata/kpops/pull/340) + + +### 🌀 Miscellaneous + +- Lint GitHub action - [#342](https://github.com/bakdata/kpops/pull/342) + + + + + + +## [2.0.2](https://github.com/bakdata/kpops/releases/tag/2.0.2) - Release Date: [2023-08-23] + +### 📝 Documentation + +- Add version dropdown to the documentation - [#336](https://github.com/bakdata/kpops/pull/336) + +- Break the documentation down into smaller subsection - [#329](https://github.com/bakdata/kpops/pull/329) + + + + + + +## [2.0.1](https://github.com/bakdata/kpops/releases/tag/2.0.1) - Release Date: [2023-08-22] + +### 🐛 Fixes + +- Fix optional flags in GitHub action - [#334](https://github.com/bakdata/kpops/pull/334) + + + + + + +## [2.0.0](https://github.com/bakdata/kpops/releases/tag/2.0.0) - Release Date: [2023-08-17] + +### 🏗️ Breaking changes + +- Remove camel case conversion of internal models - [#308](https://github.com/bakdata/kpops/pull/308) + +- Derive component type automatically from class name - [#309](https://github.com/bakdata/kpops/pull/309) + +- Refactor input/output types - [#232](https://github.com/bakdata/kpops/pull/232) + +- v2 - [#321](https://github.com/bakdata/kpops/pull/321) + + +### 🚀 Features + +- Automatically support schema generation for custom components - [#307](https://github.com/bakdata/kpops/pull/307) + +- Derive component type automatically from class name - [#309](https://github.com/bakdata/kpops/pull/309) + + +### 🏭 Refactor + +- Refactor input/output types - [#232](https://github.com/bakdata/kpops/pull/232) + + +### 📝 Documentation + +- Fix editor integration example in docs - [#273](https://github.com/bakdata/kpops/pull/273) + + + + + + +## [1.7.2](https://github.com/bakdata/kpops/releases/tag/1.7.2) - Release Date: [2023-08-16] + +### 🏭 Refactor + +- Refactor Kafka Connect handler - [#322](https://github.com/bakdata/kpops/pull/322) + + +### 📝 Documentation + +- Add KPOps Runner GitHub Action to the documentation - [#325](https://github.com/bakdata/kpops/pull/325) + +- Remove `:type` and `:rtype` from docstrings - [#324](https://github.com/bakdata/kpops/pull/324) + + + + + + +## [1.7.1](https://github.com/bakdata/kpops/releases/tag/1.7.1) - Release Date: [2023-08-15] + +### 📝 Documentation + +- Modularize and autogenerate examples for the documentation - [#267](https://github.com/bakdata/kpops/pull/267) + +- Update the variable documentation - [#266](https://github.com/bakdata/kpops/pull/266) + + + + + + +## [1.7.0](https://github.com/bakdata/kpops/releases/tag/1.7.0) - Release Date: [2023-08-15] + +### 🚀 Features + +- Add flag to exclude pipeline steps - [#300](https://github.com/bakdata/kpops/pull/300) + + + + + + +## [1.6.0](https://github.com/bakdata/kpops/releases/tag/1.6.0) - Release Date: [2023-08-10] + +### 🏭 Refactor + +- Refactor handling of Helm flags - [#319](https://github.com/bakdata/kpops/pull/319) + + + + + + +## [1.5.0](https://github.com/bakdata/kpops/releases/tag/1.5.0) - Release Date: [2023-08-10] + +### 🚀 Features + +- Refactor Helm wrapper and add `--set-file` flag - [#311](https://github.com/bakdata/kpops/pull/311) + + +### 🏭 Refactor + +- Refactor Helm wrapper and add `--set-file` flag - [#311](https://github.com/bakdata/kpops/pull/311) + +- Set default for ToSection topics - [#313](https://github.com/bakdata/kpops/pull/313) + +- Annotate types for ToSection models mapping - [#315](https://github.com/bakdata/kpops/pull/315) + + +### 🌀 Miscellaneous + +- Check Poetry lock file consistency - [#316](https://github.com/bakdata/kpops/pull/316) + + + + + + +## [1.4.0](https://github.com/bakdata/kpops/releases/tag/1.4.0) - Release Date: [2023-08-02] + +### 🐛 Fixes + +- Validate unique step names - [#292](https://github.com/bakdata/kpops/pull/292) + + +### 🏭 Refactor + +- Order PipelineComponent fields - [#290](https://github.com/bakdata/kpops/pull/290) + +- Migrate requests to httpx - [#302](https://github.com/bakdata/kpops/pull/302) + +- Refactor CLI using dtyper - [#306](https://github.com/bakdata/kpops/pull/306) + + +### 🌀 Miscellaneous + +- Update Black - [#294](https://github.com/bakdata/kpops/pull/294) + +- Fix vulnerability in mkdocs-material - [#295](https://github.com/bakdata/kpops/pull/295) + +- Move breaking changes section upper in the change log config - [#287](https://github.com/bakdata/kpops/pull/287) + + + + + + +## [1.3.2](https://github.com/bakdata/kpops/releases/tag/1.3.2) - Release Date: [2023-07-13] + +### 🐛 Fixes + +- Exclude Helm tests from dry-run diff - [#293](https://github.com/bakdata/kpops/pull/293) + + + + + + +## [1.3.1](https://github.com/bakdata/kpops/releases/tag/1.3.1) - Release Date: [2023-07-11] + +### 🏭 Refactor + +- Remove workaround for pipeline steps - [#276](https://github.com/bakdata/kpops/pull/276) + + +### 🌀 Miscellaneous + +- Update codeowners - [#281](https://github.com/bakdata/kpops/pull/281) + +- Reactivate Windows CI - [#255](https://github.com/bakdata/kpops/pull/255) + +- Downgrade Poetry version on the Windows CI pipeline - [#286](https://github.com/bakdata/kpops/pull/286) + +- Set ANSI theme for output of `kpops generate` - [#289](https://github.com/bakdata/kpops/pull/289) + + + + + + +## [1.3.0](https://github.com/bakdata/kpops/releases/tag/1.3.0) - Release Date: [2023-07-07] + +### 🏭 Refactor + +- Plural broker field in pipeline config - [#278](https://github.com/bakdata/kpops/pull/278) + + +### 📝 Documentation + +- Update KPOps runner readme for dev versions - [#279](https://github.com/bakdata/kpops/pull/279) + + +### 🏗️ Breaking changes + +- Plural broker field in pipeline config - [#278](https://github.com/bakdata/kpops/pull/278) + + +### 🌀 Miscellaneous + +- Add breaking changes section to change log config - [#280](https://github.com/bakdata/kpops/pull/280) + + + + + + +## [1.2.4](https://github.com/bakdata/kpops/releases/tag/1.2.4) - Release Date: [2023-06-27] + +### 🌀 Miscellaneous + +- Update changelog action to contain miscellaneous PRs - [#269](https://github.com/bakdata/kpops/pull/269) + + + + + + +## [1.2.3](https://github.com/bakdata/kpops/releases/tag/1.2.3) - Release Date: [2023-06-22] + +### 🐛 Fixes + +- Refactor custom component validation & hide field from kpops output - [#265](https://github.com/bakdata/kpops/pull/265) + + +### 🏭 Refactor + +- Refactor custom component validation & hide field from kpops output - [#265](https://github.com/bakdata/kpops/pull/265) + + + + +### 🌀 Miscellaneous + + + +## [1.2.2](https://github.com/bakdata/kpops/releases/tag/1.2.2) - Release Date: [2023-06-21] + + + +### 🌀 Miscellaneous + +- Create workflow to lint CI - [#260](https://github.com/bakdata/kpops/pull/260) + +- Fix update docs when releasing - [#261](https://github.com/bakdata/kpops/pull/261) + +- Rename change log message for uncategorized issues - [#262](https://github.com/bakdata/kpops/pull/262) + + + +## [1.2.1](https://github.com/bakdata/kpops/releases/tag/1.2.1) - Release Date: [2023-06-21] + + + +Uncategorized + +- Fix update docs in release workflow - [#258](https://github.com/bakdata/kpops/pull/258) + + + +## [1.2.0](https://github.com/bakdata/kpops/releases/tag/1.2.0) - Release Date: [2023-06-21] + +### 🚀 Features + +- Add `helm repo update ` for Helm >3.7 - [#239](https://github.com/bakdata/kpops/pull/239) + + +### 🐛 Fixes + +- add --namespace option to Helm template command - [#237](https://github.com/bakdata/kpops/pull/237) + +- Add missing type annotation for Pydantic attributes - [#238](https://github.com/bakdata/kpops/pull/238) + +- Fix helm version check - [#242](https://github.com/bakdata/kpops/pull/242) + +- Fix Helm Version Check - [#244](https://github.com/bakdata/kpops/pull/244) + +- Fix import from external module - [#256](https://github.com/bakdata/kpops/pull/256) + + +### 🏭 Refactor + +- Remove enable option from helm diff - [#235](https://github.com/bakdata/kpops/pull/235) + +- Refactor variable substitution - [#198](https://github.com/bakdata/kpops/pull/198) + + + + +Uncategorized + +- Add background to docs home page - [#236](https://github.com/bakdata/kpops/pull/236) + +- Update Poetry version in CI - [#247](https://github.com/bakdata/kpops/pull/247) + +- Add pip cache in KPOps runner action - [#249](https://github.com/bakdata/kpops/pull/249) + +- Check types using Pyright - [#251](https://github.com/bakdata/kpops/pull/251) + +- Remove MyPy - [#252](https://github.com/bakdata/kpops/pull/252) + +- Disable broken Windows CI temporarily - [#253](https://github.com/bakdata/kpops/pull/253) + +- Update release and publish workflows - [#254](https://github.com/bakdata/kpops/pull/254) + +- Fix release & publish workflows - [#257](https://github.com/bakdata/kpops/pull/257) + + + + diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index f17c5267f..2d6ac97d0 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,6 +1,7 @@ site_name: KPOps -repo_url: https://github.com/bakdata/kpops/ site_url: https://bakdata.github.io/kpops/ +repo_name: KPOps +repo_url: https://github.com/bakdata/kpops/ remote_branch: gh-pages copyright: Copyright © 2023 bakdata @@ -82,6 +83,7 @@ nav: KPOps Documentation: index.md - User Guide: - What is KPOps: user/what-is-kpops.md + - Changelog: user/changelog.md - Getting Started: - Setup: user/getting-started/setup.md - Quick start: user/getting-started/quick-start.md @@ -111,5 +113,7 @@ nav: - CI integration: - GitHub Actions: user/references/ci-integration/github-actions.md - Developer Guide: + - Getting Started: developer/getting-started.md + - Contributing: developer/contributing.md + - Code base: - Auto generation: developer/auto-generation.md - - Formatting: developer/formatting.md diff --git a/hooks/__init__.py b/hooks/__init__.py index ef17ce38a..053c13419 100644 --- a/hooks/__init__.py +++ b/hooks/__init__.py @@ -1,4 +1,4 @@ """KPOps pre-commit hooks.""" from pathlib import Path -PATH_ROOT = Path(__file__).parents[1] +ROOT = Path(__file__).parents[1].resolve() diff --git a/hooks/gen_docs/gen_docs_cli_usage.py b/hooks/gen_docs/gen_docs_cli_usage.py index 469274745..25f7ecd8c 100644 --- a/hooks/gen_docs/gen_docs_cli_usage.py +++ b/hooks/gen_docs/gen_docs_cli_usage.py @@ -2,10 +2,10 @@ import subprocess -from hooks import PATH_ROOT +from hooks import ROOT -PATH_KPOPS_MAIN = PATH_ROOT / "kpops/cli/main.py" -PATH_CLI_COMMANDS_DOC = PATH_ROOT / "docs/docs/user/references/cli-commands.md" +PATH_KPOPS_MAIN = ROOT / "kpops/cli/main.py" +PATH_CLI_COMMANDS_DOC = ROOT / "docs/docs/user/references/cli-commands.md" # TODO(@sujuka99): try to use typer_cli.main.docs here instead # https://github.com/bakdata/kpops/issues/297 diff --git a/hooks/gen_docs/gen_docs_components.py b/hooks/gen_docs/gen_docs_components.py index 45ca61ae1..6fb78f767 100644 --- a/hooks/gen_docs/gen_docs_components.py +++ b/hooks/gen_docs/gen_docs_components.py @@ -7,15 +7,15 @@ import yaml -from hooks import PATH_ROOT +from hooks import ROOT from kpops.cli.registry import _find_classes from kpops.components import KafkaConnector, PipelineComponent from kpops.utils.colorify import redify, yellowify from kpops.utils.yaml_loading import load_yaml_file -PATH_KPOPS_MAIN = PATH_ROOT / "kpops/cli/main.py" -PATH_CLI_COMMANDS_DOC = PATH_ROOT / "docs/docs/user/references/cli-commands.md" -PATH_DOCS_RESOURCES = PATH_ROOT / "docs/docs/resources" +PATH_KPOPS_MAIN = ROOT / "kpops/cli/main.py" +PATH_CLI_COMMANDS_DOC = ROOT / "docs/docs/user/references/cli-commands.md" +PATH_DOCS_RESOURCES = ROOT / "docs/docs/resources" PATH_DOCS_COMPONENTS = PATH_DOCS_RESOURCES / "pipeline-components" PATH_DOCS_COMPONENTS_DEPENDENCIES = ( PATH_DOCS_COMPONENTS / "dependencies/pipeline_component_dependencies.yaml" @@ -212,16 +212,14 @@ def get_sections(component_name: str, *, exist_changes: bool) -> KpopsComponent: ] component_sections_not_inherited: list[ str - ] = DEFAULTS_PIPELINE_COMPONENT_DEPENDENCIES[ - component_file_name - ] # type: ignore [reportGeneralTypeIssues] + ] = DEFAULTS_PIPELINE_COMPONENT_DEPENDENCIES[component_file_name] # type: ignore [reportGeneralTypeIssues] return KpopsComponent(component_sections, component_sections_not_inherited) if __name__ == "__main__": # Check if the dependencies have been modified if not { - str(file.relative_to(PATH_ROOT)) for file in DANGEROUS_FILES_TO_CHANGE + str(file.relative_to(ROOT)) for file in DANGEROUS_FILES_TO_CHANGE }.isdisjoint(SCRIPT_ARGUMENTS): # Set `is_change_present` to indicate that dependencies need to be regenerated is_change_present = True diff --git a/hooks/gen_docs/gen_docs_env_vars.py b/hooks/gen_docs/gen_docs_env_vars.py index ac88b82b6..d347ed8b5 100644 --- a/hooks/gen_docs/gen_docs_env_vars.py +++ b/hooks/gen_docs/gen_docs_env_vars.py @@ -18,12 +18,12 @@ except ImportError: from typing_extensions import Self -from hooks import PATH_ROOT +from hooks import ROOT from hooks.gen_docs import IterableStrEnum from kpops.cli import main from kpops.cli.pipeline_config import PipelineConfig -PATH_DOCS_RESOURCES = PATH_ROOT / "docs/docs/resources" +PATH_DOCS_RESOURCES = ROOT / "docs/docs/resources" PATH_DOCS_VARIABLES = PATH_DOCS_RESOURCES / "variables" PATH_CONFIG_ENV_VARS_DOTENV_FILE = PATH_DOCS_VARIABLES / "config_env_vars.env" @@ -374,8 +374,7 @@ def gen_vars( if __name__ == "__main__": # copy examples from tests resources shutil.copyfile( - PATH_ROOT - / "tests/pipeline/resources/component-type-substitution/pipeline.yaml", + ROOT / "tests/pipeline/resources/component-type-substitution/pipeline.yaml", PATH_DOCS_VARIABLES / "variable_substitution.yaml", ) # Find all config-related env variables and write them into a file diff --git a/hooks/gen_schema.py b/hooks/gen_schema.py index 7d6b99f2e..726da823f 100644 --- a/hooks/gen_schema.py +++ b/hooks/gen_schema.py @@ -3,10 +3,10 @@ from io import StringIO from pathlib import Path -from hooks import PATH_ROOT +from hooks import ROOT from kpops.utils.gen_schema import SchemaScope, gen_config_schema, gen_pipeline_schema -PATH_TO_SCHEMA = PATH_ROOT / "docs/docs/schema" +PATH_TO_SCHEMA = ROOT / "docs/docs/schema" def gen_schema(scope: SchemaScope): diff --git a/kpops/cli/main.py b/kpops/cli/main.py index c7f0e26a1..b989cc01e 100644 --- a/kpops/cli/main.py +++ b/kpops/cli/main.py @@ -271,9 +271,7 @@ def generate( return pipeline -@app.command( - help="Deploy pipeline steps" -) # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 +@app.command(help="Deploy pipeline steps") # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 def deploy( pipeline_path: Path = PIPELINE_PATH_ARG, components_module: Optional[str] = COMPONENTS_MODULES, @@ -296,9 +294,7 @@ def deploy( component.deploy(dry_run) -@app.command( - help="Destroy pipeline steps" -) # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 +@app.command(help="Destroy pipeline steps") # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 def destroy( pipeline_path: Path = PIPELINE_PATH_ARG, components_module: Optional[str] = COMPONENTS_MODULES, @@ -320,9 +316,7 @@ def destroy( component.destroy(dry_run) -@app.command( - help="Reset pipeline steps" -) # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 +@app.command(help="Reset pipeline steps") # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 def reset( pipeline_path: Path = PIPELINE_PATH_ARG, components_module: Optional[str] = COMPONENTS_MODULES, @@ -345,9 +339,7 @@ def reset( component.reset(dry_run) -@app.command( - help="Clean pipeline steps" -) # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 +@app.command(help="Clean pipeline steps") # pyright: ignore[reportGeneralTypeIssues] https://github.com/rec/dtyper/issues/8 def clean( pipeline_path: Path = PIPELINE_PATH_ARG, components_module: Optional[str] = COMPONENTS_MODULES, diff --git a/poetry.lock b/poetry.lock index e0cabdcba..05591986a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -80,51 +80,6 @@ soupsieve = ">1.2" html5lib = ["html5lib"] lxml = ["lxml"] -[[package]] -name = "black" -version = "23.7.0" -description = "The uncompromising code formatter." -optional = false -python-versions = ">=3.8" -files = [ - {file = "black-23.7.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:5c4bc552ab52f6c1c506ccae05681fab58c3f72d59ae6e6639e8885e94fe2587"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:552513d5cd5694590d7ef6f46e1767a4df9af168d449ff767b13b084c020e63f"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:86cee259349b4448adb4ef9b204bb4467aae74a386bce85d56ba4f5dc0da27be"}, - {file = "black-23.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:501387a9edcb75d7ae8a4412bb8749900386eaef258f1aefab18adddea1936bc"}, - {file = "black-23.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:fb074d8b213749fa1d077d630db0d5f8cc3b2ae63587ad4116e8a436e9bbe995"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:b5b0ee6d96b345a8b420100b7d71ebfdd19fab5e8301aff48ec270042cd40ac2"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:893695a76b140881531062d48476ebe4a48f5d1e9388177e175d76234ca247cd"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:c333286dc3ddca6fdff74670b911cccedacb4ef0a60b34e491b8a67c833b343a"}, - {file = "black-23.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831d8f54c3a8c8cf55f64d0422ee875eecac26f5f649fb6c1df65316b67c8926"}, - {file = "black-23.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:7f3bf2dec7d541b4619b8ce526bda74a6b0bffc480a163fed32eb8b3c9aed8ad"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:f9062af71c59c004cd519e2fb8f5d25d39e46d3af011b41ab43b9c74e27e236f"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:01ede61aac8c154b55f35301fac3e730baf0c9cf8120f65a9cd61a81cfb4a0c3"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:327a8c2550ddc573b51e2c352adb88143464bb9d92c10416feb86b0f5aee5ff6"}, - {file = "black-23.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1c6022b86f83b632d06f2b02774134def5d4d4f1dac8bef16d90cda18ba28a"}, - {file = "black-23.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:27eb7a0c71604d5de083757fbdb245b1a4fae60e9596514c6ec497eb63f95320"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:8417dbd2f57b5701492cd46edcecc4f9208dc75529bcf76c514864e48da867d9"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:47e56d83aad53ca140da0af87678fb38e44fd6bc0af71eebab2d1f59b1acf1d3"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:25cc308838fe71f7065df53aedd20327969d05671bac95b38fdf37ebe70ac087"}, - {file = "black-23.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:642496b675095d423f9b8448243336f8ec71c9d4d57ec17bf795b67f08132a91"}, - {file = "black-23.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:ad0014efc7acf0bd745792bd0d8857413652979200ab924fbf239062adc12491"}, - {file = "black-23.7.0-py3-none-any.whl", hash = "sha256:9fd59d418c60c0348505f2ddf9609c1e1de8e7493eab96198fc89d9f865e7a96"}, - {file = "black-23.7.0.tar.gz", hash = "sha256:022a582720b0d9480ed82576c920a8c1dde97cc38ff11d8d8859b3bd6ca9eedb"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -packaging = ">=22.0" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - [[package]] name = "cachetools" version = "5.2.0" @@ -735,17 +690,6 @@ files = [ {file = "mkdocs_material_extensions-1.3.tar.gz", hash = "sha256:f0446091503acb110a7cab9349cbc90eeac51b58d1caa92a704a81ca1e24ddbd"}, ] -[[package]] -name = "mypy-extensions" -version = "0.4.3" -description = "Experimental type system extensions for programs checked with the mypy typechecker." -optional = false -python-versions = "*" -files = [ - {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, - {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, -] - [[package]] name = "nodeenv" version = "1.7.0" @@ -1433,28 +1377,28 @@ jupyter = ["ipywidgets (>=7.5.1,<8.0.0)"] [[package]] name = "ruff" -version = "0.1.1" +version = "0.1.3" description = "An extremely fast Python linter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.1.1-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:b7cdc893aef23ccc14c54bd79a8109a82a2c527e11d030b62201d86f6c2b81c5"}, - {file = "ruff-0.1.1-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:620d4b34302538dbd8bbbe8fdb8e8f98d72d29bd47e972e2b59ce6c1e8862257"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a909d3930afdbc2e9fd893b0034479e90e7981791879aab50ce3d9f55205bd6"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3305d1cb4eb8ff6d3e63a48d1659d20aab43b49fe987b3ca4900528342367145"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c34ae501d0ec71acf19ee5d4d889e379863dcc4b796bf8ce2934a9357dc31db7"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:6aa7e63c3852cf8fe62698aef31e563e97143a4b801b57f920012d0e07049a8d"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2d68367d1379a6b47e61bc9de144a47bcdb1aad7903bbf256e4c3d31f11a87ae"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bc11955f6ce3398d2afe81ad7e49d0ebf0a581d8bcb27b8c300281737735e3a3"}, - {file = "ruff-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cbbd8eead88ea83a250499074e2a8e9d80975f0b324b1e2e679e4594da318c25"}, - {file = "ruff-0.1.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f4780e2bb52f3863a565ec3f699319d3493b83ff95ebbb4993e59c62aaf6e75e"}, - {file = "ruff-0.1.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8f5b24daddf35b6c207619301170cae5d2699955829cda77b6ce1e5fc69340df"}, - {file = "ruff-0.1.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d3f9ac658ba29e07b95c80fa742b059a55aefffa8b1e078bc3c08768bdd4b11a"}, - {file = "ruff-0.1.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:3521bf910104bf781e6753282282acc145cbe3eff79a1ce6b920404cd756075a"}, - {file = "ruff-0.1.1-py3-none-win32.whl", hash = "sha256:ba3208543ab91d3e4032db2652dcb6c22a25787b85b8dc3aeff084afdc612e5c"}, - {file = "ruff-0.1.1-py3-none-win_amd64.whl", hash = "sha256:3ff3006c97d9dc396b87fb46bb65818e614ad0181f059322df82bbfe6944e264"}, - {file = "ruff-0.1.1-py3-none-win_arm64.whl", hash = "sha256:e140bd717c49164c8feb4f65c644046fe929c46f42493672853e3213d7bdbce2"}, - {file = "ruff-0.1.1.tar.gz", hash = "sha256:c90461ae4abec261609e5ea436de4a4b5f2822921cf04c16d2cc9327182dbbcc"}, + {file = "ruff-0.1.3-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:b46d43d51f7061652eeadb426a9e3caa1e0002470229ab2fc19de8a7b0766901"}, + {file = "ruff-0.1.3-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:b8afeb9abd26b4029c72adc9921b8363374f4e7edb78385ffaa80278313a15f9"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca3cf365bf32e9ba7e6db3f48a4d3e2c446cd19ebee04f05338bc3910114528b"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4874c165f96c14a00590dcc727a04dca0cfd110334c24b039458c06cf78a672e"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eec2dd31eed114e48ea42dbffc443e9b7221976554a504767ceaee3dd38edeb8"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:dc3ec4edb3b73f21b4aa51337e16674c752f1d76a4a543af56d7d04e97769613"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2e3de9ed2e39160800281848ff4670e1698037ca039bda7b9274f849258d26ce"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c595193881922cc0556a90f3af99b1c5681f0c552e7a2a189956141d8666fe8"}, + {file = "ruff-0.1.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f75e670d529aa2288cd00fc0e9b9287603d95e1536d7a7e0cafe00f75e0dd9d"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:76dd49f6cd945d82d9d4a9a6622c54a994689d8d7b22fa1322983389b4892e20"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:918b454bc4f8874a616f0d725590277c42949431ceb303950e87fef7a7d94cb3"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d8859605e729cd5e53aa38275568dbbdb4fe882d2ea2714c5453b678dca83784"}, + {file = "ruff-0.1.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:0b6c55f5ef8d9dd05b230bb6ab80bc4381ecb60ae56db0330f660ea240cb0d4a"}, + {file = "ruff-0.1.3-py3-none-win32.whl", hash = "sha256:3e7afcbdcfbe3399c34e0f6370c30f6e529193c731b885316c5a09c9e4317eef"}, + {file = "ruff-0.1.3-py3-none-win_amd64.whl", hash = "sha256:7a18df6638cec4a5bd75350639b2bb2a2366e01222825562c7346674bdceb7ea"}, + {file = "ruff-0.1.3-py3-none-win_arm64.whl", hash = "sha256:12fd53696c83a194a2db7f9a46337ce06445fb9aa7d25ea6f293cf75b21aca9f"}, + {file = "ruff-0.1.3.tar.gz", hash = "sha256:3ba6145369a151401d5db79f0a47d50e470384d0d89d0d6f7fab0b589ad07c34"}, ] [[package]] @@ -1817,4 +1761,4 @@ watchmedo = ["PyYAML (>=3.10)"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "dfdbdd18867682898d908dd3a3e19741993478eb7b722d3dd14a5c2acd0b9826" +content-hash = "cfa6447fe58b9cffa8247c4d2e09fa988bbb7484a2a728e432a63c05872e3bd8" diff --git a/pyproject.toml b/pyproject.toml index e65abe824..f07648ca0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,8 +45,7 @@ pytest-mock = "^3.10.0" pytest-timeout = "^2.1.0" snapshottest = "^0.6.0" pre-commit = "^2.19.0" -ruff = "^0.1.1" -black = "^23.7.0" +ruff = "^0.1.3" typer-cli = "^0.0.13" pyright = "^1.1.314" pytest-rerunfailures = "^11.1.2" @@ -68,8 +67,23 @@ mike = "^1.1.2" [tool.ruff] ignore = [ - # "E203", # whitespace before ':' -- Not PEP8 compliant, black won't correct it, add when out of nursery - "E501", # Line too long -- Clashes with `black` +# Rules in conflict with `ruff-format` -- START + "W191", # Checks for indentation that uses tabs. Spaces are preferred. + # "E111", # Checks for indentation with a non-multiple of 4 spaces, add when out of nursery + # "E114", # Checks for indentation of comments with a non-multiple of 4 spaces, add when out of nursery + # "E117", # Checks for over-indented code, add when out of nursery + "E501", # Line too long + "D206", # Checks for docstrings that are indented with tabs. + "D300", # Checks for docstrings that use '''triple single quotes''' instead of """triple double quotes""". + "Q000", # Checks for inline strings that use single quotes. + "Q001", # Checks for multiline strings that use single quotes + "Q002", # Checks for docstrings that use single quotes. + "Q003", # Checks for strings that include escaped quotes. + "COM812", # Checks for the absence of trailing commas. + "COM819", # Checks for the presence of prohibited trailing commas. + "ISC001", # Checks for implicitly concatenated strings on a single line. + "ISC002", # Checks for implicitly concatenated strings that span multiple lines. +# Rules in conflict with `ruff-format` -- END "D1", # Missing docstring for {} -- Inconvenient to enforce # The following "D" rules do not correspond to our coding style. We use the pep257 convention, but # "D212" should not be ignored. In ruff (0.0.291) we cannot select a rule that is excluded by specifying @@ -94,7 +108,6 @@ ignore = [ "B010", # Do not call setattr with a constant attribute value. -- Not always applicable "RUF012", # type class attrs with `ClassVar` -- Too strict/trigger-happy "UP007", # Use X | Y for type annotations -- `typer` doesn't support it - "COM812", # Checks for the absence of trailing commas -- leads to undesirable behavior from formatters "PIE804", # Unnecessary `dict` kwargs -- Inconvenient to enforce "RET505", # Unnecessary {branch} after return statement -- Lots of false positives "RET506", # Unnecessary {branch} after raise statement -- Lots of false positives @@ -146,14 +159,11 @@ output-format = "grouped" show-fixes = true task-tags = ["TODO", "HACK", "FIXME", "XXX"] target-version = "py310" -exclude = ["tests/*snapshots/*"] +extend-exclude = ["tests/*snapshots/*"] [tool.ruff.extend-per-file-ignores] "tests/*/__init__.py" = ["F401"] -[tool.ruff.isort] -split-on-trailing-comma = false - [tool.ruff.flake8-bugbear] extend-immutable-calls = ["typer.Argument"] From a70bbb2f87abf3491fef3ecbfc3306fbcc7570dd Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Wed, 8 Nov 2023 10:12:31 +0200 Subject: [PATCH 07/16] chore: format --- pyproject.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f07648ca0..8e749efe0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,7 +67,7 @@ mike = "^1.1.2" [tool.ruff] ignore = [ -# Rules in conflict with `ruff-format` -- START + # Rules in conflict with `ruff-format` -- START "W191", # Checks for indentation that uses tabs. Spaces are preferred. # "E111", # Checks for indentation with a non-multiple of 4 spaces, add when out of nursery # "E114", # Checks for indentation of comments with a non-multiple of 4 spaces, add when out of nursery @@ -83,11 +83,11 @@ ignore = [ "COM819", # Checks for the presence of prohibited trailing commas. "ISC001", # Checks for implicitly concatenated strings on a single line. "ISC002", # Checks for implicitly concatenated strings that span multiple lines. -# Rules in conflict with `ruff-format` -- END + # Rules in conflict with `ruff-format` -- END "D1", # Missing docstring for {} -- Inconvenient to enforce -# The following "D" rules do not correspond to our coding style. We use the pep257 convention, but -# "D212" should not be ignored. In ruff (0.0.291) we cannot select a rule that is excluded by specifying -# a convention, hence our only option is to manually replicate it. + # The following "D" rules do not correspond to our coding style. We use the pep257 convention, but + # "D212" should not be ignored. In ruff (0.0.291) we cannot select a rule that is excluded by specifying + # a convention, hence our only option is to manually replicate it. "D203", # 1 blank line required before class docstring "D213", # Multi-line docstring summary should start at the second line "D214", # Section is over-indented ("{name}") From 140270d040c265e931b2e7872d1c19c3c766fa47 Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Wed, 8 Nov 2023 10:13:18 +0200 Subject: [PATCH 08/16] chore: run formatter --- docs/docs/stylesheets/extra.css | 42 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/docs/docs/stylesheets/extra.css b/docs/docs/stylesheets/extra.css index 24d84f6c4..256ac30b3 100644 --- a/docs/docs/stylesheets/extra.css +++ b/docs/docs/stylesheets/extra.css @@ -1,41 +1,39 @@ :root > * { - /* The primary color of KPOps docs */ - --md-primary-fg-color: #a599ff; + /* The primary color of KPOps docs */ + --md-primary-fg-color: #a599ff; - /* The second color of KPOps docs */ - --md-accent-fg-color: #B0A5FF; + /* The second color of KPOps docs */ + --md-accent-fg-color: #b0a5ff; - /* Create custom color variable to use for the buttons */ - --kpops-button-color: #7068AD; + /* Create custom color variable to use for the buttons */ + --kpops-button-color: #7068ad; - /* The footer color needs to be set sparately */ - --md-footer-bg-color: var(--md-primary-fg-color); + /* The footer color needs to be set sparately */ + --md-footer-bg-color: var(--md-primary-fg-color); - /* Color the links with the primary color */ - --md-typeset-a-color: var(--md-primary-fg-color); + /* Color the links with the primary color */ + --md-typeset-a-color: var(--md-primary-fg-color); - --md-admonition-icon--wip: url('data:image/svg+xml;charset=utf-8,') + --md-admonition-icon--wip: url("data:image/svg+xml;charset=utf-8,"); } .md-typeset .md-button, .md-button--primary { - background-color: var(--kpops-button-color); + background-color: var(--kpops-button-color); } .md-typeset .md-button:hover, .md-button--primary:hover { - border-color: white; + border-color: white; } -.md-typeset .admonition.wip, -.md-typeset details.wip { -border-color: rgb(160, 45, 0); +.md-typeset .admonition.wip, .md-typeset details.wip { + border-color: rgb(160, 45, 0); } -.md-typeset .wip > .admonition-title, -.md-typeset .wip > summary { -background-color: rgb(255, 195, 172); +.md-typeset .wip > .admonition-title, .md-typeset .wip > summary { + background-color: rgb(255, 195, 172); } .md-typeset .wip > .admonition-title::before, .md-typeset .wip > summary::before { -background-color: rgb(255, 77, 6); --webkit-mask-image: var(--md-admonition-icon--wip); - mask-image: var(--md-admonition-icon--wip); + background-color: rgb(255, 77, 6); + -webkit-mask-image: var(--md-admonition-icon--wip); + mask-image: var(--md-admonition-icon--wip); } From 2ed13316566dc63605e1a995aeb0935d4a43ba6f Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Mon, 6 Nov 2023 14:32:01 +0200 Subject: [PATCH 09/16] Replace black with ruff (#365) --- docs/docs/stylesheets/extra.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/docs/stylesheets/extra.css b/docs/docs/stylesheets/extra.css index 256ac30b3..fbd089434 100644 --- a/docs/docs/stylesheets/extra.css +++ b/docs/docs/stylesheets/extra.css @@ -37,3 +37,18 @@ -webkit-mask-image: var(--md-admonition-icon--wip); mask-image: var(--md-admonition-icon--wip); } + +.md-typeset .admonition.wip, +.md-typeset details.wip { +border-color: rgb(160, 45, 0); +} +.md-typeset .wip > .admonition-title, +.md-typeset .wip > summary { +background-color: rgb(255, 195, 172); +} +.md-typeset .wip > .admonition-title::before, +.md-typeset .wip > summary::before { +background-color: rgb(255, 77, 6); +-webkit-mask-image: var(--md-admonition-icon--wip); + mask-image: var(--md-admonition-icon--wip); +} From 0b05537aaa82fa529379e7db1792dedeb8d5e1a6 Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Wed, 8 Nov 2023 10:21:31 +0200 Subject: [PATCH 10/16] ci: rename dprint step --- .github/workflows/ci.yaml | 2 +- .pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 07338b2dd..ffa69e20d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -70,7 +70,7 @@ jobs: - name: Install docs dependencies run: poetry install --with docs - - name: Check markdown formatting + - name: Check markdown, css, toml formatting uses: dprint/check@v2.2 if: runner.os == 'Linux' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 457a712b1..407f7830e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,7 +68,7 @@ repos: )$ require_serial: true - id: dprint - name: dprint + name: dprint entry: dprint fmt language: system types: [markdown] From df41bb580a06f84eb9d9e7c7ae2705e4a4e35548 Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Wed, 8 Nov 2023 10:31:20 +0200 Subject: [PATCH 11/16] chore: format css --- docs/docs/stylesheets/extra.css | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/docs/docs/stylesheets/extra.css b/docs/docs/stylesheets/extra.css index b8a674be5..9028d83fd 100644 --- a/docs/docs/stylesheets/extra.css +++ b/docs/docs/stylesheets/extra.css @@ -38,32 +38,28 @@ mask-image: var(--md-admonition-icon--wip); } -.md-typeset .admonition.wip, -.md-typeset details.wip { -border-color: rgb(160, 45, 0); +.md-typeset .admonition.wip, .md-typeset details.wip { + border-color: rgb(160, 45, 0); } -.md-typeset .wip > .admonition-title, -.md-typeset .wip > summary { -background-color: rgb(255, 195, 172); +.md-typeset .wip > .admonition-title, .md-typeset .wip > summary { + background-color: rgb(255, 195, 172); } .md-typeset .wip > .admonition-title::before, .md-typeset .wip > summary::before { -background-color: rgb(255, 77, 6); --webkit-mask-image: var(--md-admonition-icon--wip); - mask-image: var(--md-admonition-icon--wip); + background-color: rgb(255, 77, 6); + -webkit-mask-image: var(--md-admonition-icon--wip); + mask-image: var(--md-admonition-icon--wip); } -.md-typeset .admonition.wip, -.md-typeset details.wip { -border-color: rgb(160, 45, 0); +.md-typeset .admonition.wip, .md-typeset details.wip { + border-color: rgb(160, 45, 0); } -.md-typeset .wip > .admonition-title, -.md-typeset .wip > summary { -background-color: rgb(255, 195, 172); +.md-typeset .wip > .admonition-title, .md-typeset .wip > summary { + background-color: rgb(255, 195, 172); } .md-typeset .wip > .admonition-title::before, .md-typeset .wip > summary::before { -background-color: rgb(255, 77, 6); --webkit-mask-image: var(--md-admonition-icon--wip); - mask-image: var(--md-admonition-icon--wip); + background-color: rgb(255, 77, 6); + -webkit-mask-image: var(--md-admonition-icon--wip); + mask-image: var(--md-admonition-icon--wip); } From e41789f38c93453e2e282833bfc75936c2a5494c Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Mon, 20 Nov 2023 11:12:30 +0200 Subject: [PATCH 12/16] Update .github/workflows/ci.yaml Co-authored-by: Ramin Gharib --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ffa69e20d..810381a09 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -70,7 +70,7 @@ jobs: - name: Install docs dependencies run: poetry install --with docs - - name: Check markdown, css, toml formatting + - name: Check markdown, toml formatting uses: dprint/check@v2.2 if: runner.os == 'Linux' From eaf3606ec67ee285e7a61b409503d206c5cd4280 Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Wed, 22 Nov 2023 15:19:23 +0200 Subject: [PATCH 13/16] style: change step name in ci --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 810381a09..384baecc2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -70,7 +70,7 @@ jobs: - name: Install docs dependencies run: poetry install --with docs - - name: Check markdown, toml formatting + - name: Check markdown, toml, css formatting uses: dprint/check@v2.2 if: runner.os == 'Linux' From fe7c6bbc48751e8f0d1269eb0fcae05057b23ff6 Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Wed, 22 Nov 2023 15:33:33 +0200 Subject: [PATCH 14/16] docs: document CSS formatter in dev docs --- docs/docs/developer/contributing.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/developer/contributing.md b/docs/docs/developer/contributing.md index ff55361cc..a66be64f3 100644 --- a/docs/docs/developer/contributing.md +++ b/docs/docs/developer/contributing.md @@ -17,3 +17,7 @@ Our configuration can be found in [KPOps](https://github.com/bakdata/kpops)' top ### Markdown 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). + +### CSS + +To ensure a consistent CSS style, we use the [malva](https://github.com/g-plane/malva) [dprint](https://dprint.dev)'s plugin. Our configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json). From e39c38253d563ba1b68d1a2f4fbffc03f048645b Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Wed, 22 Nov 2023 15:35:30 +0200 Subject: [PATCH 15/16] docs: document toml formatter --- docs/docs/developer/contributing.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/developer/contributing.md b/docs/docs/developer/contributing.md index ff55361cc..5eb775e94 100644 --- a/docs/docs/developer/contributing.md +++ b/docs/docs/developer/contributing.md @@ -17,3 +17,7 @@ Our configuration can be found in [KPOps](https://github.com/bakdata/kpops)' top ### Markdown 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). + +### TOML + +To ensure a consistent TOML style, we use [dprint](https://dprint.dev)'s [TOML code formatter](https://dprint.dev/plugins/toml/). Our configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json). From dccd50610ab6670dc683361f0fc53a9fc3b89178 Mon Sep 17 00:00:00 2001 From: Ivan Yordanov Date: Wed, 22 Nov 2023 15:40:20 +0200 Subject: [PATCH 16/16] chore: remove unnecessary inclusions --- dprint.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dprint.json b/dprint.json index d9dfb3c0d..e0a8652e6 100644 --- a/dprint.json +++ b/dprint.json @@ -7,9 +7,7 @@ "includes": [ "**/*.{md}", "**/*.{toml}", - "**/*.{css}", - "**/*.{scss}", - "**/*.{sass}" + "**/*.{css}" ], "excludes": [ ".pytest_cache/**",