doc-redaction 2.2.0__tar.gz → 2.2.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.
- {doc_redaction-2.2.0/doc_redaction.egg-info → doc_redaction-2.2.2}/PKG-INFO +10 -4
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/README.md +14 -3
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/README_PYPI.md +9 -3
- doc_redaction-2.2.2/doc_redaction/install_deps.py +684 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2/doc_redaction.egg-info}/PKG-INFO +10 -4
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/pyproject.toml +1 -1
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/config.py +1 -1
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/custom_image_analyser_engine.py +94 -1
- doc_redaction-2.2.0/doc_redaction/install_deps.py +0 -389
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/MANIFEST.in +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/agent_routes.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/app.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/cli_redact.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/__init__.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/api.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/cli_api.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/cli_redact.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/data_anonymise.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/file_conversion.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/file_redaction.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/find_duplicate_pages.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/find_duplicate_tabular.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/gradio_app.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/helper_functions.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/lambda_entrypoint.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/redaction_review.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction/summaries.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction.egg-info/SOURCES.txt +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction.egg-info/dependency_links.txt +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction.egg-info/entry_points.txt +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction.egg-info/requires.txt +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/doc_redaction.egg-info/top_level.txt +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/favicon.png +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/intros/long_intro.txt +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/intros/short_intro.txt +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/intros/short_intro_responsible.txt +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/lambda_entrypoint.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/load_dynamo_logs.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/load_s3_logs.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/mcp_doc_redaction/__init__.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/mcp_doc_redaction/artifact_bundle.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/mcp_doc_redaction/gradio_transport.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/mcp_doc_redaction/schemas.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/mcp_doc_redaction/server.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/setup.cfg +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_agent_apply_review_redactions.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_annotation_color_parsing.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_cli_smoke.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_gradio_doc_redact_simple.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_gradio_summarise_simple.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_gradio_transport_sse.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_gradio_upload_staging.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_gui_only.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_mcp_doc_redaction_bundle.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_mcp_doc_redaction_extract_paths.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_package_api_smoke.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_placeholder_bbox_scaling.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_redaction_overlay_export.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_redaction_types.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/test/test_review_ocr_visualisation_export.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/__init__.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/apply_hf_zero_gpu_readme_frontmatter.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/auth.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/aws_functions.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/aws_textract.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/cli_usage_logger.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/custom_csvlogger.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/data_anonymise.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/file_conversion.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/file_redaction.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/find_duplicate_pages.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/find_duplicate_tabular.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/helper_functions.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/llm_entity_detection.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/llm_entity_detection_prompts.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/llm_funcs.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/load_spacy_model_custom_recognisers.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/presidio_analyzer_custom.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/quickstart.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/redaction_review.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/redaction_types.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/run_vlm.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/secure_path_utils.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/secure_regex_utils.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/simplified_api.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/summaries.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/textract_batch_call.py +0 -0
- {doc_redaction-2.2.0 → doc_redaction-2.2.2}/tools/word_segmenter.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: doc_redaction
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Summary: Redact PDF/image-based documents, Word, or CSV/XLSX files using a Gradio-based GUI interface
|
|
5
5
|
Author-email: Sean Pedrick-Case <spedrickcase@lambeth.gov.uk>
|
|
6
6
|
Maintainer-email: Sean Pedrick-Case <spedrickcase@lambeth.gov.uk>
|
|
@@ -92,12 +92,12 @@ This application relies on two external tools for OCR (Tesseract) and PDF proces
|
|
|
92
92
|
|
|
93
93
|
#### Automated dependency setup (recommended)
|
|
94
94
|
|
|
95
|
-
If you **don’t have admin rights** (or you just want the simplest setup), you can have the project download and configure **Tesseract** and **Poppler** into a local `
|
|
95
|
+
If you **don’t have admin rights** (or you just want the simplest setup), you can have the project download and configure **Tesseract** and **Poppler** into a local `redaction_deps/` folder inside the doc_redaction folder.
|
|
96
96
|
|
|
97
97
|
You need the installer script available first, which means either:
|
|
98
98
|
|
|
99
99
|
- **Repository checkout**: `git clone ...` and run the command from the repo root (recommended for the web UI), or
|
|
100
|
-
- **PyPI install**: `pip install doc_redaction` and run from a writable folder where you want `
|
|
100
|
+
- **PyPI install**: `pip install doc_redaction` and run from a writable folder where you want `redaction_deps/` and `config/app_config.env` to be created/updated.
|
|
101
101
|
|
|
102
102
|
From the repository root (or your chosen working folder) after creating/activating your venv and installing Python requirements:
|
|
103
103
|
|
|
@@ -190,7 +190,13 @@ For programmatic use (CLI-first API matching Gradio `api_name` routes), see **[P
|
|
|
190
190
|
python -m app
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
**Important: your working directory matters.** When you run `python -m app`, the app treats your *current folder* as the “app folder”:
|
|
194
|
+
|
|
195
|
+
- It will load configuration from `config/app_config.env` *relative to the folder you run it from* (and `python -m doc_redaction.install_deps` will also create/update that file there).
|
|
196
|
+
- It may create new folders in that location (for example `config/`, `output/`, `input/`, `logs/`, `usage/`, `feedback/`, and temporary/cache folders depending on your settings).
|
|
197
|
+
- The full set of bundled UI example files (`example_data/`) is part of the **Git repository checkout** rather than the PyPI wheel. If you run from a “random” directory after a PyPI install, you should expect the Examples section to be missing unless you provide your own `example_data/` folder.
|
|
198
|
+
|
|
199
|
+
In practice, the **smoothest UI experience** (examples, bundled assets, docs links, predictable relative paths) is still usually via a **repository checkout** or **Docker**, but PyPI install is sufficient to launch the UI as long as you run it from a suitable working folder and have the system dependencies available (or run `python -m doc_redaction.install_deps` first).
|
|
194
200
|
|
|
195
201
|
#### Install from source (repository checkout / development)
|
|
196
202
|
|
|
@@ -29,12 +29,12 @@ This application relies on two external tools for OCR (Tesseract) and PDF proces
|
|
|
29
29
|
|
|
30
30
|
#### Automated dependency setup (recommended)
|
|
31
31
|
|
|
32
|
-
If you **don’t have admin rights** (or you just want the simplest setup), you can have the project download and configure **Tesseract** and **Poppler** into a local `
|
|
32
|
+
If you **don’t have admin rights** (or you just want the simplest setup), you can have the project download and configure **Tesseract** and **Poppler** into a local `redaction_deps/` folder inside the doc_redaction folder.
|
|
33
33
|
|
|
34
34
|
You need the installer script available first, which means either:
|
|
35
35
|
|
|
36
36
|
- **Repository checkout**: `git clone ...` and run the command from the repo root (recommended for the web UI), or
|
|
37
|
-
- **PyPI install**: `pip install doc_redaction` and run from a writable folder where you want `
|
|
37
|
+
- **PyPI install**: `pip install doc_redaction` and run from a writable folder where you want `redaction_deps/` and `config/app_config.env` to be created/updated.
|
|
38
38
|
|
|
39
39
|
From the repository root (or your chosen working folder) after creating/activating your venv and installing Python requirements:
|
|
40
40
|
|
|
@@ -127,7 +127,13 @@ For programmatic use (CLI-first API matching Gradio `api_name` routes), see **[P
|
|
|
127
127
|
python -m app
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
**Important: your working directory matters.** When you run `python -m app`, the app treats your *current folder* as the “app folder”:
|
|
131
|
+
|
|
132
|
+
- It will look for configuration at `config/app_config.env` *relative to the folder you run it from* (and `python -m doc_redaction.install_deps` will also write `config/app_config.env` there).
|
|
133
|
+
- It may create new folders in that location (for example `config/`, `output/`, `input/`, `logs/`, `usage/`, `feedback/`, and temporary/cache folders depending on your settings).
|
|
134
|
+
- The full set of bundled UI example files (`example_data/`) is part of the **Git repository checkout** rather than the PyPI wheel. If you run from a “random” directory after a PyPI install, you should expect the Examples section to be missing unless you provide your own `example_data/` folder.
|
|
135
|
+
|
|
136
|
+
In practice, the **smoothest UI experience** (examples, bundled assets, docs links, predictable relative paths) is still usually via a **repository checkout** or **Docker**, but PyPI install is sufficient to launch the UI as long as you run it from a suitable working folder and have the system dependencies available (or run `python -m doc_redaction.install_deps` first).
|
|
131
137
|
|
|
132
138
|
#### Install from source (repository checkout / development)
|
|
133
139
|
|
|
@@ -243,6 +249,11 @@ These settings are useful for all users, regardless of whether you are using AWS
|
|
|
243
249
|
* Provide the path to the respective installation folders (for Poppler, point to the `bin` sub-directory).
|
|
244
250
|
* **Examples:** `POPPLER_FOLDER=C:/Program Files/poppler-24.02.0/bin/` `TESSERACT_FOLDER=tesseract/`
|
|
245
251
|
|
|
252
|
+
* `TESSERACT_DATA_FOLDER`
|
|
253
|
+
* If Tesseract runs but you see an error like `Error opening data file ./eng.traineddata` or `Tesseract couldn't load any languages`, this is usually because it can't find the `tessdata/` language files.
|
|
254
|
+
* Set this to the folder that contains `eng.traineddata` (typically a `tessdata` directory).
|
|
255
|
+
* **Examples (Windows):** `TESSERACT_DATA_FOLDER=C:/Program Files/Tesseract-OCR/tessdata`
|
|
256
|
+
|
|
246
257
|
* `SHOW_LANGUAGE_SELECTION=True`
|
|
247
258
|
* Set to `True` to display a language selection dropdown in the UI for OCR processing.
|
|
248
259
|
|
|
@@ -18,12 +18,12 @@ This application relies on two external tools for OCR (Tesseract) and PDF proces
|
|
|
18
18
|
|
|
19
19
|
#### Automated dependency setup (recommended)
|
|
20
20
|
|
|
21
|
-
If you **don’t have admin rights** (or you just want the simplest setup), you can have the project download and configure **Tesseract** and **Poppler** into a local `
|
|
21
|
+
If you **don’t have admin rights** (or you just want the simplest setup), you can have the project download and configure **Tesseract** and **Poppler** into a local `redaction_deps/` folder inside the doc_redaction folder.
|
|
22
22
|
|
|
23
23
|
You need the installer script available first, which means either:
|
|
24
24
|
|
|
25
25
|
- **Repository checkout**: `git clone ...` and run the command from the repo root (recommended for the web UI), or
|
|
26
|
-
- **PyPI install**: `pip install doc_redaction` and run from a writable folder where you want `
|
|
26
|
+
- **PyPI install**: `pip install doc_redaction` and run from a writable folder where you want `redaction_deps/` and `config/app_config.env` to be created/updated.
|
|
27
27
|
|
|
28
28
|
From the repository root (or your chosen working folder) after creating/activating your venv and installing Python requirements:
|
|
29
29
|
|
|
@@ -116,7 +116,13 @@ For programmatic use (CLI-first API matching Gradio `api_name` routes), see **[P
|
|
|
116
116
|
python -m app
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
**Important: your working directory matters.** When you run `python -m app`, the app treats your *current folder* as the “app folder”:
|
|
120
|
+
|
|
121
|
+
- It will load configuration from `config/app_config.env` *relative to the folder you run it from* (and `python -m doc_redaction.install_deps` will also create/update that file there).
|
|
122
|
+
- It may create new folders in that location (for example `config/`, `output/`, `input/`, `logs/`, `usage/`, `feedback/`, and temporary/cache folders depending on your settings).
|
|
123
|
+
- The full set of bundled UI example files (`example_data/`) is part of the **Git repository checkout** rather than the PyPI wheel. If you run from a “random” directory after a PyPI install, you should expect the Examples section to be missing unless you provide your own `example_data/` folder.
|
|
124
|
+
|
|
125
|
+
In practice, the **smoothest UI experience** (examples, bundled assets, docs links, predictable relative paths) is still usually via a **repository checkout** or **Docker**, but PyPI install is sufficient to launch the UI as long as you run it from a suitable working folder and have the system dependencies available (or run `python -m doc_redaction.install_deps` first).
|
|
120
126
|
|
|
121
127
|
#### Install from source (repository checkout / development)
|
|
122
128
|
|