maskflow-cli 0.8.1__tar.gz → 0.8.2__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.
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/PKG-INFO +2 -2
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/pyproject.toml +5 -2
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/app.py +6 -1
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/worker.py +12 -2
- maskflow_cli-0.8.2/tests/test_cli_pack_registration.py +24 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/.dockerignore +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/.gitignore +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/Dockerfile +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/README.md +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/examples/README.md +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/examples/generate_sample.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/examples/sample-llm-traffic.jsonl +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/packaging/README.md +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/packaging/_entry.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/packaging/maskflow.spec +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/__init__.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/bench_render.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/commands/__init__.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/commands/bench_cmd.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/commands/config_cmd.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/commands/doctor_cmd.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/commands/explain_cmd.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/doctor.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/doctor_render.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/evidence.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/explain.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/explain_render.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/render.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/__init__.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/aggregate.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/checkpoint.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/cmd.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/errors.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/fieldsel.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/pipeline.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/report/__init__.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/report/assets.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/report/build.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/report/csv_out.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/report/html.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/report/json_out.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/report/summary.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/severity.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/__init__.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/_api_common.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/_files.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/_http.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/_meta.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/base.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/csv.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/dir.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/helicone.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/jsonl.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/langfuse.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/langsmith.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/postgres.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/sources/s3.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/src/maskflow_cli/scan/spec.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/conftest.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/fixtures/partial.toml +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/fixtures/typo.toml +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/fixtures/valid.toml +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/scan/__init__.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/scan/_fuzz_corpus.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/scan/conftest.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/scan/test_aggregate_and_severity.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/scan/test_example_file.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/scan/test_fieldsel.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/scan/test_pipeline_and_report.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/scan/test_report_no_pii_leak.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/scan/test_sources_api.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/scan/test_sources_files.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/test_cli_bench.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/test_cli_doctor.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/test_cli_explain.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/test_cli_show.py +0 -0
- {maskflow_cli-0.8.1 → maskflow_cli-0.8.2}/tests/test_cli_validate.py +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: maskflow-cli
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2
|
|
4
4
|
Summary: Command-line interface for MaskFlow: .maskflowrc config validation and inspection
|
|
5
5
|
License: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Requires-Dist: httpx>=0.27
|
|
8
8
|
Requires-Dist: maskflow-core[yaml]<0.9,>=0.6.0
|
|
9
|
-
Requires-Dist: maskflow-pack-india<0.
|
|
9
|
+
Requires-Dist: maskflow-pack-india<0.7,>=0.1.0
|
|
10
10
|
Requires-Dist: maskflow-pack-intl<0.4,>=0.3.0
|
|
11
11
|
Requires-Dist: rich>=13.0
|
|
12
12
|
Requires-Dist: tomli-w>=1.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "maskflow-cli"
|
|
3
|
-
version = "0.8.
|
|
3
|
+
version = "0.8.2"
|
|
4
4
|
description = "Command-line interface for MaskFlow: .maskflowrc config validation and inspection"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -34,7 +34,10 @@ dependencies = [
|
|
|
34
34
|
# Recognizer objects the same way pack-intl 0.3.0 did, same import-time
|
|
35
35
|
# side effect. All additive only -- no API change, so the existing
|
|
36
36
|
# lower bound still holds.
|
|
37
|
-
|
|
37
|
+
# <0.7: admits 0.6.0 (Devanagari names, 5+5 mobiles, spaCy span_filter).
|
|
38
|
+
# Floor deliberately not raised -- the pack-intl-then-pack-india import
|
|
39
|
+
# order works with every version, and 0.6.0 only adds on top.
|
|
40
|
+
"maskflow-pack-india>=0.1.0,<0.7",
|
|
38
41
|
"typer>=0.12",
|
|
39
42
|
# CLI-only: pretty-prints `maskflow config show`'s plain TOML dump.
|
|
40
43
|
"tomli-w>=1.0",
|
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
import maskflow_pack_india # noqa: F401 -- import side effect registers pack-india's entity types
|
|
6
5
|
import maskflow_pack_intl # noqa: F401 -- import side effect registers pack-intl's entity types
|
|
6
|
+
|
|
7
|
+
# isort: split
|
|
8
|
+
# pack-india AFTER pack-intl: both register PERSON_NAME, and the last
|
|
9
|
+
# registration wins for its context keywords and spaCy mapping (pack-india
|
|
10
|
+
# extends pack-intl's; the reverse order silently dropped pack-india's).
|
|
11
|
+
import maskflow_pack_india # noqa: F401 -- import side effect registers pack-india's entity types
|
|
7
12
|
import typer
|
|
8
13
|
|
|
9
14
|
from .commands.bench_cmd import bench
|
|
@@ -51,9 +51,14 @@ _STATE: _WorkerState | None = None
|
|
|
51
51
|
def init_worker(root_config: RootConfig, deep: bool, run_key: bytes) -> None:
|
|
52
52
|
"""ProcessPoolExecutor initializer: register the recognizer packs in
|
|
53
53
|
this child process and compile the config once."""
|
|
54
|
-
import maskflow_pack_india # noqa: F401 -- side-effect: register India recognizers
|
|
55
54
|
import maskflow_pack_intl # noqa: F401 -- side-effect: register intl recognizers
|
|
56
55
|
|
|
56
|
+
# isort: split
|
|
57
|
+
# pack-india AFTER pack-intl: both register PERSON_NAME, and the last
|
|
58
|
+
# registration wins for its context keywords and spaCy mapping (pack-india
|
|
59
|
+
# extends pack-intl's; the reverse order silently dropped pack-india's).
|
|
60
|
+
import maskflow_pack_india # noqa: F401 -- side-effect: register India recognizers
|
|
61
|
+
|
|
57
62
|
global _STATE
|
|
58
63
|
compiled = compile_config(root_config)
|
|
59
64
|
_STATE = _WorkerState(dict(compiled.detect_kwargs()), deep, run_key)
|
|
@@ -119,9 +124,14 @@ def ner_available() -> tuple[bool, str]:
|
|
|
119
124
|
its own clearer one-line note and shouldn't print both."""
|
|
120
125
|
import warnings
|
|
121
126
|
|
|
122
|
-
import maskflow_pack_india # noqa: F401
|
|
123
127
|
import maskflow_pack_intl # noqa: F401
|
|
124
128
|
|
|
129
|
+
# isort: split
|
|
130
|
+
# pack-india AFTER pack-intl: both register PERSON_NAME, and the last
|
|
131
|
+
# registration wins for its context keywords and spaCy mapping (pack-india
|
|
132
|
+
# extends pack-intl's; the reverse order silently dropped pack-india's).
|
|
133
|
+
import maskflow_pack_india # noqa: F401
|
|
134
|
+
|
|
125
135
|
try:
|
|
126
136
|
from maskflow_core.ner import _get_nlp
|
|
127
137
|
except Exception as exc: # noqa: BLE001
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""The CLI imports both recognizer packs itself; pack-india must register
|
|
2
|
+
after pack-intl so its PERSON_NAME context keywords and spaCy mapping win
|
|
3
|
+
(see maskflow_cli/app.py and scan/worker.py)."""
|
|
4
|
+
|
|
5
|
+
import maskflow_cli.app # noqa: F401 -- import side effect registers both packs
|
|
6
|
+
from maskflow_cli.scan import worker
|
|
7
|
+
from maskflow_core.context import CONTEXT_KEYWORDS
|
|
8
|
+
from maskflow_core.entities import PIIType
|
|
9
|
+
from maskflow_core.registry import NER_RECOGNIZERS
|
|
10
|
+
from maskflow_pack_india import _plausible_person_entity
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def test_cli_registers_pack_india_last() -> None:
|
|
14
|
+
assert NER_RECOGNIZERS["PERSON"].span_filter is _plausible_person_entity
|
|
15
|
+
assert "नाम" in CONTEXT_KEYWORDS[PIIType.register("PERSON_NAME")]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def test_scan_worker_imports_pack_intl_before_pack_india() -> None:
|
|
19
|
+
import inspect
|
|
20
|
+
|
|
21
|
+
source = inspect.getsource(worker)
|
|
22
|
+
for block in source.split("import maskflow_pack_intl")[1:]:
|
|
23
|
+
assert "import maskflow_pack_india" in block.split("\n\n\n")[0]
|
|
24
|
+
assert source.index("import maskflow_pack_intl") < source.index("import maskflow_pack_india")
|
|
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
|