maskflow-cli 0.2.0__tar.gz → 0.4.0__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.2.0 → maskflow_cli-0.4.0}/PKG-INFO +4 -4
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/pyproject.toml +20 -5
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/tests/test_cli_explain.py +8 -5
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/.gitignore +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/README.md +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/__init__.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/app.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/commands/__init__.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/commands/config_cmd.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/commands/doctor_cmd.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/commands/explain_cmd.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/doctor.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/doctor_render.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/explain.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/explain_render.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/src/maskflow_cli/render.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/tests/conftest.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/tests/fixtures/partial.toml +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/tests/fixtures/typo.toml +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/tests/fixtures/valid.toml +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/tests/test_cli_doctor.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/tests/test_cli_show.py +0 -0
- {maskflow_cli-0.2.0 → maskflow_cli-0.4.0}/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.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Command-line interface for MaskFlow: .maskflowrc config validation and inspection
|
|
5
5
|
License: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
|
-
Requires-Dist: maskflow-core[yaml]<0.
|
|
8
|
-
Requires-Dist: maskflow-pack-india<0.
|
|
9
|
-
Requires-Dist: maskflow-pack-intl<0.
|
|
7
|
+
Requires-Dist: maskflow-core[yaml]<0.7,>=0.6.0
|
|
8
|
+
Requires-Dist: maskflow-pack-india<0.5,>=0.1.0
|
|
9
|
+
Requires-Dist: maskflow-pack-intl<0.4,>=0.3.0
|
|
10
10
|
Requires-Dist: rich>=13.0
|
|
11
11
|
Requires-Dist: tomli-w>=1.0
|
|
12
12
|
Requires-Dist: typer>=0.12
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "maskflow-cli"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.4.0"
|
|
4
4
|
description = "Command-line interface for MaskFlow: .maskflowrc config validation and inspection"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -10,16 +10,31 @@ dependencies = [
|
|
|
10
10
|
# maskflow_core.config, which only exists from core 0.3.0 -- [yaml]
|
|
11
11
|
# since the CLI, unlike the SDK, should accept a YAML .maskflowrc out
|
|
12
12
|
# of the box (it's already a heavier, more optional install than the SDK).
|
|
13
|
-
|
|
13
|
+
# 0.6.0 adds maskflow_core.recognizer (issue #21's pluggable interface)
|
|
14
|
+
# -- pack-intl/pack-india now require it, so the floor moves with theirs
|
|
15
|
+
# even though this package doesn't import maskflow_core.recognizer
|
|
16
|
+
# directly.
|
|
17
|
+
"maskflow-core[yaml]>=0.6.0,<0.7",
|
|
14
18
|
# maskflow_pack_intl is imported (side-effect only, to populate the
|
|
15
19
|
# PIIType registry) for `maskflow config validate`'s soft entity-name
|
|
16
20
|
# cross-check -- see app.py. pack-intl 0.1.0 itself requires core<0.3,
|
|
17
21
|
# unsatisfiable alongside core>=0.3.0 above -- 0.2.0 is the first
|
|
18
|
-
# version that requires (and works with) the new core.
|
|
19
|
-
|
|
22
|
+
# version that requires (and works with) the new core. 0.3.0 migrates
|
|
23
|
+
# registration to declarative Recognizer objects (maskflow_core.recognizer)
|
|
24
|
+
# and adds a "maskflow.recognizers" entry point -- import-time
|
|
25
|
+
# side-effect behavior unchanged, so the existing lower bound logic
|
|
26
|
+
# still holds, it just now requires core>=0.6.0 too.
|
|
27
|
+
"maskflow-pack-intl>=0.3.0,<0.4",
|
|
20
28
|
# Same reasoning as pack-intl above, for AADHAAR/PAN/GSTIN/IFSC/UPI_VPA
|
|
21
29
|
# -- also makes `maskflow doctor`/`maskflow explain` aware of them.
|
|
22
|
-
|
|
30
|
+
# 0.2.0 adds INDIAN_MOBILE/PIN_CODE/VOTER_ID/INDIAN_PASSPORT/
|
|
31
|
+
# DRIVING_LICENCE/VEHICLE_REG/ABHA_NUMBER/ABHA_ADDRESS/BANK_ACCOUNT_IN;
|
|
32
|
+
# 0.3.0 adds PERSON_NAME (Indian)/INDIAN_ADDRESS (gazetteer + structural
|
|
33
|
+
# + NLP-agreement layers); 0.4.0 migrates registration to declarative
|
|
34
|
+
# Recognizer objects the same way pack-intl 0.3.0 did, same import-time
|
|
35
|
+
# side effect. All additive only -- no API change, so the existing
|
|
36
|
+
# lower bound still holds.
|
|
37
|
+
"maskflow-pack-india>=0.1.0,<0.5",
|
|
23
38
|
"typer>=0.12",
|
|
24
39
|
# CLI-only: pretty-prints `maskflow config show`'s plain TOML dump.
|
|
25
40
|
"tomli-w>=1.0",
|
|
@@ -55,14 +55,17 @@ def test_explain_lowering_threshold_via_set_promotes_a_near_miss_to_masked() ->
|
|
|
55
55
|
text = "Random unrelated text with a number 123456789 in it, nothing special."
|
|
56
56
|
result = runner.invoke(app, ["explain", "--set", "entities.SSN.threshold=0.3", text])
|
|
57
57
|
assert result.exit_code == 0
|
|
58
|
-
assert "NEAREST MISSES" not in result.stdout
|
|
59
|
-
assert "SSN" in result.stdout
|
|
60
58
|
assert "masked" in result.stdout
|
|
59
|
+
# SSN itself moved out of the near-miss section and into the masked
|
|
60
|
+
# section above it -- maskflow-pack-india's BANK_ACCOUNT_IN (9-18
|
|
61
|
+
# digits, always context-required) is a separate, still-legitimate
|
|
62
|
+
# near miss on this same bare 9-digit span, so "no near misses at all"
|
|
63
|
+
# isn't the right assertion here.
|
|
64
|
+
assert "[1] SSN" in result.stdout
|
|
65
|
+
assert "[entities.SSN]" not in result.stdout
|
|
61
66
|
|
|
62
67
|
|
|
63
68
|
def test_explain_bad_config_exits_nonzero(fixtures_dir: Path) -> None:
|
|
64
|
-
result = runner.invoke(
|
|
65
|
-
app, ["explain", "--config", str(fixtures_dir / "typo.toml"), "hello"]
|
|
66
|
-
)
|
|
69
|
+
result = runner.invoke(app, ["explain", "--config", str(fixtures_dir / "typo.toml"), "hello"])
|
|
67
70
|
assert result.exit_code == 1
|
|
68
71
|
assert "did you mean 'threshold'?" in result.stderr
|
|
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
|