Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pip-delete-this-directory.txt

# Dev
**/_dev_scripts
*.code-workspace

# Unit test / coverage reports
htmlcov/
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Solving an issue with a pull request is one of the most difficult ways to contri

## Open an issue

You can contribute to this project by opening an issue. This could be a question, a bug report, a feature request or other types. In any case you should do a search beforehand to confirm, that a similar issue has not already been opened.
You can contribute to this project by opening an issue. This could be a question, a bug report, a feature request or other types. In any case you should do a search beforehand to confirm, that a similar issue has not already been opened.


<br>
Expand All @@ -88,7 +88,7 @@ This could be a feature that could be very useful for your work, an interesting


<br>

---

<br>
Expand Down
80 changes: 79 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,82 @@ install-editable:

reinstall: uninstall install

reinstall-editable: uninstall install-editable
reinstall-editable: uninstall install-editable

# === Linting and Formatting Commands ===

# Run ruff linter to check for code issues
lint:
ruff check .

# Run ruff linter with auto-fix for fixable issues
lint-fix:
ruff check --fix .

# Format code using ruff formatter
format:
ruff format .

# Check formatting without making changes
format-check:
ruff format --check .

# Sort imports using ruff (isort functionality)
isort:
ruff check --select I --fix .

# Check import sorting without making changes
isort-check:
ruff check --select I .

# Run all code quality checks (lint + format check + import check)
check: lint format-check isort-check

# Fix all auto-fixable issues (lint + format + imports)
fix: lint-fix format isort

# === Notebook-specific Commands ===

# Run ruff on Jupyter notebooks
lint-notebooks:
ruff check --include="*.ipynb" .

# Fix ruff issues in Jupyter notebooks
lint-notebooks-fix:
ruff check --include="*.ipynb" --fix .

# Format Jupyter notebooks with black via nbqa
format-notebooks:
pre-commit run nbqa-black --all-files

# Run all notebook checks and fixes
notebooks-fix: lint-notebooks-fix format-notebooks

# === Pre-commit Commands ===

# Install pre-commit hooks
pre-commit-install:
pre-commit install

# Run pre-commit on all files
pre-commit-all:
pre-commit run --all-files

# Run pre-commit on staged files only
pre-commit:
pre-commit run

# Update pre-commit hooks to latest versions
pre-commit-update:
pre-commit autoupdate

# === Combined Quality Commands ===

# Run comprehensive code quality checks
quality-check: check lint-notebooks

# Fix all code quality issues
quality-fix: fix notebooks-fix

# Full quality workflow: install hooks, fix issues, run final check
quality: pre-commit-install quality-fix quality-check
Loading
Loading