-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat]: Add format auto fixer to main branch (#124)
- Loading branch information
Showing
70 changed files
with
3,825 additions
and
3,374 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: codespell | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.py" | ||
- "**/*.md" | ||
- "**/*.rst" | ||
- pyproject.toml | ||
- requirements-lint.txt | ||
- .github/workflows/codespell.yml | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.py" | ||
- "**/*.md" | ||
- "**/*.rst" | ||
- pyproject.toml | ||
- requirements-lint.txt | ||
- .github/workflows/codespell.yml | ||
|
||
jobs: | ||
codespell: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' # or any version you need | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-lint.txt | ||
- name: Spelling check with codespell | ||
run: | | ||
# Refer to the above environment variable here | ||
codespell --toml pyproject.toml $CODESPELL_EXCLUDES |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: ruff | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.py" | ||
- pyproject.toml | ||
- requirements-lint.txt | ||
- .github/workflows/matchers/ruff.json | ||
- .github/workflows/ruff.yml | ||
pull_request: | ||
branches: | ||
- main | ||
# This workflow is only relevant when one of the following files changes. | ||
# However, we have github configured to expect and require this workflow | ||
# to run and pass before github with auto-merge a pull request. Until github | ||
# allows more flexible auto-merge policy, we can just run this on every PR. | ||
# It doesn't take that long to run, anyway. | ||
#paths: | ||
# - "**/*.py" | ||
# - pyproject.toml | ||
# - requirements-lint.txt | ||
# - .github/workflows/matchers/ruff.json | ||
# - .github/workflows/ruff.yml | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' # or any version you need | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-lint.txt | ||
- name: Analysing the code with ruff | ||
run: | | ||
ruff check . | ||
- name: Run isort | ||
run: | | ||
isort . --check-only |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: yapf | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.py" | ||
- .github/workflows/yapf.yml | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.py" | ||
- .github/workflows/yapf.yml | ||
|
||
jobs: | ||
yapf: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' # or any version you need | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install yapf==0.32.0 | ||
pip install toml==0.10.2 | ||
- name: Running yapf | ||
run: | | ||
yapf --diff --recursive . |
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 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
Oops, something went wrong.