moleg-api 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {moleg_api-0.2.3 → moleg_api-0.2.4}/PKG-INFO +1 -1
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/dispatch.py +1 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api.egg-info/PKG-INFO +1 -1
- {moleg_api-0.2.3 → moleg_api-0.2.4}/pyproject.toml +1 -1
- {moleg_api-0.2.3 → moleg_api-0.2.4}/tests/test_cli.py +40 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/LICENSE +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/README.md +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/__init__.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/__main__.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/__init__.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/catalog.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/constants.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/data.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/foundation.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/main.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/parser.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/signal_helpers.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/signals.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_cli/signals_meta.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/__init__.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/admin_scope.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/annex_tables.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_admin_rules.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_annex.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_article_context.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_authority_context.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_bundle.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_comparable.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_compare.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_delegated_criteria.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_followups.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_history.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_institutional.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_interpretations.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_judicial.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_law_loaders.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_query_expansion.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_search.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_structure.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/api_versions.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/article_gaps.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/authority_article_gaps.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/authority_context_details.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/authority_context_pipeline.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/authority_sources.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/authority_temporal_filters.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/authority_temporal_gaps.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/bridge.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/bundle_candidates.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/bundle_eager.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/bundle_finalize.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/bundle_modes.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/bundle_primary.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/bundle_state.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/candidates.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/config.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/context_load_gaps.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/delegated_criteria_details.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/delegated_criteria_pipeline.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/delegated_scope.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/followup_basic.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/followup_hits.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/followup_identities.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/followup_routing.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/followup_routing_authority.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/followup_routing_bundle.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/followup_searches.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/foundation.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/history_identity.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/identity_params.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/institutional_candidates.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/institutional_pipeline.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/institutional_resolution.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/limits_intents.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/ranking.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/requested_load_gaps.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/source_matching.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/support.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/temporal_gaps.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_laws/validation.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_models/__init__.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_models/admin.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_models/annex.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_models/authority.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_models/bundles.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_models/followups.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_models/laws.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_models/query.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_models/serialization.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_models/types.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/__init__.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/annex.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/article_units.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/articles.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/authority.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/candidates.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/delegation.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/history_events.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/history_html.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/identities.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/primitives.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/references.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/row_format.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/source_refs.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/structure.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/_normalization/unwrap.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/cli.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/errors.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/laws.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/models.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/normalization.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/py.typed +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api/source.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api.egg-info/SOURCES.txt +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api.egg-info/dependency_links.txt +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api.egg-info/entry_points.txt +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api.egg-info/requires.txt +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/moleg_api.egg-info/top_level.txt +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/setup.cfg +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/tests/test_laws.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/tests/test_live_smoke.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/tests/test_models.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/tests/test_refactor_compat.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/tests/test_sdk_fixes_0_2_1.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/tests/test_sdk_fixes_0_2_2.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/tests/test_source.py +0 -0
- {moleg_api-0.2.3 → moleg_api-0.2.4}/tests/test_versions.py +0 -0
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from .foundation import *
|
|
4
4
|
from .constants import CliError, EXIT_USAGE, FOLLOWUP_HANDOFFS, FOLLOWUP_INTERFACES
|
|
5
|
+
from .data import _statute_args
|
|
5
6
|
from .signals_meta import parse_as_of
|
|
6
7
|
|
|
7
8
|
def _call(api: MolegApi, args: argparse.Namespace) -> Any:
|
|
@@ -24,6 +24,7 @@ from moleg_api.models import (
|
|
|
24
24
|
AnnexFormText,
|
|
25
25
|
AuthorityContext,
|
|
26
26
|
BundleRequest,
|
|
27
|
+
CandidateContext,
|
|
27
28
|
ContextGap,
|
|
28
29
|
DelegationGraph,
|
|
29
30
|
JudicialDecisionHit,
|
|
@@ -32,6 +33,7 @@ from moleg_api.models import (
|
|
|
32
33
|
LawIdentity,
|
|
33
34
|
LawStructure,
|
|
34
35
|
LawText,
|
|
36
|
+
LegalContextBundle,
|
|
35
37
|
LoadedContext,
|
|
36
38
|
StructuredTableData,
|
|
37
39
|
)
|
|
@@ -301,6 +303,16 @@ class StubApi:
|
|
|
301
303
|
return method
|
|
302
304
|
|
|
303
305
|
|
|
306
|
+
class RecordingInstitutionalApi(StubApi):
|
|
307
|
+
def __init__(self, result=None):
|
|
308
|
+
super().__init__(result=result)
|
|
309
|
+
self.calls = []
|
|
310
|
+
|
|
311
|
+
def load_institutional_system(self, statute_identifiers, **kwargs):
|
|
312
|
+
self.calls.append((statute_identifiers, kwargs))
|
|
313
|
+
return self._result
|
|
314
|
+
|
|
315
|
+
|
|
304
316
|
def _run(argv, api):
|
|
305
317
|
return main(argv, api=api)
|
|
306
318
|
|
|
@@ -366,6 +378,34 @@ def test_main_success_envelope_shape(capsys):
|
|
|
366
378
|
assert "data" in out
|
|
367
379
|
|
|
368
380
|
|
|
381
|
+
def test_main_load_institutional_system_dispatches_statutes(capsys):
|
|
382
|
+
bundle = LegalContextBundle(
|
|
383
|
+
request=BundleRequest(
|
|
384
|
+
query=None,
|
|
385
|
+
mode="institutional_system",
|
|
386
|
+
budget="minimal",
|
|
387
|
+
articles=["제1조"],
|
|
388
|
+
statute_ids=["001638"],
|
|
389
|
+
),
|
|
390
|
+
loaded=LoadedContext(),
|
|
391
|
+
candidates=CandidateContext(),
|
|
392
|
+
)
|
|
393
|
+
api = RecordingInstitutionalApi(result=bundle)
|
|
394
|
+
|
|
395
|
+
code = _run(
|
|
396
|
+
["load-institutional-system", "--statute", "001638", "--article", "제1조", "--budget", "minimal"],
|
|
397
|
+
api,
|
|
398
|
+
)
|
|
399
|
+
|
|
400
|
+
out = json.loads(capsys.readouterr().out)
|
|
401
|
+
assert code == 0
|
|
402
|
+
assert api.calls == [(["001638"], {"articles": ["제1조"], "budget": "minimal", "as_of": None})]
|
|
403
|
+
assert out["ok"] is True
|
|
404
|
+
assert out["command"] == "load-institutional-system"
|
|
405
|
+
assert out["kind"] == "legal_context_bundle"
|
|
406
|
+
assert out["data"]["request"]["statute_ids"] == ["001638"]
|
|
407
|
+
|
|
408
|
+
|
|
369
409
|
def test_catalog_lists_conventions_and_kinds(capsys):
|
|
370
410
|
code = _run(["catalog"], StubApi())
|
|
371
411
|
out = json.loads(capsys.readouterr().out)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|