Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
6e9ac92
docs/conf.py: use absolute path to VERSION
kba Sep 11, 2024
60b223a
update apidocs
kba Sep 11, 2024
dfeddbd
Fix typos (most of them found by codespell)
stweil Sep 12, 2024
c597de6
add ocrd-filter processor
Sep 5, 2024
465ebdb
ocrd-filter: also remove removed segments from ReadingOrder
Sep 7, 2024
6983fd6
ocrd-filter: register XPath functions under PAGE prefix/NS, precompil…
Sep 10, 2024
6271236
ocrd-filter: simplify parameters (just 'select' instead of 'type' and…
Sep 14, 2024
09cad0f
ocrd_models.OcrdPage: add XPath 2.0 parser and extended functions
Sep 14, 2024
6343849
ocrd-filter: adapt (just delegate to OcrdPage.xpath)
Sep 14, 2024
c47ae77
OcrdPage: migrate to newest generateds, adapt user methods, re-generate
Sep 15, 2024
c1b92c8
ocrd_modelfactory.page_from_file: set OcrdPage.revmap to actual rever…
Sep 15, 2024
9c36854
ocrd_page.to_xml: also allow non-root nodes
Sep 15, 2024
c707481
ocrd-filter: simplify further
Sep 15, 2024
687b06f
:package: v3.0.0b5
kba Sep 16, 2024
a43098e
:memo: improve b5 changelog
bertsky Sep 16, 2024
d2cb0fb
ocrd.cli.workspace: assert non-server in cmds mutating METS
bertsky Sep 16, 2024
5663f48
processor CLI: delegate --resolve-resource, too
Sep 13, 2024
853bdb5
test_mets_server: fix arg vs kwarg
Aug 13, 2024
33c7386
mets_server: ClientSideOcrdMets needs OcrdMets-like kwargs (without d…
Aug 13, 2024
37f7cda
use up-to-date kwargs (avoiding old deprecations)
Aug 13, 2024
44946ba
hide/test expected deprecation warnings
Aug 13, 2024
d0962d6
improve output in case of assertion failures
Aug 13, 2024
061f023
allow "from ocrd_models import OcrdPage
kba Aug 15, 2024
d2f92d1
ocrd_utils: forgot to export scale_coordinates at toplvl
Aug 16, 2024
c6c5c42
fix imports
Aug 16, 2024
245778c
Processor.zip_input_files: warning instead of exception for missing i…
Aug 20, 2024
1f7b57f
Processor.zip_input_files: more verbose log msg
bertsky Aug 21, 2024
35bdb39
tests report.is_valid: improve output on failure
Aug 21, 2024
e595996
fix --log-filename (6fc606027a): apply in ocrd_cli_wrap_processor
Aug 24, 2024
f21b8d2
fix exception
Aug 24, 2024
0cbd3ea
adapt to PIL.Image moved constants
Aug 24, 2024
8f8912c
cli.workspace: pass fileGrp as well, improve description
Aug 24, 2024
6dccfb3
OcrdMets.add_agent: does not have positional args
Aug 24, 2024
2d85f14
update pylintrc
Aug 24, 2024
ea68370
pylint: try ignoring generateds (again)
Aug 25, 2024
18ac2c0
ClientSideOcrdMets: use same logger name prefix as server
Aug 28, 2024
da37967
test_mets_server: use tmpdir to avoid side effects between suites
Aug 28, 2024
ccb416b
disableLogging: re-instate root logger, to
Aug 28, 2024
7e3cdf4
test-logging: also remove ocrd.log from tempdir
Aug 28, 2024
4f45b12
bashlib: re-add --log-filename, implement as stderr redirect
Aug 28, 2024
7b70c90
ocrd_utils.config: add reset_defaults()
Aug 29, 2024
48bb3c2
add test for OcrdEnvConfig.reset_defaults()
Aug 29, 2024
ed92403
Workspace.reload_mets: fix for METS server case
Sep 1, 2024
9c3c399
OcrdMetsServer.add_file: pass on 'force' kwarg, too
Sep 2, 2024
c077e95
test_mets_server: add test for force (overwrite)
Sep 2, 2024
4492168
PcGts.Page.id / make_xml_id: replace '/' with '_'
Sep 13, 2024
83d52d8
METS Server: also export+delegate physical_pages
Sep 15, 2024
4eccefc
ocrd.cli.workspace: consistently pass on --mets-server-url and --back…
Sep 13, 2024
083df27
ocrd.cli.workspace server: add 'reload' and 'save'
Sep 13, 2024
b2c0161
ocrd.cli.validate tasks: pass on --mets-server-url, too
Sep 12, 2024
203a06a
run_processor: be robust if ocrd_tool is missing steps
Sep 12, 2024
4fbdd00
lib.bash: fix errexit
Sep 12, 2024
c865079
tests: make sure ocrd_utils.config gets reset whenever changing it gl…
Sep 13, 2024
1a13cd3
ocrd.cli.workspace: assert non-server in cmds mutating METS
bertsky Sep 16, 2024
bba597e
OcrdPage: add PageType.get_ReadingOrderGroups()
Sep 7, 2024
fa0fada
update OcrdPage from generateds
Sep 7, 2024
8c566d7
OcrdMets.get_physical_pages: cover return_divs w/o for_fileIds for_pa…
Sep 27, 2024
dd62418
ocrd.cli.workspace: use physical_pages if possible, fix default outpu…
Sep 27, 2024
1cfa6e3
Processor.process_page_file: avoid process_page_pcgts() if OCRD_EXIST…
Sep 27, 2024
f678dca
OcrdMets.get_physical_pages: cover return_divs w/o for_fileIds for_pa…
Sep 27, 2024
9064db0
ocrd.cli.workspace: use physical_pages if possible, fix default outpu…
Sep 27, 2024
9530fcd
Processor.process_page_file: avoid process_page_pcgts() if OCRD_EXIST…
Sep 27, 2024
9641d4a
OcrdMets.get_physical_pages: cover return_divs w/o for_fileIds for_pa…
Sep 27, 2024
19ce7d9
ocrd.cli.workspace: use physical_pages if possible, fix default outpu…
Sep 27, 2024
372f725
Added space after %U in imagemagick identify format prameter.
mexthecat Sep 27, 2024
44deb80
ocrd_exif: add multi-frame TIFF example
Sep 27, 2024
606915b
disableLogging: clearer comment
bertsky Sep 30, 2024
3b908a6
:memo: changelog
kba Sep 30, 2024
343a66a
:memo: changelog: remove spurious entries
kba Sep 30, 2024
f808b72
:memo: update changelog again
bertsky Sep 30, 2024
4d25fcf
update assets
kba Sep 30, 2024
bdfb410
test_exif: add example provided by @mexthecat
kba Sep 30, 2024
c744dc8
Merge branch 'mexthecat-master'
kba Sep 30, 2024
e6d1f85
:memo: changelog
kba Sep 30, 2024
ff81c6b
:package: v2.69.0
kba Sep 30, 2024
f44e28b
introduce: OCRD_NETWORK_CLIENT_POLLING_PRINT
MehmedGIT Oct 1, 2024
7177eb1
fix: config value description
MehmedGIT Oct 1, 2024
df8e8ee
add default value param to preserver backwards compatibility
MehmedGIT Oct 1, 2024
b183cfc
make -b/--block as flags
MehmedGIT Oct 1, 2024
342ef3a
implement feedback
MehmedGIT Oct 1, 2024
0e80a7c
fix: missed params
MehmedGIT Oct 1, 2024
d7df200
fix: integration client tests
MehmedGIT Oct 1, 2024
0bfef64
post_ps_workflow_request: pagewise configurable
kba Oct 1, 2024
19aad83
Merge remote-tracking branch 'github/network_client_block_prints' int…
kba Oct 1, 2024
1f5c4bb
Dockerfile.cuda-torch: do NOT rm /build/core
bertsky Oct 1, 2024
611b6b5
deployer: Remove any pre-existing socket file before starting the ser…
kba Oct 1, 2024
a68782d
Merge pull request #1280 from OCR-D/fix-docker-cuda-torch
kba Oct 1, 2024
9a71d04
remove UDS socket files
MehmedGIT Oct 2, 2024
854403d
remove shortcuts for page-wise
MehmedGIT Oct 2, 2024
4d01e66
fix: pass page-wise argument to relevant methods
MehmedGIT Oct 2, 2024
97427e0
Update src/ocrd_network/client_utils.py
MehmedGIT Oct 2, 2024
7454845
add endpoint DELETE /workflow/kill-mets-server-zombies to kill -SIGTE…
kba Oct 2, 2024
0506e9d
move mets-zombie killer to / and return list of killed PIDs
kba Oct 2, 2024
ad81356
/kill_mets_server_zombies use underscores not slashes
kba Oct 2, 2024
7a3be1e
Merge pull request #1278 from OCR-D/page-wise-param
kba Oct 2, 2024
4862d72
use 3.8 compatible typing
kba Oct 2, 2024
2cb3e2a
Merge branch 'network_client_block_prints' into mets-server-kill-zombies
kba Oct 2, 2024
8b6a49c
Merge pull request #1282 from OCR-D/mets-server-rm-socket
kba Oct 2, 2024
0d297e7
Merge branch 'network_client_block_prints' into mets-server-kill-zombies
kba Oct 2, 2024
4f6775f
OcrdMetsServer.kill_process: try the easy way (SIGINT) then the hard …
kba Oct 2, 2024
3882e7a
fix: add default to page_wise param
MehmedGIT Oct 2, 2024
a8bfbe4
Merge branch 'network_client_block_prints' into mets-server-kill-zombies
kba Oct 2, 2024
c5fd843
Merge pull request #1283 from OCR-D/mets-server-kill-zombies
kba Oct 2, 2024
7b6552b
previous state
MehmedGIT Oct 4, 2024
e3f5949
Merge branch 'network_client_block_prints' into fix_mets_server_zombies
MehmedGIT Oct 4, 2024
637a40e
do not use pid killing
MehmedGIT Oct 4, 2024
387dc30
add logger param to stop mets server
MehmedGIT Oct 4, 2024
07953f7
add extensive logging to mets proxy
MehmedGIT Oct 4, 2024
3a9e147
return empty response type earlier
MehmedGIT Oct 4, 2024
00655b8
fix: change UDS file deletion place
MehmedGIT Oct 4, 2024
810f811
return response from mets server before dying
MehmedGIT Oct 4, 2024
4970e62
fix: remove UDS file correctly
MehmedGIT Oct 4, 2024
906766d
comment out irrelevant code
MehmedGIT Oct 4, 2024
a87a2e1
fix: no more zombies, yay!
MehmedGIT Oct 4, 2024
e0ff4eb
add: extensive logging of mets server to file
MehmedGIT Oct 4, 2024
53c8f3f
change cache debug -> info for extensive logging to file
MehmedGIT Oct 4, 2024
fe41223
set log from info to debug
MehmedGIT Oct 4, 2024
55c2f63
fix: typo
MehmedGIT Oct 4, 2024
bf6616f
improve: delete socket file more appropriately
MehmedGIT Oct 4, 2024
bc8a03b
remove: unnecessary code
MehmedGIT Oct 4, 2024
303488a
fix: .__dict__ of {}
MehmedGIT Oct 4, 2024
c8e0c73
Update src/ocrd/mets_server.py
MehmedGIT Oct 8, 2024
2cd4a64
Update src/ocrd/mets_server.py
MehmedGIT Oct 8, 2024
44a8ceb
Update src/ocrd/mets_server.py
MehmedGIT Oct 8, 2024
61c683f
Update src/ocrd_network/runtime_data/deployer.py
MehmedGIT Oct 8, 2024
5055309
remove unnecessary method
MehmedGIT Oct 8, 2024
34bfbf4
fix: make stop() and ..reload..() sync
MehmedGIT Oct 8, 2024
ab660fb
fix: stop mets server when no cached requests
MehmedGIT Oct 8, 2024
148f8d4
clean: remove pid kill flag in stop mets server
MehmedGIT Oct 8, 2024
dacd325
extend log: server cache requests
MehmedGIT Oct 8, 2024
05ded73
improve: sleep no longer needed
MehmedGIT Oct 8, 2024
5d755a8
add new env: OCRD_NETWORK_RABBITMQ_HEARTBEAT
MehmedGIT Oct 9, 2024
a295b0c
deps-torch: also install torchvision
bertsky Oct 9, 2024
c5c60fd
fix: empty -> text
MehmedGIT Oct 9, 2024
e1b9784
deployer: remove METS Server path and url from their resp. caches on …
kba Oct 9, 2024
31a8474
ocrd_utils.initLogging: also add handler to root logger (to be consis…
Oct 9, 2024
50fc152
ocrd_utils.initLogging: also add handler to root logger (to be consis…
Oct 9, 2024
d7049b1
CLI decorator: only import ocrd_network when needed
Oct 10, 2024
47c9acf
Merge branch 'fix_mets_server_zombies' into deployer-mets-caching
kba Oct 10, 2024
926cb97
Merge pull request #1287 from OCR-D/deployer-mets-caching
kba Oct 10, 2024
d39c3d7
kill_mets_server_zombies: actually return List[int]
kba Oct 10, 2024
7512bd6
kill_mets_server_zombies: allow dry_run to test
kba Oct 10, 2024
252fb4d
Merge branch 'network_client_block_prints'
kba Oct 10, 2024
e40ed79
:memo: changelog
kba Oct 10, 2024
7f60559
Simplify description for OCRD_NETWORK_RABBITMQ_HEARTBEAT
kba Oct 10, 2024
3e736a7
Merge pull request #1285 from OCR-D/rabbitmq_heartbeat_env
kba Oct 10, 2024
4e6551b
Merge remote-tracking branch 'github/deps-torch-torchvision'
kba Oct 10, 2024
02c6eff
:memo: changelog
kba Oct 10, 2024
9391f49
Merge remote-tracking branch 'github/fix_mets_server_zombies'
kba Oct 10, 2024
88707ca
:memo: changelog
kba Oct 10, 2024
cb8d787
CLI decorator: only import ocrd_network when needed
Oct 10, 2024
03018f7
Merge pull request #1274 from stweil/typos
kba Oct 10, 2024
94e6d2c
:memo: changelog
kba Oct 10, 2024
d29c029
Merge branch 'master' of https://github.com/OCR-D/core
kba Oct 10, 2024
e5cdbe9
deps-cuda: retry if micromamba is unresponsive
bertsky Oct 10, 2024
539f5d7
Merge remote-tracking branch 'github/cli-decorator-import-network'
kba Oct 10, 2024
80c0c6f
:memo: changelog
kba Oct 10, 2024
7b1d172
create PyPI CD
bertsky Oct 10, 2024
7750f3f
:memo: changelog
kba Oct 10, 2024
012ccf6
:package: v2.70.0
kba Oct 10, 2024
a9d49c1
Processor w/ OCRD_MAX_PARALLEL_PAGES: ThreadPoolExecutor→ProcessPoolE…
Oct 10, 2024
a8e2c64
deps-cuda: retry micro.mamba.pm even more
bertsky Oct 10, 2024
85bde15
PyPI: do not upload deprecated distribution aliases anymore
bertsky Oct 10, 2024
41c0ce8
fix broken logging
MehmedGIT Oct 14, 2024
6d8539c
deps-cuda: make sure cudnn gets installed, pin torch version for CUDA 11
bertsky Oct 15, 2024
588c91d
Processor.process_workspace: apply timeout on process_page_file worke…
Oct 17, 2024
d126bdc
Processor w/ OCRD_MAX_PARALLEL_PAGES: concurrent.futures→loky
Oct 17, 2024
afa7f30
Processor w/o OCRD_MAX_PARALLEL_PAGES: dummy instead of executor
Oct 19, 2024
5821701
ocrd.process.profile logger: account for subprocess CPU time, too
Oct 19, 2024
53b1854
Processor.process_workspace: improve reporting, raise early if too ma…
Oct 21, 2024
4d66e37
Processor: refactor process_workspace into overridable subfuncs
Oct 23, 2024
93ec19a
fix internal_callback logging message
kba Oct 29, 2024
71d6d49
Processor.process_workspace_handle_page_task: do not handler sigint
Oct 30, 2024
d2d5290
Processor.process_workspace_handle_tasks: log nr of ignored exception…
Oct 30, 2024
7932a6a
Merge pull request #23 from bertsky/new-processor-api-process-worker
bertsky Oct 30, 2024
7d1503e
:package: v3.0.0b6
Oct 30, 2024
08a631c
tests: prevent side effects from ocrd_logging
Nov 7, 2024
f3e423a
initLogging: do not remove any previous handlers/levels
Nov 7, 2024
3143518
initLogging: only add root handler instead of multiple redundant hand…
Nov 7, 2024
27323c6
disableLogging: remove all handlers, reset all levels
Nov 7, 2024
eb3120d
setOverrideLogLevel: override all currently active loggers' level
Nov 7, 2024
0186c53
logging: increase default root (not ocrd) level from INFO to WARNING
Nov 7, 2024
5ba2720
Processor: update max_workers docstring
Nov 7, 2024
f17d588
initLogging: do not remove any previous handlers/levels
Nov 7, 2024
d6c551e
initLogging: only add root handler instead of multiple redundant hand…
Nov 7, 2024
8e87023
disableLogging: remove all handlers, reset all levels
Nov 7, 2024
4a2a090
setOverrideLogLevel: override all currently active loggers' level
Nov 7, 2024
7e8705e
logging: increase default root (not ocrd) level from INFO to WARNING
Nov 7, 2024
edaab4e
tests: prevent side effects from ocrd_logging
Nov 7, 2024
192895a
initLogging: call disableLogging if already initialized and force_reinit
Nov 11, 2024
f8f71d8
initLogging: call disableLogging if already initialized and force_reinit
Nov 11, 2024
5f2f602
Processor: replace weakref with __del__ to trigger shutdown
Nov 11, 2024
0446b82
Processor parallel pages: log via QueueHandler in subprocess, QueueLi…
Nov 11, 2024
53c4c18
:package: v3.0.0b7
Nov 12, 2024
e05068f
Merge remote-tracking branch 'github/fix-network-logging'
kba Nov 18, 2024
18c0c85
:memo: changelog
kba Nov 18, 2024
2413370
Merge remote-tracking branch 'github/fix-make-docs'
kba Nov 18, 2024
6258b3a
:memo: changelog
kba Nov 18, 2024
67263f8
Merge remote-tracking branch 'github/initlogging-root'
kba Nov 18, 2024
583fdd1
:memo: changelog
kba Nov 18, 2024
c0f6116
:package: v2.71.0
kba Nov 20, 2024
4492367
ocrd_cli_wrap_processor: always do initLogging
bertsky Nov 20, 2024
db21d75
ocrd_cli_wrap_processor: always do initLogging
bertsky Jan 6, 2025
f5f1a3b
:memo: changelog
kba Jan 6, 2025
71c0c19
:package: v2.71.1
kba Jan 6, 2025
6e048e1
fix help output for multi-line config option descriptions
kba Jan 8, 2025
3eea173
merge master
kba Jan 8, 2025
36f1705
Merge remote-tracking branch 'origin/master' into v3-release
kba Jan 8, 2025
358d406
:memo: changelog
kba Jan 8, 2025
a488fb1
Merge branch 'fix-help-output' into v3-release
kba Jan 8, 2025
75ce415
:memo: changelog
kba Jan 8, 2025
1264e57
Merge remote-tracking branch 'origin/initLogging-before-imports' into…
kba Jan 8, 2025
ff2a73b
:memo: changelog
kba Jan 8, 2025
d8890bd
Merge remote-tracking branch 'bertsky/new-processor-api-xpath-filter'…
kba Jan 8, 2025
e59222a
:memo: changelog
kba Jan 8, 2025
68786a6
remove 3.8 breaking typing hints
kba Jan 8, 2025
5d69e49
:package: :fire: v3.0.0
kba Jan 9, 2025
92fac9b
CI: Use token authentication for pypi
kba Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [published]
workflow_dispatch:

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build twine
pip install -r requirements.txt
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: make pypi
164 changes: 164 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,88 @@ Versioned according to [Semantic Versioning](http://semver.org/).

## Unreleased

## [3.0.0] - 2025-01-09

Changed:

- Merge v2 master into new-procesor-api
- PAGE API: Update to latest generateDS 2.44.1, bertsky/core#21

Fixed:

- `ocrd --help` output was broken for multiline config options, bertsky/core#25
- Call `initLogging` before instantiating processors in `ocrd_cli_wrap_processor`, bertsky/core#24, #1296
- PAGE API: Fully reversable mapping from/to XML element/generateDS instances, bertsky/core#21

Added:

- `ocrd-filter` processor to remove segments based on XPath expressions, bertsky/core#21
- XPath function `pc:pixelarea` for the number of pixels of the bounding box (or sum area on node sets), bertsky/core#21
- XPath function `pc:textequiv` for the first TextEquiv unicode string (or concatenated string on node sets), bertsky/core#21

## [3.0.0b7] - 2024-11-12

Fixed:
- `initLogging`: only add root handler instead of multiple redundant handlers with `propagate=false`
- `setOverrideLogLevel`: override all currently active loggers' level

Changed:
- :fire: logging: increase default root (not `ocrd`) level from `INFO` to `WARNING`
- :fire: `initLogging`: do not remove any previous handlers/levels, unless `force_reinit`
- :fire: `disableLogging`: remove all handlers, reset all levels - instead of being selective
- :fire: Processor: replace `weakref` with `__del__` to trigger `shutdown`
- :fire: `OCRD_MAX_PARALLEL_PAGES>1`: log via `QueueHandler` in subprocess, `QueueListener` in main

## [3.0.0b6] - 2024-10-30

Fixed:
- `OcrdMets.get_physical_pages`: cover `return_divs` w/o `for_fileIds` and `for_pageIds`

Changed:
- :fire: `ocrd_utils.initLogging`: also add handler to root logger (as in file config),
but disable message propagation to avoid duplication
- only import `ocrd_network` in `src/ocrd/decorators/__init__.py` once needed
- `Processor.process_page_file`: skip computing `process_page_pcgts` if output already exists,
but `OCRD_EXISTING_OUTPUT!=OVERWRITE`
- :fire: `OCRD_MAX_PARALLEL_PAGES>1`: switch from multithreading to multiprocessing, depend on
`loky` instead of stdlib `concurrent.futures`
- `OCRD_PROCESSING_PAGE_TIMEOUT>0`: actually enforce timeout within worker
- `OCRD_MAX_MISSING_OUTPUTS>0`: abort early if too many failures already, prospectively
- `Processor.process_workspace`: split up into overridable sub-methods:
- `process_workspace_submit_tasks` (iterate input file group and schedule page tasks)
- `process_workspace_submit_page_task` (download input files and submit single page task)
- `process_workspace_handle_tasks` (monitor page tasks and aggregate results)
- `process_workspace_handle_page_task` (await single page task and handle errors)


## [3.0.0b5] - 2024-09-16

Fixed:
- tests: ensure `ocrd_utils.config` gets reset whenever changing it globally
- `OcrdMetsServer.add_file`: pass on `force` kwarg
- `ocrd.cli.workspace`: consistently pass on `--mets-server-url` and `--backup`
- `ocrd.cli.validate "tasks"`: pass on `--mets-server-url`
- `ocrd.cli.bashlib "input-files"`: pass on `--mets-server-url`
- `lib.bash input-files`: pass on `--mets-server-url`, `--overwrite`, and parameters
- `lib.bash`: fix `errexit` handling
- `ocrd.cli.ocrd-tool "resolve-resource"`: forgot to actually print result

Changed:
- :fire: `Processor` / `Workspace.add_file`: always `force` if `OCRD_EXISTING_OUTPUT==OVERWRITE`
- :fire: `Processor.verify`: revert 3.0.0b1 enforcing cardinality checks (stay backwards compatible)
- :fire: `Processor.verify`: check output fileGrps, too
(must not exist unless `OCRD_EXISTING_OUTPUT=OVERWRITE|SKIP` or disjoint `--page-id` range)
- lib.bash `input-files`: do not try to validate tasks here (now covered by `Processor.verify()`)
- `run_processor`: be robust if `ocrd_tool` is missing `steps`
- `PcGtsType.PageType.id` via `make_xml_id`: replace `/` with `_`

Added:
- `OcrdPage`: new `PageType.get_ReadingOrderGroups()` to retrieve recursive RO as dict
- ocrd.cli.workspace `server`: add subcommands `reload` and `save`
- METS Server: export and delegate `physical_pages`
- processor CLI: delegate `--resolve-resource`, too
- `Processor.process_page_file` / `OcrdPageResultImage`: allow `None` besides `AlternativeImageType`

## [3.0.0b4] - 2024-09-02

Fixed:
Expand Down Expand Up @@ -100,6 +182,79 @@ Added:
- `Processor.verify`: handle fileGrp cardinality verification, with default implementation
- `Processor.setup`: to set up processor before processing, optional

## [2.71.1] - 2025-01-06

Changed:

* Do `initLogging` before calling processors in `ocrd_cli_wrap_processor`, #1232, #1296

## [2.71.0] - 2024-11-20

Changed:

* Rewrite `ocrd_utils.logging`, #1288
* Handle only `''` as the root logger
* `disableLogging`: Remove handlers from root and all configured loggers
* Do not do any module-level modification of the log config

Fixed:

* Typo in processing_worker log message, #1293
* Call `initLogging` at the right time in `ocrd_network`, #1292
* `make docs` fixed with absolute path to location, #1273

## [2.70.0] - 2024-10-10

Added:

- `ocrd network client workflow run`: Add `--print-status` flag to periodically print the job status, #1277
- Processing Server: `DELETE /mets_server_zombies` to kill any renegade METS servers, #1277
- No more zombie METS Server by properly shutting them down, #1284
- `OCRD_NETWORK_RABBITMQ_HEARBEAT` to allow overriding the [heartbeat](https://pika.readthedocs.io/en/stable/examples/heartbeat_and_blocked_timeouts.html) behavior of RabbitMQ, #1285

Changed:

- significantly more detailed logging for the METS Server and Processing Server, #1284
- Only import `ocrd_network` in src/ocrd/decorators/__init__.py once needed, #1289
- Automate release via GitHub Actions, #1290

Fixed:

- `ocrd/core-cuda-torch`: Install torchvision as well, #1286
- Processing Server: remove shut down METS servers from deployer's cache, #1287
- typos, #1274

## [2.69.0] - 2024-09-30

Fixed:
- tests: ensure `ocrd_utils.config` gets reset whenever changing it globally
- `ocrd.cli.workspace`: consistently pass on `--mets-server-url` and `--backup`
- `ocrd.cli.workspace`: make `list-page` work w/ METS Server
- `ocrd.cli.validate "tasks"`: pass on `--mets-server-url`
- `lib.bash`: fix `errexit` handling
- actually apply CLI `--log-filename`, and show in `--help`
- adapt to Pillow changes
- `ocrd workspace clone`: do pass on `--file-grp` (for download filtering)
- `OcrdMetsServer.add_file`: pass on `force` kwarg
- `Workspace.reload_mets`: handle ClientSideOcrdMets as well
- `OcrdMets.get_physical_pages`: cover `return_divs` w/o `for_fileIds` and `for_pageIds`
- `disableLogging`: also re-instate root logger to Python defaults
- `OcrdExif`: handle multi-frame TIFFs gracefully in `identify` callout, #1276

Changed:
- `run_processor`: be robust if `ocrd_tool` is missing `steps`
- `PcGtsType.PageType.id` via `make_xml_id`: replace `/` with `_`
- `ClientSideOcrdMets`: use same logger name prefix as METS Server
- `Processor.zip_input_files`: when `--page-id` yields empty list, just log instead of raise

Added:
- `OcrdPage`: new `PageType.get_ReadingOrderGroups()` to retrieve recursive RO as dict
- METS Server: export and delegate `physical_pages`
- ocrd.cli.workspace `server`: add subcommands `reload` and `save`
- processor CLI: delegate `--resolve-resource`, too
- `OcrdConfig.reset_defaults` to reset config variables to their defaults
- `ocrd_utils.scale_coordinates` for resizing images

## [2.68.0] - 2024-08-23

Changed:
Expand Down Expand Up @@ -2259,11 +2414,20 @@ Fixed
Initial Release

<!-- link-labels -->
[3.0.0]: ../../compare/v3.0.0..v3.0.0b7
[3.0.0b7]: ../../compare/v3.0.0b7..v3.0.0b6
[3.0.0b6]: ../../compare/v3.0.0b6..v3.0.0b5
[3.0.0b5]: ../../compare/v3.0.0b5..v3.0.0b4
[3.0.0b4]: ../../compare/v3.0.0b4..v3.0.0b3
[3.0.0b3]: ../../compare/v3.0.0b3..v3.0.0b2
[3.0.0b2]: ../../compare/v3.0.0b2..v3.0.0b1
[3.0.0b1]: ../../compare/v3.0.0b1..v3.0.0a2
[3.0.0a2]: ../../compare/v3.0.0a2..v3.0.0a1
[3.0.0a1]: ../../compare/v3.0.0a1..v2.67.2
[2.71.1]: ../../compare/v2.71.1..v2.71.0
[2.71.0]: ../../compare/v2.71.0..v2.70.0
[2.70.0]: ../../compare/v2.70.0..v2.69.0
[2.69.0]: ../../compare/v2.69.0..v2.68.0
[2.68.0]: ../../compare/v2.68.0..v2.67.2
[2.67.2]: ../../compare/v2.67.2..v2.67.1
[2.67.1]: ../../compare/v2.67.1..v2.67.0
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile.cuda-torch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ RUN make deps-torch

WORKDIR /data

RUN rm -fr /build

CMD ["/usr/local/bin/ocrd", "--help"]

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ deps-cuda: CONDA_EXE ?= /usr/local/bin/conda
deps-cuda: export CONDA_PREFIX ?= /conda
deps-cuda: PYTHON_PREFIX != $(PYTHON) -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'
deps-cuda:
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
curl --retry 6 -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
mv bin/micromamba $(CONDA_EXE)
# Install Conda system-wide (for interactive / login shells)
echo 'export MAMBA_EXE=$(CONDA_EXE) MAMBA_ROOT_PREFIX=$(CONDA_PREFIX) CONDA_PREFIX=$(CONDA_PREFIX) PATH=$(CONDA_PREFIX)/bin:$$PATH' >> /etc/profile.d/98-conda.sh
Expand Down Expand Up @@ -97,7 +97,7 @@ deps-cuda:
# works, too:
shopt -s nullglob; \
$(PIP) install nvidia-pyindex \
&& $(PIP) install nvidia-cudnn-cu11==8.7.* \
&& $(PIP) install nvidia-cudnn-cu11~=8.7 \
nvidia-cublas-cu11~=11.11 \
nvidia-cusparse-cu11~=11.7 \
nvidia-cusolver-cu11~=11.4 \
Expand Down Expand Up @@ -158,7 +158,7 @@ deps-tf2:
fi

deps-torch:
$(PIP) install -i https://download.pytorch.org/whl/cu118 torch
$(PIP) install -i https://download.pytorch.org/whl/cu118 torchvision==0.16.2+cu118 torch==2.1.2+cu118

# Dependencies for deployment in an ubuntu/debian linux
deps-ubuntu:
Expand All @@ -178,7 +178,7 @@ build:

# (Re)install the tool
install: #build
# not stricttly necessary but a precaution against outdated python build tools, https://github.com/OCR-D/core/pull/1166
# not strictly necessary but a precaution against outdated python build tools, https://github.com/OCR-D/core/pull/1166
$(PIP) install -U pip wheel
$(PIP_INSTALL) . $(PIP_INSTALL_CONFIG_OPTION)
@# workaround for shapely#1598
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0b4
3.0.0
7 changes: 7 additions & 0 deletions docs/api/ocrd_network/ocrd_network.client_utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ocrd\_network.client\_utils module
==================================

.. automodule:: ocrd_network.client_utils
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/api/ocrd_network/ocrd_network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Submodules
:maxdepth: 4

ocrd_network.client
ocrd_network.client_utils
ocrd_network.constants
ocrd_network.database
ocrd_network.logging_utils
Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
# import os
# import sys
# # sys.path.insert(0, os.path.abspath('..'))
with open('../VERSION', encoding='utf-8') as f:
from pathlib import Path
with open(Path(__file__).parent.parent / 'VERSION', encoding='utf-8') as f:
VERSION = f.read()


Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Issues = "https://github.com/OCR-D/core/issues"
[project.scripts]
ocrd = "ocrd.cli:cli"
ocrd-dummy = "ocrd.processor.builtin.dummy_processor:cli"
ocrd-filter = "ocrd.processor.builtin.filter_processor:cli"

[tool.setuptools]
include-package-data = true
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ click >=7
cryptography < 43.0.0
Deprecated == 1.2.0
docker
elementpath
fastapi>=0.78.0
filetype
Flask
Expand All @@ -13,6 +14,7 @@ httpx>=0.22.0
importlib_metadata ; python_version < '3.8'
importlib_resources ; python_version < '3.10'
jsonschema>=4
loky
lxml
memory-profiler >= 0.58.0
# XXX explicitly do not restrict the numpy version because different
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
autopep8
cryptography < 43.0.0
pytest >= 4.0.0
generateDS == 2.35.20
generateDS == 2.44.1
pytest-benchmark >= 3.2.3
pytest-timeout
coverage >= 4.5.2
Expand Down
4 changes: 3 additions & 1 deletion src/ocrd/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def command_with_replaced_help(*replacements):

class CommandWithReplacedHelp(click.Command):
def get_help(self, ctx):
newhelp = super().get_help(ctx)
newhelp : str = super().get_help(ctx)
for replacement in replacements:
newhelp = re.sub(*replacement, newhelp)
# print(newhelp)
Expand Down Expand Up @@ -83,6 +83,8 @@ def get_help(self, ctx):
\b
{config.describe('OCRD_NETWORK_RABBITMQ_CLIENT_CONNECT_ATTEMPTS')}
\b
{config.describe('OCRD_NETWORK_RABBITMQ_HEARTBEAT')}
\b
{config.describe('OCRD_PROFILE_FILE')}
\b
{config.describe('OCRD_PROFILE', wrap_text=False)}
Expand Down
Loading