ocrd 3.0.0b2__tar.gz → 3.0.0b4__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.
- {ocrd-3.0.0b2/src/ocrd.egg-info → ocrd-3.0.0b4}/PKG-INFO +1 -1
- ocrd-3.0.0b4/VERSION +1 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/cli/__init__.py +3 -3
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/processor/base.py +21 -16
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/workspace.py +4 -1
- {ocrd-3.0.0b2 → ocrd-3.0.0b4/src/ocrd.egg-info}/PKG-INFO +1 -1
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_utils/config.py +13 -1
- ocrd-3.0.0b2/VERSION +0 -1
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/LICENSE +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/MANIFEST.in +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/README.md +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/README_bashlib.md +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/README_ocrd.md +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/README_ocrd_modelfactory.md +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/README_ocrd_models.md +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/README_ocrd_network.md +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/README_ocrd_utils.md +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/README_ocrd_validators.md +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/pyproject.toml +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/requirements.txt +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/setup.cfg +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/cli/bashlib.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/cli/log.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/cli/network.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/cli/ocrd_tool.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/cli/process.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/cli/resmgr.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/cli/validate.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/cli/workspace.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/cli/zip.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/constants.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/decorators/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/decorators/loglevel_option.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/decorators/mets_find_options.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/decorators/ocrd_cli_options.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/decorators/parameter_option.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/lib.bash +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/mets_server.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/ocrd-all-tool.json +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/processor/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/processor/builtin/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/processor/builtin/dummy/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/processor/builtin/dummy/ocrd-tool.json +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/processor/builtin/dummy_processor.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/processor/helpers.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/processor/ocrd_page_result.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/resolver.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/resource_list.yml +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/resource_manager.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/task_sequence.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/workspace_backup.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd/workspace_bagger.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd.egg-info/SOURCES.txt +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd.egg-info/dependency_links.txt +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd.egg-info/entry_points.txt +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd.egg-info/requires.txt +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd.egg-info/top_level.txt +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_modelfactory/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/constants.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/mets-empty.xml +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/ocrd_agent.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/ocrd_exif.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/ocrd_file.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/ocrd_mets.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/ocrd_page.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/ocrd_page_generateds.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/ocrd_xml_base.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/report.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_models/utils.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/cli/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/cli/client.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/cli/processing_server.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/cli/processing_worker.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/cli/processor_server.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/client.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/client_utils.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/constants.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/database.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/logging_utils.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/models/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/models/job.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/models/messages.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/models/ocrd_tool.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/models/workflow.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/models/workspace.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/param_validators.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/process_helpers.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/processing_server.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/processing_worker.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/processor_server.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/rabbitmq_utils/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/rabbitmq_utils/connector.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/rabbitmq_utils/constants.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/rabbitmq_utils/consumer.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/rabbitmq_utils/helpers.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/rabbitmq_utils/ocrd_messages.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/rabbitmq_utils/publisher.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/runtime_data/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/runtime_data/config_parser.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/runtime_data/connection_clients.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/runtime_data/deployer.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/runtime_data/hosts.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/runtime_data/network_agents.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/runtime_data/network_services.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/server_cache.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/server_utils.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/tcp_to_uds_mets_proxy.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_network/utils.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_utils/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_utils/constants.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_utils/deprecate.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_utils/image.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_utils/introspect.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_utils/logging.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_utils/ocrd_logging.conf +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_utils/os.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_utils/str.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/__init__.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/bagit-profile.yml +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/constants.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/json_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/message_processing.schema.yml +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/message_result.schema.yml +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/mets.xsd +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/ocrd_network_message_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/ocrd_tool.schema.yml +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/ocrd_tool_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/ocrd_zip_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/page.xsd +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/page_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/parameter_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/processing_server_config.schema.yml +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/processing_server_config_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/resource_list_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/workspace_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/xlink.xsd +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/xsd_mets_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/xsd_page_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/src/ocrd_validators/xsd_validator.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_decorators.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_logging.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_logging_conf.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_mets_server.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_model_factory.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_resolver.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_resolver_oai.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_resource_manager.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_task_sequence.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_utils.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_version.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_workspace.py +0 -0
- {ocrd-3.0.0b2 → ocrd-3.0.0b4}/tests/test_workspace_remove.py +0 -0
ocrd-3.0.0b4/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.0.0b4
|
|
@@ -61,11 +61,11 @@ Variables:
|
|
|
61
61
|
\b
|
|
62
62
|
{config.describe('OCRD_DOWNLOAD_INPUT')}
|
|
63
63
|
\b
|
|
64
|
-
{config.describe('OCRD_MISSING_INPUT')}
|
|
64
|
+
{config.describe('OCRD_MISSING_INPUT', wrap_text=False)}
|
|
65
65
|
\b
|
|
66
|
-
{config.describe('OCRD_MISSING_OUTPUT')}
|
|
66
|
+
{config.describe('OCRD_MISSING_OUTPUT', wrap_text=False)}
|
|
67
67
|
\b
|
|
68
|
-
{config.describe('OCRD_EXISTING_OUTPUT')}
|
|
68
|
+
{config.describe('OCRD_EXISTING_OUTPUT', wrap_text=False)}
|
|
69
69
|
\b
|
|
70
70
|
{config.describe('OCRD_METS_CACHING')}
|
|
71
71
|
\b
|
|
@@ -166,11 +166,14 @@ class Processor():
|
|
|
166
166
|
|
|
167
167
|
(Override if ``ocrd-tool.json`` is not distributed with the Python package.)
|
|
168
168
|
"""
|
|
169
|
-
|
|
170
|
-
module_tokens =
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
module = inspect.getmodule(self)
|
|
170
|
+
module_tokens = module.__package__.split('.')
|
|
171
|
+
# for namespace packages, we cannot just use the first token
|
|
172
|
+
for i in range(len(module_tokens)):
|
|
173
|
+
prefix = '.'.join(module_tokens[:i + 1])
|
|
174
|
+
if sys.modules[prefix].__spec__.has_location:
|
|
175
|
+
return resource_filename(prefix, self.metadata_filename)
|
|
176
|
+
raise Exception("cannot find top-level module prefix for %s", module.__package__)
|
|
174
177
|
|
|
175
178
|
@cached_property
|
|
176
179
|
def metadata_rawdict(self) -> dict:
|
|
@@ -455,22 +458,22 @@ class Processor():
|
|
|
455
458
|
nr_copied = 0
|
|
456
459
|
|
|
457
460
|
# set up multithreading
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
max_workers =
|
|
461
|
+
max_workers = max(0, config.OCRD_MAX_PARALLEL_PAGES)
|
|
462
|
+
if self.max_workers > 0 and self.max_workers < config.OCRD_MAX_PARALLEL_PAGES:
|
|
463
|
+
self._base_logger.info("limiting number of threads from %d to %d", max_workers, self.max_workers)
|
|
464
|
+
max_workers = self.max_workers
|
|
462
465
|
if max_workers > 1:
|
|
463
466
|
assert isinstance(workspace.mets, ClientSideOcrdMets), \
|
|
464
467
|
"OCRD_MAX_PARALLEL_PAGES>1 requires also using --mets-server-url"
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
max_seconds =
|
|
468
|
+
max_seconds = max(0, config.OCRD_PROCESSING_PAGE_TIMEOUT)
|
|
469
|
+
if self.max_page_seconds > 0 and self.max_page_seconds < config.OCRD_PROCESSING_PAGE_TIMEOUT:
|
|
470
|
+
self._base_logger.info("limiting page timeout from %d to %d sec", max_seconds, self.max_page_seconds)
|
|
471
|
+
max_seconds = self.max_page_seconds
|
|
469
472
|
executor = ThreadPoolExecutor(
|
|
470
473
|
max_workers=max_workers or 1,
|
|
471
474
|
thread_name_prefix=f"pagetask.{workspace.mets.unique_identifier}"
|
|
472
475
|
)
|
|
473
|
-
self._base_logger.debug("started executor %s", str(executor))
|
|
476
|
+
self._base_logger.debug("started executor %s with %d workers", str(executor), max_workers or 1)
|
|
474
477
|
tasks = {}
|
|
475
478
|
|
|
476
479
|
for input_file_tuple in self.zip_input_files(on_error='abort', require_first=False):
|
|
@@ -478,7 +481,7 @@ class Processor():
|
|
|
478
481
|
page_id = next(input_file.pageId
|
|
479
482
|
for input_file in input_file_tuple
|
|
480
483
|
if input_file)
|
|
481
|
-
self._base_logger.info(f"
|
|
484
|
+
self._base_logger.info(f"preparing page {page_id}")
|
|
482
485
|
for i, input_file in enumerate(input_file_tuple):
|
|
483
486
|
if input_file is None:
|
|
484
487
|
# file/page not found in this file grp
|
|
@@ -521,9 +524,10 @@ class Processor():
|
|
|
521
524
|
# broad coverage of output failures (including TimeoutError)
|
|
522
525
|
except (Exception, TimeoutError) as err:
|
|
523
526
|
# FIXME: add re-usable/actionable logging
|
|
524
|
-
self._base_logger.error(f"Failure on page {page_id}: {str(err) or err.__class__.__name__}")
|
|
525
527
|
if config.OCRD_MISSING_OUTPUT == 'ABORT':
|
|
528
|
+
self._base_logger.error(f"Failure on page {page_id}: {str(err) or err.__class__.__name__}")
|
|
526
529
|
raise err
|
|
530
|
+
self._base_logger.exception(f"Failure on page {page_id}: {str(err) or err.__class__.__name__}")
|
|
527
531
|
if config.OCRD_MISSING_OUTPUT == 'SKIP':
|
|
528
532
|
nr_skipped += 1
|
|
529
533
|
continue
|
|
@@ -587,6 +591,7 @@ class Processor():
|
|
|
587
591
|
input_pcgts : List[Optional[OcrdPage]] = [None] * len(input_files)
|
|
588
592
|
assert isinstance(input_files[0], get_args(OcrdFileType))
|
|
589
593
|
page_id = input_files[0].pageId
|
|
594
|
+
self._base_logger.info("processing page %s", page_id)
|
|
590
595
|
for i, input_file in enumerate(input_files):
|
|
591
596
|
assert isinstance(input_file, get_args(OcrdFileType))
|
|
592
597
|
self._base_logger.debug(f"parsing file {input_file.ID} for page {page_id}")
|
|
@@ -121,7 +121,10 @@ class Workspace():
|
|
|
121
121
|
"""
|
|
122
122
|
Reload METS from the filesystem.
|
|
123
123
|
"""
|
|
124
|
-
|
|
124
|
+
if self.is_remote:
|
|
125
|
+
self.mets.reload()
|
|
126
|
+
else:
|
|
127
|
+
self.mets = OcrdMets(filename=self.mets_target)
|
|
125
128
|
|
|
126
129
|
@deprecated_alias(pageId="page_id")
|
|
127
130
|
@deprecated_alias(ID="file_id")
|
|
@@ -78,14 +78,26 @@ class OcrdEnvConfig():
|
|
|
78
78
|
raise ValueError(f"Unregistered env variable {name}")
|
|
79
79
|
return self._variables[name].has_default
|
|
80
80
|
|
|
81
|
+
def reset_defaults(self):
|
|
82
|
+
for name in self._variables:
|
|
83
|
+
try:
|
|
84
|
+
# we cannot use hasattr, because that delegates to getattr,
|
|
85
|
+
# which we override and provide defaults for (which of course
|
|
86
|
+
# cannot be removed)
|
|
87
|
+
if self.__getattribute__(name):
|
|
88
|
+
delattr(self, name)
|
|
89
|
+
except AttributeError:
|
|
90
|
+
pass
|
|
91
|
+
|
|
81
92
|
def describe(self, name, *args, **kwargs):
|
|
82
93
|
if not name in self._variables:
|
|
83
94
|
raise ValueError(f"Unregistered env variable {name}")
|
|
84
95
|
return self._variables[name].describe(*args, **kwargs)
|
|
85
96
|
|
|
86
97
|
def __getattr__(self, name):
|
|
98
|
+
# will be called if name is not accessible (has not been added directly yet)
|
|
87
99
|
if not name in self._variables:
|
|
88
|
-
raise
|
|
100
|
+
raise AttributeError(f"Unregistered env variable {name}")
|
|
89
101
|
var_obj = self._variables[name]
|
|
90
102
|
try:
|
|
91
103
|
raw_value = self.raw_value(name)
|
ocrd-3.0.0b2/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.0.0b2
|
|
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
|
|
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
|