diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..9bf3b64 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,54 @@ +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 +default_language_version: + python: python3.11 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}} 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", +] 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"))) -