Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate schema in CI #197

Merged
merged 25 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a64295b
feat: Add flag that toggles inclusion of stock types
sujuka99 Apr 21, 2023
a8ab09e
fix: pre-commit hooks rely on typer-cli
sujuka99 Apr 21, 2023
aa66762
fix: components undefined
sujuka99 Apr 21, 2023
e0d2905
docs: update
sujuka99 Apr 21, 2023
08f2d26
fix: assignment type inconsistencies, update doc
sujuka99 Apr 21, 2023
e85eda6
test: Abstract from implementation details
sujuka99 Apr 21, 2023
7b57574
feat: Add flag to `kpops schema pipeline`
sujuka99 Apr 21, 2023
2b4bbe4
ci: generate schema in pre-commit hooks
sujuka99 Apr 21, 2023
d11f09f
Merge remote-tracking branch 'origin/main' into ci/schema
sujuka99 Apr 21, 2023
ea3b4b4
fix: Generated schemas have their keys sorted
sujuka99 Apr 21, 2023
2e19ce4
refactor: move scripts to a more suitable dir
sujuka99 Apr 25, 2023
2b0dc3b
refactor: fix variable names bash
sujuka99 Apr 25, 2023
4c5c0d4
refactor: fix anti-pattern
sujuka99 Apr 25, 2023
05eb319
fix: pre-commit hooks
sujuka99 Apr 25, 2023
83d4661
fix: remove unnecessary flag
sujuka99 Apr 25, 2023
f05f4f2
fix: silence mypy tuple-related errors
sujuka99 Apr 26, 2023
aa3791f
fix: sed works differently on mac
sujuka99 Apr 26, 2023
a3aea09
refactor: pythonize tests
sujuka99 Apr 26, 2023
6aa117a
fix: test
sujuka99 Apr 26, 2023
c83183d
Merge remote-tracking branch 'origin/main' into ci/schema
sujuka99 Apr 26, 2023
3b0b956
fix: pass tests
sujuka99 Apr 26, 2023
9f534cb
fix: gen-docs works on zsh now
sujuka99 Apr 26, 2023
6c99e2c
refactor: add type annotation for fixture
sujuka99 Apr 27, 2023
19d4aab
chore: update snapshot
sujuka99 Apr 27, 2023
765c183
fix: test
sujuka99 Apr 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
- name: Typing (mypy)
run: poetry run pre-commit run mypy --all-files

- name: Generate schema (kpops schema)
run: poetry run pre-commit run gen-schema --all-files --show-diff-on-failure

- name: Generate docs (typer-cli)
run: poetry run pre-commit run gen-docs --all-files --show-diff-on-failure
disrupted marked this conversation as resolved.
Show resolved Hide resolved

# TODO: enable when PEP 604 incompatibilty is in typer is resolved https://github.com/tiangolo/typer/issues/348
# See https://github.com/tiangolo/typer/pull/522
# - name: Syntax (pyupgrade)
Expand All @@ -48,13 +54,6 @@ jobs:
- name: Test
run: poetry run pytest tests

- name: Install docs dependencies
run: poetry install --no-interaction --only docs

- name: Generate docs
run: sh ./gen_docs.sh
shell: bash

publish:
name: Publish
needs: [test]
Expand Down
11 changes: 9 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
hooks:
- id: mypy
name: mypy
entry: ./run_mypy.sh
entry: ./hooks/run_mypy.sh
language: system
types: [python]
require_serial: true # run once for all files
Expand All @@ -29,10 +29,17 @@ repos:
stages: [manual]
args: ["--py310-plus"]
exclude: ^tests/.*snapshots/
- repo: local
hooks:
- id: gen-schema
name: gen-schema
entry: ./hooks/gen_schema.sh
language: system
require_serial: true
- repo: local
hooks:
- id: gen-docs
name: gen-docs
entry: ./gen_docs.sh
entry: ./hooks/gen_docs.sh
language: system
require_serial: true
Loading