-
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
20c80d8
commit 10cdce9
Showing
5 changed files
with
131 additions
and
8 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
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,22 @@ | ||
headers: > | ||
# Automatically generated file from a JSON schema | ||
# Used to correctly format the generated file | ||
# callbacks: | ||
# - - black | ||
# - - isort | ||
generate: | ||
- # JSON schema file path | ||
source: src/ds_caselaw_utils/data/schema/courts.schema.json | ||
# Python file path | ||
destination: src/ds_caselaw_utils/courts_schema_types_autogenerated.py | ||
# The name of the root element | ||
root_name: RawCourtRepository | ||
# Argument passed to the API | ||
api_arguments: | ||
additional_properties: Only explicit | ||
# Rename an element | ||
name_mapping: {} | ||
# The minimum Python version that the code should support. By default the | ||
# currently executing Python version is chosen. Note that the output | ||
# may require typing_extensions to be installed. | ||
python_version: "3.9" |
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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Automatically generated file from a JSON schema | ||
|
||
|
||
from typing import List, Required, TypedDict, Union | ||
|
||
|
||
class RawCourt(TypedDict, total=False): | ||
""" Raw Court. """ | ||
|
||
code: Required[str] | ||
""" | ||
pattern: ^[A-Za-z]{2,}(-[A-Za-z0-9]+)*$ | ||
Required property | ||
""" | ||
|
||
name: Required[str] | ||
""" Required property """ | ||
|
||
grouped_name: str | ||
param: str | ||
""" pattern: ^[a-z]{2,}(?:/[a-z0-9]+)?$ """ | ||
|
||
extra_params: List["_RawCourtExtraParamsItem"] | ||
ncn: str | ||
link: Required[str] | ||
""" | ||
format: uri | ||
Required property | ||
""" | ||
|
||
start_year: int | ||
""" minimum: 1066 """ | ||
|
||
end_year: int | ||
listable: Required[bool] | ||
""" Required property """ | ||
|
||
selectable: Required[bool] | ||
""" Required property """ | ||
|
||
jurisdictions: List["RawJurisdiction"] | ||
|
||
|
||
RawCourtRepository = List["_RawCourtListItem"] | ||
""" | ||
Raw Court List. | ||
A list of courts | ||
""" | ||
|
||
|
||
|
||
class RawJurisdiction(TypedDict, total=False): | ||
""" Raw Jurisdiction. """ | ||
|
||
prefix: Required[str] | ||
""" Required property """ | ||
|
||
name: Required[str] | ||
""" Required property """ | ||
|
||
code: Required[str] | ||
""" Required property """ | ||
|
||
|
||
|
||
_RawCourtExtraParamsItem = str | ||
""" pattern: ^[a-z]{2,}(/[a-z]+)?$ """ | ||
|
||
|
||
|
||
class _RawCourtListItem(TypedDict, total=False): | ||
name: Required[str] | ||
""" Required property """ | ||
|
||
display_name: Required[Union[str, None]] | ||
""" Required property """ | ||
|
||
is_tribunal: Required[bool] | ||
""" Required property """ | ||
|
||
courts: Required[List["RawCourt"]] | ||
""" Required property """ | ||
|
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