-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3cf4ab
commit a93566e
Showing
16 changed files
with
449 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
exclude: "^docs/|/migrations/" | ||
default_install_hook_types: [pre-commit, pre-push] | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.11.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/Riverside-Healthcare/djLint | ||
rev: v1.34.0 | ||
hooks: | ||
- id: djlint-django | ||
name: djLint Reformatting for Django | ||
entry: djlint --profile=django --reformat | ||
types_or: [html] | ||
language: python | ||
|
||
- repo: https://github.com/Riverside-Healthcare/djLint | ||
rev: v1.34.0 | ||
hooks: | ||
- id: djlint-django | ||
name: djLint Checks for Django | ||
entry: djlint --profile=django | ||
types_or: [html] | ||
language: python | ||
|
||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.1.0 | ||
hooks: | ||
- id: prettier | ||
types_or: [scss, yaml, markdown, javascript, xml] | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.6 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
|
||
# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date | ||
ci: | ||
autoupdate_schedule: weekly | ||
skip: [] | ||
submodules: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: '3.1' | ||
version: "3.1" | ||
|
||
services: | ||
marklogic: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[tool.poetry] | ||
name = "ds-caselaw-marklogic" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["David McKee <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
saxonche = "^12.3.0" | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
|
||
[tool.ruff] | ||
ignore = ["E501", "G004", "PLR2004", "RUF005", "RUF012", "UP040"] # long lines, fstrings in logs, magic values, consider not concat, mutable classbits, type instead of TypeAlias | ||
extend-select = ["W", "B", "Q", "C90", "I", "UP", "YTT", "ASYNC", "S", "BLE", "A", "COM", "C4", "DTZ", "T10", "DJ", "EM", "EXE", "FA", | ||
"ISC", "ICN", "G", "INP", "PIE", "T20", "PYI", "PT", "Q", "RSE", "RET", "SLF", "SLOT", "SIM", "TID", "TCH", "INT", "PTH", | ||
"FIX", "PGH", "PL", "TRY", "FLY", "PERF", "RUF"] | ||
unfixable = ["ERA"] | ||
|
||
# things skipped: | ||
# N: naming, possibly good | ||
# D: docstrings missing throughout | ||
# ANN: annotations missing throughout | ||
# FBT: not convinced boolean trap worth auto-banning. | ||
# CPY: copyright at top of each file | ||
# G: logging warnings -- fstrings bad? | ||
# ARG: sometimes you need to accept arguments. | ||
# TD: somewhat finicky details about formatting TODOs | ||
# FIX: flags todos: possible to add -- skipped for now | ||
# ERA: lots of false positives, not a good autofix | ||
# PD, NPY, AIR: ignored, panda / numpy / airflow specific | ||
# FURB: not yet out of preview | ||
|
||
|
||
|
||
[tool.ruff.extend-per-file-ignores] | ||
"*" = ["RET505", # disagree with if X: return Y else: return Z being wrong | ||
"T201", # print | ||
"S113", # requests no timeout : TODO | ||
] | ||
"tests/*" = ["S101"] # assert fine in tests | ||
"development_scripts/populate_top_judgments_and_neighbours.py" = ["S314", "C400"] # TODO | ||
|
||
|
||
|
||
[tool.ruff.isort] | ||
known-first-party = ["ds-caselaw-editor-ui", "config"] | ||
|
||
[tool.ruff.pycodestyle] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
"role-name" : "caselaw-nobody", | ||
"description" : "Unauthenticated user", | ||
"role" : [ ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
"action" : "http://marklogic.com/xdmp/privileges/xdbc-invoke", | ||
"kind" : "execute" | ||
} ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
"action" : "http://marklogic.com/xdmp/privileges/unprotected-collections", | ||
"kind" : "execute" | ||
} ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ | |
"action" : "http://marklogic.com/xdmp/privileges/xdmp-eval-in", | ||
"kind" : "execute" | ||
} ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
"action": "https://caselaw.nationalarchives.gov.uk/custom/privileges/can-view-unpublished-documents" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.