Skip to content

Commit

Permalink
chore: add more precommit hooks (#123)
Browse files Browse the repository at this point in the history
* Add more precommit hooks
  • Loading branch information
fpgmaas authored Jul 17, 2024
1 parent 3f6d88a commit 46b84cc
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Steps to reproduce the behavior:

<!-- Check the box below with an `x` if you are planning to create a PR for this. -->

- [ ] I'm planning to make a pull-request
- [ ] I'm planning to make a pull-request
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ labels: "enhancement"

<!-- Check the box below with an `x` if you are planning to create a PR for this. -->

- [ ] I'm planning to make a pull-request
- [ ] I'm planning to make a pull-request
3 changes: 1 addition & 2 deletions .github/actions/setup-poetry-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
required: false
description: "Install the docs dependency group"
default: 'false'


runs:
using: "composite"
Expand Down Expand Up @@ -51,4 +51,3 @@ runs:
fi
shell: bash
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'

1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@ jobs:

- name: Check if documentation can be built
run: poetry run mkdocs build -s

4 changes: 2 additions & 2 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up the environment
uses: ./.github/actions/setup-poetry-env
with:
with-docs: true

- name: Setup GH
run: |
sudo apt update && sudo apt install -y git
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ dmypy.json
.pytype/

# Cython debug symbols
cython_debug/
cython_debug/
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.2"
hooks:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ check: ## Run code quality checks
.PHONY: test
test: ## Run unit tests
@echo "Running unit tests"
@poetry run pytest tests --cov=chispa --cov-report=term
@poetry run pytest tests --cov=chispa --cov-report=term

.PHONY: test-cov-html
test-cov-html: ## Run unit tests and create a coverage report
Expand Down
1 change: 0 additions & 1 deletion ci/environment-py39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ dependencies:
- pytest-describe
- pyspark
- findspark

2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ markdown_extensions:
- pymdownx.arithmatex:
generic: true
- markdown_include.include:
base_path: .
base_path: .
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ ignore = [
strict = true

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S603"]
"tests/*" = ["S101", "S603"]

0 comments on commit 46b84cc

Please sign in to comment.