Skip to content

Commit

Permalink
✨ add Scientific Python's repo-review (#483)
Browse files Browse the repository at this point in the history
## Description

This PR adopts Scientific Python's repo-review that is based on the
[Scientific Python Development
Guide](https://learn.scientific-python.org/development/) and checks the
repository for common best practices.

## Checklist:

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are related to it.
- [x] I have added appropriate tests and documentation.
- [x] I have made sure that all CI jobs on GitHub pass.
- [x] The pull request introduces no new warnings and follows the
project's style guidelines.

Signed-off-by: burgholzer <[email protected]>
  • Loading branch information
burgholzer authored Nov 18, 2023
1 parent 78a230f commit 95541a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,10 @@ repos:
language: pygrep
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest|Mqt|Tum
exclude: .pre-commit-config.yaml

# Check best practices for scientific Python code
- repo: https://github.com/scientific-python/cookie
rev: 2023.11.17
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ files = ["src/mqt", "test/python"]
mypy_path = ["$MYPY_CONFIG_FILE_DIR/src"]
python_version = "3.8"
warn_unused_configs = true
show_error_codes = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
strict = true
disallow_untyped_defs = false
Expand Down Expand Up @@ -217,7 +216,7 @@ extend-select = [
"UP", # pyupgrade
"YTT", # flake8-2020
]
extend-ignore = [
ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"ISC001", # Conflicts with formatter
Expand Down Expand Up @@ -258,7 +257,7 @@ isort.required-imports = ["from __future__ import annotations"]
]
"src/mqt/core/_compat/**.py" = ["TID251"]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"


Expand Down

0 comments on commit 95541a6

Please sign in to comment.