diff --git a/.github/ISSUE_TEMPLATE/dataset-request.yml b/.github/ISSUE_TEMPLATE/dataset-request.yml index 13c144225..e633e7063 100644 --- a/.github/ISSUE_TEMPLATE/dataset-request.yml +++ b/.github/ISSUE_TEMPLATE/dataset-request.yml @@ -10,7 +10,7 @@ body: attributes: value: | Fill in this form if you want that junifer includes a new dataset. - + As a reminder, junifer supports customising the `PatternDataGrabber` and `PatternDataladDatagrabber` which should work in most cases. If it is a widely used dataset, we could alternatevely create a new _DataGrabber_ that simplifies the usage, by already configuring the underlying `PatternDataGrabber` or `PatternDataladDatagrabber` diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index ac5b6c0c1..68235bb80 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -47,4 +47,4 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true flags: docs - if: success() && matrix.python-version == 3.10 \ No newline at end of file + if: success() && matrix.python-version == 3.10 diff --git a/.gitignore b/.gitignore index 94ac529c9..78053c736 100644 --- a/.gitignore +++ b/.gitignore @@ -134,4 +134,4 @@ cython_debug/ junifer/_version.py scratch/ -junifer_jobs/ \ No newline at end of file +junifer_jobs/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..9212d6c9d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,48 @@ +ci: + autofix_prs: false + autoupdate_commit_msg: "chore: bump pre-commit repositories" + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-ast + - id: check-docstring-first + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-yaml + - id: check-toml + - id: debug-statements + - id: end-of-file-fixer + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.12.2 + hooks: + - id: validate-pyproject + - repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black + exclude: ^(docs/|examples/|tools/) + args: [--check] + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.267 + hooks: + - id: ruff + exclude: ^(__init__.py) + args: [--format, grouped, --show-fixes] + - repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell + exclude: ^(.github/|docs/) + args: [--config, tox.ini] + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: python-no-eval + - id: python-no-log-warn + - id: rst-backticks + - id: rst-directive-colons + - id: rst-inline-touching-normal diff --git a/LICENSE.md b/LICENSE.md index 6124431c9..4ef32f083 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -648,4 +648,4 @@ specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see -<>. \ No newline at end of file +<>. diff --git a/README.md b/README.md index 636995d2d..4808f0659 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ ![Codecov](https://img.shields.io/codecov/c/github/juaml/junifer?style=flat-square) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff) +[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit) ## About diff --git a/codecov.yml b/codecov.yml index 17e51fd9a..9dede3927 100644 --- a/codecov.yml +++ b/codecov.yml @@ -36,4 +36,4 @@ flag_management: threshold: 1% - type: patch target: 95% - threshold: 1% \ No newline at end of file + threshold: 1% diff --git a/docs/Makefile b/docs/Makefile index 8b7100909..8ad9ee70a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -22,7 +22,7 @@ clean: local: news make _build_local; STATUS=$$?; make news_cleanup; exit $$STATUS -news: +news: @echo "Generating whats_new.rst" cd ../ && towncrier build --keep diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index c929f98d0..af8fd1721 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -43,4 +43,4 @@ body:not([data-theme="light"]) .mermaid svg .edgeLabel { body:not([data-theme="light"]) .mermaid svg .marker{ stroke: white !important; fill: white !important; -} \ No newline at end of file +} diff --git a/docs/_static/js/custom.js b/docs/_static/js/custom.js index c661f2221..fa8ecefd6 100644 --- a/docs/_static/js/custom.js +++ b/docs/_static/js/custom.js @@ -11,4 +11,4 @@ for (i = 0; i < coll.length; i++) { content.style.display = "block"; } }); -} \ No newline at end of file +} diff --git a/docs/_templates/versions.html b/docs/_templates/versions.html index 08b7d02bf..0ebc2ffb5 100644 --- a/docs/_templates/versions.html +++ b/docs/_templates/versions.html @@ -2,7 +2,7 @@