-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rework entry point and add some input format data models
- Switch to typer for cli - Use pydantic for data models - Add data model for build specification (ex. csrconfig) - Update pre-commit hook with more checks
- Loading branch information
Showing
13 changed files
with
656 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,84 @@ | ||
fail_fast: true | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: ruff_format | ||
name: Python format check | ||
entry: poetry run ruff format --check --diff | ||
language: system | ||
types: [file, python] | ||
stages: [pre-commit] | ||
- id: ruff_lint | ||
name: Python lint check | ||
entry: poetry run ruff check | ||
language: system | ||
types: [file, python] | ||
stages: [pre-commit] | ||
- id: pyright | ||
name: Python type check | ||
entry: poetry run pyright | ||
language: system | ||
types: [file, python] | ||
stages: [pre-commit] | ||
- id: check-yaml | ||
name: YAML check | ||
entry: poetry run check-yaml | ||
language: python | ||
types: [yaml] | ||
stages: [pre-commit] | ||
- id: check-toml | ||
name: TOML check | ||
entry: poetry run check-toml | ||
language: python | ||
types: [toml] | ||
stages: [pre-commit] | ||
- id: check-json | ||
name: JSON check | ||
entry: poetry run check-json | ||
language: python | ||
types: [json] | ||
stages: [pre-commit] | ||
- id: commitizen | ||
name: Commit style check | ||
stages: [commit-msg] | ||
entry: cz check --commit-msg-file .git/COMMIT_EDITMSG | ||
pass_filenames: false | ||
language: system | ||
- repo: local | ||
hooks: | ||
- id: ruff-format | ||
name: Python format | ||
description: Run Python code formatting with ruff | ||
entry: poetry run ruff format | ||
language: system | ||
types: [file, python] | ||
stages: [pre-commit] | ||
|
||
- id: ruff-lint | ||
name: Python lint check | ||
description: Run Python code linting with ruff | ||
entry: poetry run ruff check --fix | ||
language: system | ||
types: [file, python] | ||
stages: [pre-commit] | ||
|
||
- id: pyright | ||
name: Python type check | ||
description: Run Python code type checking with pyright | ||
entry: poetry run pyright | ||
language: system | ||
types: [file, python] | ||
stages: [pre-commit] | ||
|
||
- id: check-yaml | ||
name: YAML check | ||
description: Validate all changed YAML files | ||
entry: poetry run check-yaml | ||
language: python | ||
types: [yaml] | ||
stages: [pre-commit] | ||
|
||
- id: check-toml | ||
name: TOML check | ||
description: Validate all changed TOML files | ||
entry: poetry run check-toml | ||
language: python | ||
types: [toml] | ||
stages: [pre-commit] | ||
|
||
- id: check-json | ||
name: JSON check | ||
description: Validate all changed JSON files | ||
entry: poetry run check-json | ||
language: python | ||
types: [json] | ||
stages: [pre-commit] | ||
|
||
- id: commitizen | ||
name: Commit style check | ||
description: Run commitizen to validate commit message | ||
stages: [commit-msg] | ||
entry: cz check --commit-msg-file .git/COMMIT_EDITMSG | ||
pass_filenames: false | ||
language: system | ||
|
||
- id: poetry-check | ||
name: Poetry configuration check | ||
description: Run poetry check to validate config | ||
entry: poetry check | ||
language: python | ||
pass_filenames: false | ||
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$ | ||
|
||
- id: poetry-lock | ||
name: Poetry lock update | ||
description: Run poetry lock to update lock file | ||
entry: poetry lock | ||
language: python | ||
pass_filenames: false | ||
files: ^(.*/)?(poetry\.lock|pyproject\.toml)$ | ||
|
||
- id: poetry-install | ||
name: poetry-install | ||
description: Run poetry install to install dependencies from the lock file | ||
entry: poetry install | ||
language: python | ||
pass_filenames: false | ||
stages: [post-checkout, post-merge] | ||
always_run: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.