Skip to content

Commit

Permalink
refactor(types): move autogen court types to new types submodule
Browse files Browse the repository at this point in the history
Utils will need to play host to multiple new types which explicitly describe concepts relating to courts; the existing autogenerated types from the schema should logically live in the same place, which is a new submobule.

This should not affect downstream consumers of the package, as these court types are only used internally.
  • Loading branch information
jacksonj04 committed Oct 2, 2024
1 parent a38448d commit 0932df7
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: courts_schema_types_autogenerated\.py
exclude: courts_schema_autogen\.py
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand Down
2 changes: 1 addition & 1 deletion jsonschema-gentypes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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
destination: src/ds_caselaw_utils/types/courts_schema_autogen.py
# The name of the root element
root_name: RawCourtRepository
# Argument passed to the API
Expand Down
2 changes: 1 addition & 1 deletion src/ds_caselaw_utils/courts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from ruamel.yaml import YAML

from ds_caselaw_utils.courts_schema_types_autogenerated import (
from ds_caselaw_utils.types.courts_schema_autogen import (
RawCourt,
RawCourtRepository,
RawJurisdiction,
Expand Down
2 changes: 1 addition & 1 deletion src/ds_caselaw_utils/factory.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import typing

from .courts import Court
from .courts_schema_types_autogenerated import RawCourt, RawCourtRepository
from .types.courts_schema_autogen import RawCourt, RawCourtRepository


class CourtFactory(Court):
Expand Down
Empty file.

0 comments on commit 0932df7

Please sign in to comment.