From 35ba050816a65e61b6d3706ec922cb6a92193adb Mon Sep 17 00:00:00 2001 From: Ross Fenning Date: Sat, 18 May 2024 01:37:49 +0100 Subject: [PATCH 1/7] Sync with latest standards --- .pre-commit-config.yaml | 69 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..3a7e6e3 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,69 @@ +exclude: "^$|venv|.obsidian" +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-docstring-first + - id: check-json + - id: check-added-large-files + - id: check-yaml + - id: debug-statements + - repo: https://github.com/psf/black + rev: 24.4.2 + hooks: + - id: black + language_version: python3.12 + - repo: https://github.com/PyCQA/autoflake + rev: v2.3.1 + hooks: + - id: autoflake + args: [--remove-all-unused-imports, --in-place] + - repo: https://github.com/PyCQA/isort + rev: 5.13.2 + hooks: + - id: isort + args: ["--profile", "black", "--filter-files", "--line-length=79"] + language_version: python3.12 + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.10.0 + hooks: + - id: mypy + additional_dependencies: + [ + types-requests, + types-PyYAML, + types-Flask, + types-Werkzeug, + types-Markdown, + ] + - repo: https://github.com/asottile/pyupgrade + rev: v3.15.2 + hooks: + - id: pyupgrade + args: + - --py38-plus + - repo: https://github.com/andreoliwa/nitpick + rev: v0.35.0 + hooks: + - id: nitpick + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: python-check-blanket-noqa + - id: python-check-mock-methods + - id: python-no-eval + - id: python-no-log-warn + - id: rst-backticks + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 + hooks: + - id: prettier + - repo: https://github.com/MartinThoma/check-pip-compile + rev: 0.1.1 + hooks: + - id: check-pip-compile + args: ["."] +default_language_version: + python: python3.11 From 0dc7efde23f968471194ba516e7e321d0c8be855 Mon Sep 17 00:00:00 2001 From: Ross Fenning Date: Sat, 18 May 2024 12:25:42 +0100 Subject: [PATCH 2/7] Sync with latest standards --- nitpick-style.toml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 nitpick-style.toml diff --git a/nitpick-style.toml b/nitpick-style.toml new file mode 100644 index 0000000..0bbf053 --- /dev/null +++ b/nitpick-style.toml @@ -0,0 +1,4 @@ +[nitpick.styles] +include = [ + "py://nitpick/resources/python/pre-commit-hooks", +] From 7b67bb43be32c0d5cc722c513667146e1bd1fd5b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 11:29:28 +0000 Subject: [PATCH 3/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- shouldit.config.json | 4 ++-- specs/mapping.md | 2 +- src/r2rd/mappings.clj | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/shouldit.config.json b/shouldit.config.json index 4139348..7a75373 100644 --- a/shouldit.config.json +++ b/shouldit.config.json @@ -1,4 +1,4 @@ { - "specs": "specs/*.md", - "results": "tests/results.xml" + "specs": "specs/*.md", + "results": "tests/results.xml" } diff --git a/specs/mapping.md b/specs/mapping.md index e3d8f73..ea2ef48 100644 --- a/specs/mapping.md +++ b/specs/mapping.md @@ -4,4 +4,4 @@ Given some item from DBPedia. - + it should extract a schema.org/name property +- it should extract a schema.org/name property diff --git a/src/r2rd/mappings.clj b/src/r2rd/mappings.clj index d8cb1c2..c256777 100644 --- a/src/r2rd/mappings.clj +++ b/src/r2rd/mappings.clj @@ -28,4 +28,3 @@ (make-mapping "thumbnailMapping" "?SUBJ dbpedia-owl:thumbnail ?o" "?SUBJ schema:thumbnailUrl ?o"))) - From 3aadfbdb18457c18f53135e25d08d3edf56e49f4 Mon Sep 17 00:00:00 2001 From: Ross Fenning Date: Sat, 18 May 2024 12:48:04 +0100 Subject: [PATCH 4/7] Sync with latest standards --- .pre-commit-config.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a7e6e3..13a4e98 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,10 +60,5 @@ repos: rev: v4.0.0-alpha.8 hooks: - id: prettier - - repo: https://github.com/MartinThoma/check-pip-compile - rev: 0.1.1 - hooks: - - id: check-pip-compile - args: ["."] default_language_version: python: python3.11 From d0792fee4da04cf6b6f9d07020df7f3e3be83fb6 Mon Sep 17 00:00:00 2001 From: Ross Fenning Date: Sat, 18 May 2024 13:35:13 +0100 Subject: [PATCH 5/7] Sync with latest standards --- dependabot.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 dependabot.yml diff --git a/dependabot.yml b/dependabot.yml new file mode 100644 index 0000000..6114ed3 --- /dev/null +++ b/dependabot.yml @@ -0,0 +1,22 @@ +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} From ff1637c649e69d2adaada79a861ee79860400bc7 Mon Sep 17 00:00:00 2001 From: Ross Fenning Date: Sat, 18 May 2024 14:41:52 +0100 Subject: [PATCH 6/7] Sync with latest standards --- .pre-commit-config.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 13a4e98..6c9b081 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,9 +56,5 @@ repos: - id: python-no-eval - id: python-no-log-warn - id: rst-backticks - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.8 - hooks: - - id: prettier default_language_version: - python: python3.11 + python: python3.12 From a0b60ff86776729e2abf01d66cc2f80742031c72 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 18 May 2024 13:43:04 +0000 Subject: [PATCH 7/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c9b081..9bf3b64 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,14 +30,8 @@ repos: rev: v1.10.0 hooks: - id: mypy - additional_dependencies: - [ - types-requests, - types-PyYAML, - types-Flask, - types-Werkzeug, - types-Markdown, - ] + additional_dependencies: [types-requests, types-PyYAML, types-Flask, types-Werkzeug, + types-Markdown] - repo: https://github.com/asottile/pyupgrade rev: v3.15.2 hooks: @@ -57,4 +51,4 @@ repos: - id: python-no-log-warn - id: rst-backticks default_language_version: - python: python3.12 + python: python3.11