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

Ruff linter + pre-commit integration #140

Merged
merged 7 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: ''

## Tell us about it

The more specific the better.
The more specific the better.

## Thoughts on implementation

Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ jobs:
python --version
conda list
pip freeze
- name: Run linters
shell: bash -l {0}
run: |
python -m black pymc_bart --check
echo "Success!"
echo "Checking code style with pylint..."
python -m pylint pymc_bart/
- name: Run Mypy
shell: bash -l {0}
run: |
python -m mypy pymc_bart
- name: Run tests
shell: bash -l {0}
run: |
Expand Down
40 changes: 23 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ""
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: weekly
skip: []
submodules: false

repos:
- repo: local
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: ruff
args: ["--fix", "--show-source"]
- id: ruff-format
args: ["--line-length=100"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
files: ^pymc_bart/
- id: pylint
name: pylint
entry: pylint --rcfile=.pylintrc
language: system
types: [python]
files: ^pymc_bart/
- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
args: [--ignore-missing-imports]
files: ^pymc_bart/
additional_dependencies: [numpy<1.25.0, pandas-stubs]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
Expand Down
Loading
Loading