docling-mlx 0.1.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.
- docling_mlx-0.1.0/.gitignore +31 -0
- docling_mlx-0.1.0/AGENTS.md +16 -0
- docling_mlx-0.1.0/CONTRIBUTING.md +29 -0
- docling_mlx-0.1.0/DEVELOPMENT.md +262 -0
- docling_mlx-0.1.0/LICENSE +202 -0
- docling_mlx-0.1.0/LICENSES/Apache-2.0.txt +73 -0
- docling_mlx-0.1.0/LICENSES/LicenseRef-USGS-Public-Domain.txt +9 -0
- docling_mlx-0.1.0/LICENSES/MIT.txt +18 -0
- docling_mlx-0.1.0/NOTICE +76 -0
- docling_mlx-0.1.0/PKG-INFO +216 -0
- docling_mlx-0.1.0/README.md +180 -0
- docling_mlx-0.1.0/REUSE.toml +75 -0
- docling_mlx-0.1.0/docs/architecture.md +77 -0
- docling_mlx-0.1.0/docs/commits.md +27 -0
- docling_mlx-0.1.0/docs/document-figure/README.md +85 -0
- docling_mlx-0.1.0/docs/document-figure/validation.md +78 -0
- docling_mlx-0.1.0/docs/granite-vision/README.md +205 -0
- docling_mlx-0.1.0/docs/granite-vision/validation.md +444 -0
- docling_mlx-0.1.0/docs/layout-egret/README.md +65 -0
- docling_mlx-0.1.0/docs/layout-egret/validation.md +81 -0
- docling_mlx-0.1.0/docs/layout-heron/README.md +75 -0
- docling_mlx-0.1.0/docs/layout-heron/validation.md +68 -0
- docling_mlx-0.1.0/docs/tableformer-v1/README.md +129 -0
- docling_mlx-0.1.0/docs/tableformer-v1/validation.md +79 -0
- docling_mlx-0.1.0/docs/tableformer-v2/README.md +139 -0
- docling_mlx-0.1.0/docs/tableformer-v2/validation.md +127 -0
- docling_mlx-0.1.0/examples/README.md +17 -0
- docling_mlx-0.1.0/examples/document_figure/classify_images.py +47 -0
- docling_mlx-0.1.0/examples/mlx_pipeline/README.md +37 -0
- docling_mlx-0.1.0/examples/mlx_pipeline/pipeline.py +181 -0
- docling_mlx-0.1.0/examples/mlx_pipeline/pyproject.toml +11 -0
- docling_mlx-0.1.0/examples/mlx_pipeline/uv.lock +1025 -0
- docling_mlx-0.1.0/examples/std_pdf_pipeline_all_mlx.py +66 -0
- docling_mlx-0.1.0/pyproject.toml +148 -0
- docling_mlx-0.1.0/src/docling_mlx/__init__.py +7 -0
- docling_mlx-0.1.0/src/docling_mlx/_compat/__init__.py +3 -0
- docling_mlx-0.1.0/src/docling_mlx/_compat/docling.py +24 -0
- docling_mlx-0.1.0/src/docling_mlx/_compat/mlx_vlm.py +82 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/__init__.py +3 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/detector_primitives.py +318 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/dfine/config.py +467 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/dfine/decoder.py +322 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/dfine/model.py +187 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/dfine/primitives.py +50 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/dfine/vision.py +614 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/dfine/weights.py +165 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/efficientnet/__init__.py +3 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/efficientnet/config.py +263 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/efficientnet/model.py +262 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/efficientnet/weights.py +111 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/rt_detr_v2/__init__.py +21 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/rt_detr_v2/config.py +395 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/rt_detr_v2/model.py +165 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/rt_detr_v2/transformer.py +292 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/rt_detr_v2/vision.py +795 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/rt_detr_v2/weights.py +121 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v1/__init__.py +43 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v1/_source.py +10 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v1/bbox.py +249 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v1/config.py +245 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v1/decoder.py +252 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v1/model.py +102 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v1/vision.py +235 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v2/__init__.py +34 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v2/bbox.py +233 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v2/config.py +101 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v2/decoder.py +458 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v2/model.py +352 -0
- docling_mlx-0.1.0/src/docling_mlx/_models/tableformer_v2/vision.py +292 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/__init__.py +3 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/_shared.py +98 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/image_classification/__init__.py +3 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/image_classification/efficientnet/__init__.py +25 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/image_classification/efficientnet/artifact.py +30 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/image_classification/efficientnet/engine.py +204 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/image_classification/efficientnet/preprocessing.py +160 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/object_detection/__init__.py +3 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/object_detection/_focal_postprocessing.py +117 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/object_detection/_types.py +20 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/object_detection/dfine/__init__.py +25 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/object_detection/dfine/artifact.py +34 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/object_detection/dfine/engine.py +172 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/object_detection/rt_detr_v2/__init__.py +23 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/object_detection/rt_detr_v2/artifact.py +36 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/object_detection/rt_detr_v2/engine.py +175 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/object_detection/rt_detr_v2/preprocessing.py +121 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/__init__.py +3 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v1/__init__.py +17 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v1/artifact.py +173 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v1/conversion.py +155 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v1/engine.py +236 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v1/model_spec.py +22 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v1/postprocessing.py +513 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v1/preprocessing.py +53 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v2/__init__.py +17 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v2/artifact.py +208 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v2/conversion.py +101 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v2/engine.py +208 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v2/model_spec.py +22 -0
- docling_mlx-0.1.0/src/docling_mlx/engines/table_structure/tableformer_v2/preprocessing.py +44 -0
- docling_mlx-0.1.0/src/docling_mlx/pipeline.py +115 -0
- docling_mlx-0.1.0/src/docling_mlx/plugins.py +37 -0
- docling_mlx-0.1.0/src/docling_mlx/presets.py +84 -0
- docling_mlx-0.1.0/src/docling_mlx/py.typed +0 -0
- docling_mlx-0.1.0/src/docling_mlx/runtime/__init__.py +3 -0
- docling_mlx-0.1.0/src/docling_mlx/runtime/guards.py +24 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/__init__.py +57 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/_chart_granite.py +110 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/_granite_vision.py +85 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/_otsl.py +95 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/chart_extraction.py +226 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/granite_vision_engine.py +94 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/layout.py +270 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/picture_classification.py +250 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/table_structure.py +213 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/table_structure_v1.py +290 -0
- docling_mlx-0.1.0/src/docling_mlx/stages/table_structure_v2.py +351 -0
- docling_mlx-0.1.0/tests/chart_granite/test_chart_extraction.py +410 -0
- docling_mlx-0.1.0/tests/chart_granite/test_compatibility.py +39 -0
- docling_mlx-0.1.0/tests/chart_granite/test_parsing.py +72 -0
- docling_mlx-0.1.0/tests/common/test_artifacts.py +183 -0
- docling_mlx-0.1.0/tests/common/test_component_contracts.py +159 -0
- docling_mlx-0.1.0/tests/common/test_model_card.py +117 -0
- docling_mlx-0.1.0/tests/common/test_presets.py +39 -0
- docling_mlx-0.1.0/tests/common/test_private_compatibility.py +19 -0
- docling_mlx-0.1.0/tests/common/test_warmup.py +94 -0
- docling_mlx-0.1.0/tests/document_figure/conftest.py +38 -0
- docling_mlx-0.1.0/tests/document_figure/test_adaptor.py +56 -0
- docling_mlx-0.1.0/tests/document_figure/test_benchmark.py +35 -0
- docling_mlx-0.1.0/tests/document_figure/test_efficientnet.py +108 -0
- docling_mlx-0.1.0/tests/document_figure/test_efficientnet_mlx.py +155 -0
- docling_mlx-0.1.0/tests/document_figure/test_engine.py +542 -0
- docling_mlx-0.1.0/tests/document_figure/test_official_parity.py +112 -0
- docling_mlx-0.1.0/tests/document_figure/test_preprocessing.py +71 -0
- docling_mlx-0.1.0/tests/document_figure/test_preprocessing_mlx.py +51 -0
- docling_mlx-0.1.0/tests/document_figure/test_stage.py +421 -0
- docling_mlx-0.1.0/tests/document_figure/test_validation.py +37 -0
- docling_mlx-0.1.0/tests/examples/test_pipeline_examples.py +265 -0
- docling_mlx-0.1.0/tests/fixtures/document_figure/UPSTREAM.md +20 -0
- docling_mlx-0.1.0/tests/fixtures/document_figure/picture_classification.pdf +0 -0
- docling_mlx-0.1.0/tests/fixtures/document_figure/reference_images/bar_chart.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/document_figure/reference_images/geographical_map.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/granite_vision/README.md +13 -0
- docling_mlx-0.1.0/tests/fixtures/granite_vision/chart-bar.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/granite_vision/chart-line.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/granite_vision/chart-pie.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/granite_vision/table-merged.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/granite_vision/table-multi.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/granite_vision/table-simple.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/layout_heron/README.md +14 -0
- docling_mlx-0.1.0/tests/fixtures/layout_heron/benchmark_gradient.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/tableformer_v1/UPSTREAM.md +20 -0
- docling_mlx-0.1.0/tests/fixtures/tableformer_v1/basin_table_1_text.pdf +0 -0
- docling_mlx-0.1.0/tests/fixtures/tableformer_v2/UPSTREAM.md +31 -0
- docling_mlx-0.1.0/tests/fixtures/tableformer_v2/basin_table_1.pdf +0 -0
- docling_mlx-0.1.0/tests/fixtures/tableformer_v2/basin_table_1.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/tableformer_v2/basin_table_2.png +0 -0
- docling_mlx-0.1.0/tests/fixtures/tableformer_v2/basin_table_3.png +0 -0
- docling_mlx-0.1.0/tests/golden/document_figure/bar_chart.npz +0 -0
- docling_mlx-0.1.0/tests/golden/document_figure/geographical_map.npz +0 -0
- docling_mlx-0.1.0/tests/golden/document_figure/metadata.json +93 -0
- docling_mlx-0.1.0/tests/golden/tableformer_v1/fast_basin_table_1.json +146 -0
- docling_mlx-0.1.0/tests/golden/tableformer_v2/release.json +6246 -0
- docling_mlx-0.1.0/tests/granite_vision/test_corrected_engine.py +512 -0
- docling_mlx-0.1.0/tests/granite_vision/test_release_contract.py +252 -0
- docling_mlx-0.1.0/tests/granite_vision/test_shared_engine.py +161 -0
- docling_mlx-0.1.0/tests/layout_egret/test_artifact.py +36 -0
- docling_mlx-0.1.0/tests/layout_egret/test_config.py +250 -0
- docling_mlx-0.1.0/tests/layout_egret/test_converter.py +210 -0
- docling_mlx-0.1.0/tests/layout_egret/test_decoder.py +201 -0
- docling_mlx-0.1.0/tests/layout_egret/test_engine.py +36 -0
- docling_mlx-0.1.0/tests/layout_egret/test_hf_parity.py +110 -0
- docling_mlx-0.1.0/tests/layout_egret/test_loader_parity.py +53 -0
- docling_mlx-0.1.0/tests/layout_egret/test_model.py +201 -0
- docling_mlx-0.1.0/tests/layout_egret/test_parity_harness.py +158 -0
- docling_mlx-0.1.0/tests/layout_egret/test_release_contract.py +313 -0
- docling_mlx-0.1.0/tests/layout_egret/test_stage.py +93 -0
- docling_mlx-0.1.0/tests/layout_egret/test_vision.py +158 -0
- docling_mlx-0.1.0/tests/layout_heron/test_artifact.py +89 -0
- docling_mlx-0.1.0/tests/layout_heron/test_backbone.py +115 -0
- docling_mlx-0.1.0/tests/layout_heron/test_benchmark_contract.py +24 -0
- docling_mlx-0.1.0/tests/layout_heron/test_config.py +92 -0
- docling_mlx-0.1.0/tests/layout_heron/test_converter.py +102 -0
- docling_mlx-0.1.0/tests/layout_heron/test_decoder.py +136 -0
- docling_mlx-0.1.0/tests/layout_heron/test_engine.py +32 -0
- docling_mlx-0.1.0/tests/layout_heron/test_hybrid_encoder.py +121 -0
- docling_mlx-0.1.0/tests/layout_heron/test_model_core.py +158 -0
- docling_mlx-0.1.0/tests/layout_heron/test_release_contract.py +365 -0
- docling_mlx-0.1.0/tests/layout_heron/test_stage.py +177 -0
- docling_mlx-0.1.0/tests/object_detection/test_focal_postprocessing.py +99 -0
- docling_mlx-0.1.0/tests/packaging/test_wheel_boundary.py +358 -0
- docling_mlx-0.1.0/tests/rt_detr_v2/test_attention_variants.py +84 -0
- docling_mlx-0.1.0/tests/rt_detr_v2/test_grid_sample.py +200 -0
- docling_mlx-0.1.0/tests/rt_detr_v2/test_hf_parity.py +113 -0
- docling_mlx-0.1.0/tests/rt_detr_v2/test_loader_parity.py +56 -0
- docling_mlx-0.1.0/tests/rt_detr_v2/test_primitives.py +126 -0
- docling_mlx-0.1.0/tests/table_granite/test_otsl.py +69 -0
- docling_mlx-0.1.0/tests/table_granite/test_stage.py +404 -0
- docling_mlx-0.1.0/tests/tableformer_v1/conftest.py +125 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_artifact.py +122 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_bbox.py +164 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_benchmark.py +33 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_config.py +89 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_converter.py +197 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_decoder.py +176 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_encoder.py +112 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_encoder_parity.py +156 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_engine.py +214 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_generation.py +111 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_model.py +219 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_offline_pdf.py +249 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_offline_pipeline.py +79 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_postprocessing.py +371 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_preprocessing.py +102 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_release_parity.py +129 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_source.py +44 -0
- docling_mlx-0.1.0/tests/tableformer_v1/test_stage.py +280 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_artifact.py +174 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_bbox.py +126 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_converter.py +255 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_decoder.py +214 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_disabled_stage_portable.py +126 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_encoder.py +108 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_encoder_parity.py +157 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_engine.py +249 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_model.py +287 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_offline_pipeline.py +149 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_parity_harness.py +175 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_preprocessing.py +86 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_projected_cache.py +151 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_release_contract.py +86 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_sdpa.py +79 -0
- docling_mlx-0.1.0/tests/tableformer_v2/test_stage.py +238 -0
- docling_mlx-0.1.0/tools/__init__.py +7 -0
- docling_mlx-0.1.0/tools/_common/__init__.py +3 -0
- docling_mlx-0.1.0/tools/_common/atomic.py +32 -0
- docling_mlx-0.1.0/tools/_common/benchmark.py +174 -0
- docling_mlx-0.1.0/tools/_common/hashing.py +39 -0
- docling_mlx-0.1.0/tools/_common/model_card.py +101 -0
- docling_mlx-0.1.0/tools/benchmark.py +82 -0
- docling_mlx-0.1.0/tools/compare_backends.py +2287 -0
- docling_mlx-0.1.0/tools/compare_dpbench.py +604 -0
- docling_mlx-0.1.0/tools/document_figure/__init__.py +3 -0
- docling_mlx-0.1.0/tools/document_figure/benchmark.py +342 -0
- docling_mlx-0.1.0/tools/document_figure/capture_reference.py +396 -0
- docling_mlx-0.1.0/tools/document_figure/convert_weights.py +134 -0
- docling_mlx-0.1.0/tools/document_figure/source.py +17 -0
- docling_mlx-0.1.0/tools/document_figure/validate_parity.py +77 -0
- docling_mlx-0.1.0/tools/layout_egret/__init__.py +3 -0
- docling_mlx-0.1.0/tools/layout_egret/benchmark.py +345 -0
- docling_mlx-0.1.0/tools/layout_egret/capture_reference.py +255 -0
- docling_mlx-0.1.0/tools/layout_egret/convert_weights.py +110 -0
- docling_mlx-0.1.0/tools/layout_egret/validate_parity.py +332 -0
- docling_mlx-0.1.0/tools/layout_heron/__init__.py +3 -0
- docling_mlx-0.1.0/tools/layout_heron/benchmark.py +163 -0
- docling_mlx-0.1.0/tools/layout_heron/convert_weights.py +146 -0
- docling_mlx-0.1.0/tools/release/__init__.py +3 -0
- docling_mlx-0.1.0/tools/release/qualify_concurrency.py +430 -0
- docling_mlx-0.1.0/tools/tableformer_v1/__init__.py +1 -0
- docling_mlx-0.1.0/tools/tableformer_v1/benchmark.py +278 -0
- docling_mlx-0.1.0/tools/tableformer_v1/capture_reference.py +487 -0
- docling_mlx-0.1.0/tools/tableformer_v1/convert_weights.py +182 -0
- docling_mlx-0.1.0/tools/tableformer_v1/reference_bbox.py +103 -0
- docling_mlx-0.1.0/tools/tableformer_v1/reference_decoder.py +123 -0
- docling_mlx-0.1.0/tools/tableformer_v1/reference_encoder.py +73 -0
- docling_mlx-0.1.0/tools/tableformer_v1/source.py +59 -0
- docling_mlx-0.1.0/tools/tableformer_v1/validate_parity.py +418 -0
- docling_mlx-0.1.0/tools/tableformer_v2/__init__.py +3 -0
- docling_mlx-0.1.0/tools/tableformer_v2/benchmark.py +309 -0
- docling_mlx-0.1.0/tools/tableformer_v2/capture_reference.py +397 -0
- docling_mlx-0.1.0/tools/tableformer_v2/convert_weights.py +183 -0
- docling_mlx-0.1.0/tools/tableformer_v2/reference_decoder.py +59 -0
- docling_mlx-0.1.0/tools/tableformer_v2/reference_encoder.py +61 -0
- docling_mlx-0.1.0/tools/tableformer_v2/reference_preprocessing.py +32 -0
- docling_mlx-0.1.0/tools/tableformer_v2/source.py +48 -0
- docling_mlx-0.1.0/tools/tableformer_v2/validate_parity.py +483 -0
- docling_mlx-0.1.0/uv.lock +3304 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.venv/
|
|
2
|
+
docs/local/
|
|
3
|
+
examples/*/.venv/
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
.pytest_cache/
|
|
7
|
+
.mypy_cache/
|
|
8
|
+
.ruff_cache/
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
.artifacts/
|
|
12
|
+
.reference/
|
|
13
|
+
reports/
|
|
14
|
+
*.egg-info/
|
|
15
|
+
.DS_Store
|
|
16
|
+
CLAUDE.local.md
|
|
17
|
+
.envrc.local
|
|
18
|
+
.rumdl_cache/
|
|
19
|
+
.claude/*
|
|
20
|
+
!.claude/CLAUDE.md
|
|
21
|
+
*.bundle
|
|
22
|
+
|
|
23
|
+
# ------------------------------------------------------------------------------
|
|
24
|
+
# Nix / direnv
|
|
25
|
+
# ------------------------------------------------------------------------------
|
|
26
|
+
/result
|
|
27
|
+
/result-*
|
|
28
|
+
.direnv/
|
|
29
|
+
# Generated into the worktree by git-hooks.nix's shellHook.
|
|
30
|
+
/.pre-commit-config.yaml
|
|
31
|
+
!.envrc
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
@DEVELOPMENT.md
|
|
4
|
+
|
|
5
|
+
## Docs
|
|
6
|
+
|
|
7
|
+
| Path | Primary audience | Secondary audience | Role |
|
|
8
|
+
| ---------------- | ---------------- | ------------------ | ----------------------- |
|
|
9
|
+
| `AGENTS.md` | Agent | - | Main agent document |
|
|
10
|
+
| `README.md` | User | Agent | Main user document |
|
|
11
|
+
| `DEVELOPMENT.md` | Developer | Agent | Main developer document |
|
|
12
|
+
| `docs/*` | As linked | As linked | Reference documents |
|
|
13
|
+
|
|
14
|
+
- Give each rule or explanation one authoritative home and link to it instead of duplicating it.
|
|
15
|
+
- Keep `README.md`, `DEVELOPMENT.md`, `AGENTS.md`, and canonical specs in sync with behavior.
|
|
16
|
+
Do not treat documentation drift as harmless in this repository.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Development setup
|
|
4
|
+
|
|
5
|
+
See [`DEVELOPMENT.md`](DEVELOPMENT.md) for the development environment, checks, and qualification lanes.
|
|
6
|
+
|
|
7
|
+
## SPDX headers
|
|
8
|
+
|
|
9
|
+
New project-authored files need only the license identifier in their header:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Declare project copyright in `REUSE.toml`; do not add a project copyright line
|
|
16
|
+
to new file headers. Adapted third-party files retain their upstream copyright
|
|
17
|
+
and SPDX license lines. Non-commentable files use `REUSE.toml` annotations.
|
|
18
|
+
|
|
19
|
+
## Commits
|
|
20
|
+
|
|
21
|
+
Commit messages follow Conventional Commits with the scopes in
|
|
22
|
+
[`docs/commits.md`](docs/commits.md); `committed.toml` enforces them.
|
|
23
|
+
|
|
24
|
+
## Third-party code
|
|
25
|
+
|
|
26
|
+
Never copy third-party code without retaining its upstream license and
|
|
27
|
+
attribution. Preserve or add an SPDX license header and add the required entry
|
|
28
|
+
to `NOTICE`. Code written after a reference implementation without copying it must say so in
|
|
29
|
+
the file header (`Implemented after ...`) and credit the reference in `NOTICE`.
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
This guide describes the current artifact and qualification workflow. Use Python 3.13 or newer on Apple
|
|
4
|
+
Silicon macOS for MLX work, and use `uv run --no-sync` so an already provisioned environment is
|
|
5
|
+
not rewritten.
|
|
6
|
+
|
|
7
|
+
Provision the development environment with the `dev` group; add `reference` for parity and
|
|
8
|
+
converter lanes. Add `standard`, `vlm`, or `tableformer-v1` only where the selected lane requires
|
|
9
|
+
that integration.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv sync --group dev
|
|
13
|
+
uv sync --group dev --group reference
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Dev environment
|
|
17
|
+
|
|
18
|
+
The optional Nix flake devshell provides the formatters, linters, `uv`, `gitleaks`, and `committed`;
|
|
19
|
+
`direnv allow` (via nix-direnv) or `nix develop` provides it and installs the git hooks (pre-commit:
|
|
20
|
+
treefmt + gitleaks; commit-msg: committed). The `uvx` commands in "Before every commit" are the
|
|
21
|
+
canonical checks and are the checks CI runs. Nix style: group dotted keys (`foo = { a = …; b = …; }`,
|
|
22
|
+
not `foo.a = …; foo.b = …;`).
|
|
23
|
+
|
|
24
|
+
## Before every commit
|
|
25
|
+
|
|
26
|
+
Run the repository-wide native checks:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
uvx rumdl check .
|
|
30
|
+
uvx typos .
|
|
31
|
+
uvx taplo fmt --check .
|
|
32
|
+
uvx taplo lint
|
|
33
|
+
uvx --from actionlint-py actionlint
|
|
34
|
+
uvx ruff check .
|
|
35
|
+
uvx ruff format --check .
|
|
36
|
+
uvx --with 'reuse[charset-normalizer]' reuse lint
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Checks and lanes
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
uv run --no-sync ruff check .
|
|
43
|
+
uv run --no-sync ruff format --check .
|
|
44
|
+
uv run --no-sync mypy
|
|
45
|
+
uv run --no-sync pytest -q -rs
|
|
46
|
+
uv lock --check
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The default pytest configuration is `not (mlx or parity or release)` and is self-contained. The
|
|
50
|
+
explicit lanes are:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
uv run --no-sync pytest -q -rs -m "mlx and not parity and not release"
|
|
54
|
+
uv run --no-sync pytest -q -rs -m parity
|
|
55
|
+
uv run --no-sync pytest -q -rs -m release
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Selected lanes require Apple Silicon, Metal, the reference group where applicable, and staged
|
|
59
|
+
artifacts. Every selected lane must finish with zero skips; a missing artifact is a failed setup,
|
|
60
|
+
not a qualified result. Source-dependent tests require these variables:
|
|
61
|
+
|
|
62
|
+
| Variable | Required directory |
|
|
63
|
+
| -------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
64
|
+
| `DOCLING_MLX_TABLEFORMER_V1_SOURCE` | Pinned `docling-project/docling-models` snapshot containing both TableFormer v1 profiles |
|
|
65
|
+
| `DOCLING_MLX_TABLEFORMER_V2_SOURCE` | Pinned `docling-project/TableFormerV2` snapshot |
|
|
66
|
+
| `DOCLING_MLX_EGRET_MEDIUM_SOURCE` | Pinned official Egret medium source snapshot |
|
|
67
|
+
| `DOCLING_MLX_EGRET_LARGE_SOURCE` | Pinned official Egret large source snapshot |
|
|
68
|
+
| `DOCLING_MLX_EGRET_XLARGE_SOURCE` | Pinned official Egret xlarge source snapshot |
|
|
69
|
+
| `DOCLING_MLX_OBJECT_DETECTION_PARITY_INPUTS` | First three pinned DPBench PDFs, named `0000.pdf` through `0002.pdf` |
|
|
70
|
+
|
|
71
|
+
Keep machine-specific lane variables in the ignored `.envrc.local` file.
|
|
72
|
+
|
|
73
|
+
The TableFormer download helpers print the cache directory to export:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
uv run --no-sync python -c \
|
|
77
|
+
'from tools.tableformer_v1.source import download_source; print(download_source())'
|
|
78
|
+
uv run --no-sync python -c \
|
|
79
|
+
'from tools.tableformer_v2.source import download_source; print(download_source())'
|
|
80
|
+
export DOCLING_MLX_TABLEFORMER_V1_SOURCE=/path/printed/by/the/first/command
|
|
81
|
+
export DOCLING_MLX_TABLEFORMER_V2_SOURCE=/path/printed/by/the/second/command
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Download each official Egret source at the immutable revision recorded in
|
|
85
|
+
[`docs/layout-egret/validation.md`](docs/layout-egret/validation.md):
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
export DOCLING_MLX_EGRET_MEDIUM_SOURCE=/path/to/egret-medium-source
|
|
89
|
+
export DOCLING_MLX_EGRET_LARGE_SOURCE=/path/to/egret-large-source
|
|
90
|
+
export DOCLING_MLX_EGRET_XLARGE_SOURCE=/path/to/egret-xlarge-source
|
|
91
|
+
hf download docling-project/docling-layout-egret-medium \
|
|
92
|
+
--revision REV \
|
|
93
|
+
--local-dir "$DOCLING_MLX_EGRET_MEDIUM_SOURCE"
|
|
94
|
+
hf download docling-project/docling-layout-egret-large \
|
|
95
|
+
--revision REV \
|
|
96
|
+
--local-dir "$DOCLING_MLX_EGRET_LARGE_SOURCE"
|
|
97
|
+
hf download docling-project/docling-layout-egret-xlarge \
|
|
98
|
+
--revision REV \
|
|
99
|
+
--local-dir "$DOCLING_MLX_EGRET_XLARGE_SOURCE"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Produce the detector parity inputs from the same pinned DPBench revision used by
|
|
103
|
+
`tools/compare_dpbench.py`. The target directory must end in `pdfs` and must not already exist:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
export DOCLING_MLX_OBJECT_DETECTION_PARITY_INPUTS=/path/to/dpbench-workspace/pdfs
|
|
107
|
+
uv run --no-sync --with 'docling-eval==1.4.2' python - <<'PY'
|
|
108
|
+
import os
|
|
109
|
+
from pathlib import Path
|
|
110
|
+
|
|
111
|
+
from tools.compare_dpbench import _prepare_benchmark, _snapshot_path
|
|
112
|
+
|
|
113
|
+
inputs = Path(os.environ["DOCLING_MLX_OBJECT_DETECTION_PARITY_INPUTS"])
|
|
114
|
+
_prepare_benchmark(_snapshot_path(), inputs.parent, 3)
|
|
115
|
+
PY
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
CI runs the portable checks on Ubuntu: frozen dev sync, mypy, default pytest, wheel build, and an
|
|
119
|
+
installed-wheel import smoke, plus a separate uvx-based lint job. It does not qualify MLX, parity,
|
|
120
|
+
or release artifacts.
|
|
121
|
+
|
|
122
|
+
## Stage artifacts
|
|
123
|
+
|
|
124
|
+
Converters consume cached upstream snapshots and never upload or overwrite a
|
|
125
|
+
published model. Their `--output` argument is the complete checkpoint directory. The examples use
|
|
126
|
+
Docling's revision-qualified cache-root layout: `<artifacts_path>/<repo-id with '/' replaced by
|
|
127
|
+
'--'>/<revision>/`. Use the source repository and immutable revision that the resulting model card
|
|
128
|
+
records.
|
|
129
|
+
|
|
130
|
+
The generic converter shape is:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
uv run --no-sync --group reference python -m tools.document_figure.convert_weights \
|
|
134
|
+
--source /path/to/snapshot --repo-id org/model --revision REV \
|
|
135
|
+
--output .artifacts/org--model/REV
|
|
136
|
+
uv run --no-sync --group reference python -m tools.layout_heron.convert_weights \
|
|
137
|
+
--source /path/to/snapshot --repo-id org/model --revision REV \
|
|
138
|
+
--output .artifacts/org--model/REV
|
|
139
|
+
uv run --no-sync --group reference python -m tools.layout_egret.convert_weights \
|
|
140
|
+
--source /path/to/snapshot --repo-id org/model --revision REV \
|
|
141
|
+
--output .artifacts/org--model/REV
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
TableFormer converters use the frozen source loaders (or `--source` explicitly):
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
uv run --no-sync --group reference --extra standard --extra tableformer-v1 \
|
|
148
|
+
python -m tools.tableformer_v1.convert_weights \
|
|
149
|
+
--source "$DOCLING_MLX_TABLEFORMER_V1_SOURCE" \
|
|
150
|
+
--output .artifacts/org--model/REV
|
|
151
|
+
uv run --no-sync --group reference python -m tools.tableformer_v2.convert_weights \
|
|
152
|
+
--source "$DOCLING_MLX_TABLEFORMER_V2_SOURCE" \
|
|
153
|
+
--output .artifacts/org--model/REV
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The release environment normally sets these artifact overrides when paths differ from the
|
|
157
|
+
defaults:
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
DOCLING_MLX_SOURCE
|
|
161
|
+
DOCLING_MLX_ARTIFACTS
|
|
162
|
+
HF_HOME
|
|
163
|
+
DOCLING_MLX_HERON_R50_ARTIFACT
|
|
164
|
+
DOCLING_MLX_HERON_R101_ARTIFACT
|
|
165
|
+
DOCLING_MLX_EGRET_MEDIUM_ARTIFACT
|
|
166
|
+
DOCLING_MLX_EGRET_LARGE_ARTIFACT
|
|
167
|
+
DOCLING_MLX_EGRET_XLARGE_ARTIFACT
|
|
168
|
+
DOCLING_MLX_TABLEFORMER_V1_ARTIFACT
|
|
169
|
+
DOCLING_MLX_TABLEFORMER_V1_REFERENCE
|
|
170
|
+
DOCLING_MLX_TABLEFORMER_V1_FAST_REFERENCE
|
|
171
|
+
DOCLING_MLX_TABLEFORMER_V1_FAST_PDF_ORACLE
|
|
172
|
+
DOCLING_MLX_TABLEFORMER_V2_ARTIFACT
|
|
173
|
+
DOCLING_MLX_GRANITE_VISION_ARTIFACTS_ROOT
|
|
174
|
+
HF_HUB_OFFLINE
|
|
175
|
+
TRANSFORMERS_OFFLINE
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
When `artifacts_path` is a cache root, the resolver checks
|
|
179
|
+
`<artifacts_path>/<repo-id-with-slashes-replaced-by-->/<revision>` first, then the legacy flat
|
|
180
|
+
`<artifacts_path>/<repo-id-with-slashes-replaced-by-->` directory. The `DOCLING_MLX_*_ARTIFACT`
|
|
181
|
+
variables above instead point directly to complete checkpoint directories and may use arbitrary
|
|
182
|
+
paths; the `DOCLING_MLX_*_SOURCE` variables point to source snapshots for conversion. The
|
|
183
|
+
`DOCLING_MLX_GRANITE_VISION_ARTIFACTS_ROOT` variable is a resolver root, not a direct checkpoint
|
|
184
|
+
path.
|
|
185
|
+
|
|
186
|
+
Granite Vision is an unchanged official artifact, not a converted project model:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
hf download ibm-granite/granite-vision-4.1-4b \
|
|
190
|
+
--revision dd48e97503de471803850df70843cf9eb5da8712 \
|
|
191
|
+
--local-dir .artifacts/granite-vlm/ibm-granite--granite-vision-4.1-4b
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Use `HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1` with
|
|
195
|
+
`DOCLING_MLX_GRANITE_VISION_ARTIFACTS_ROOT=.artifacts/granite-vlm` for the offline Granite release
|
|
196
|
+
test. Official parity captures use the corresponding pinned source snapshot and `hf download`;
|
|
197
|
+
never substitute an unpinned branch for a release record.
|
|
198
|
+
|
|
199
|
+
## Qualification and tools
|
|
200
|
+
|
|
201
|
+
After staging artifacts, run the lanes above and inspect `-rs`; zero skips is the policy. The
|
|
202
|
+
unified benchmark is one fresh process per component and boundary:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
uv run --no-sync python -m tools.benchmark --component document-figure \
|
|
206
|
+
--artifact "$DOCLING_MLX_ARTIFACTS" \
|
|
207
|
+
--images tests/fixtures/document_figure/reference_images/bar_chart.png \
|
|
208
|
+
--target engine --warmup 5 --rounds 30 --output reports/document-figure-engine.json
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
`tools/compare_dpbench.py` compares the official and MLX application pipelines.
|
|
212
|
+
|
|
213
|
+
`tools/compare_backends.py` reproduces the full DPBench backend comparison with one fresh process
|
|
214
|
+
per component and implementation. It materializes the pinned page, picture, and table inputs,
|
|
215
|
+
resumes completed raw JSON reports under `reports/backend-bench/`, and writes the paired quality
|
|
216
|
+
and latency tables used by the component validation documents. Its `pipeline` component measures the
|
|
217
|
+
reduced standard pipeline over all 200 pages with three timed rounds, and `pipeline_granite`
|
|
218
|
+
measures the full pipeline with the Granite Vision table structure and chart extraction stages over
|
|
219
|
+
the first 50 pages with one timed round, because Docling's official Granite stages are CPU-only on
|
|
220
|
+
macOS:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
uv run --no-sync python -m tools.compare_backends all
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
The release concurrency tool is the authoritative fresh-process check and requires the Figure,
|
|
227
|
+
TableFormerV2, and TableFormerV1 artifacts:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
uv run --no-sync python -m tools.release.qualify_concurrency \
|
|
231
|
+
--figure-artifact "$DOCLING_MLX_ARTIFACTS" \
|
|
232
|
+
--tableformer-artifact "$DOCLING_MLX_TABLEFORMER_V2_ARTIFACT" \
|
|
233
|
+
--tableformer-v1-artifact "$DOCLING_MLX_TABLEFORMER_V1_ARTIFACT"
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Component-specific preprocessing, parser, and acceptance details belong in
|
|
237
|
+
`docs/<component>/README.md` and `validation.md`.
|
|
238
|
+
|
|
239
|
+
## Releases
|
|
240
|
+
|
|
241
|
+
`release.yaml` runs release-please on every push to `main`. It keeps a release pull request open that
|
|
242
|
+
bumps `version` in `pyproject.toml` and the matching entry in `uv.lock`, and rewrites `CHANGELOG.md`
|
|
243
|
+
from the conventional commits since the last release (`feat`, `fix`, `perf`, and `revert` are
|
|
244
|
+
listed; other types are hidden). Merging that pull request creates the `v*` tag and the GitHub
|
|
245
|
+
release, then publishes the tag to PyPI through `publish.yaml`, which is a reusable workflow with
|
|
246
|
+
trusted publishing under the `pypi` environment. Below 1.0, breaking changes and features both bump
|
|
247
|
+
the minor version and fixes bump the patch version. The first release is pinned by a `Release-As:
|
|
248
|
+
0.1.0` footer in the initial history.
|
|
249
|
+
|
|
250
|
+
To rehearse publishing, run `publish.yaml` manually from the Actions tab with `testpypi` selected;
|
|
251
|
+
that uses the `testpypi` environment and TestPyPI's own trusted publisher, and skips files that
|
|
252
|
+
TestPyPI already holds. Both environments must exist in the repository settings, and GitHub Actions
|
|
253
|
+
must be allowed to create pull requests for release-please to open the release pull request.
|
|
254
|
+
|
|
255
|
+
## Adding a model
|
|
256
|
+
|
|
257
|
+
Read [`docs/architecture.md`](docs/architecture.md) first. A native family needs exactly three
|
|
258
|
+
layers: a Docling-independent engine with a plain-checkpoint test, a `ModelPreset` entry, and a
|
|
259
|
+
Docling stage adaptor. Keep model-independent inference data in the engine and Docling labels,
|
|
260
|
+
page state, batching, enablement, accelerator checks, and parse-error policy in the adaptor. Add a
|
|
261
|
+
plugin entry point only where Docling exposes the corresponding factory; otherwise keep the stage
|
|
262
|
+
directly constructible.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
+
|
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
14
|
+
|
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
+
|
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
+
|
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
+
|
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
22
|
+
|
|
23
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
+
|
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
26
|
+
|
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
+
|
|
29
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
30
|
+
|
|
31
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
32
|
+
|
|
33
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
34
|
+
|
|
35
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
36
|
+
|
|
37
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
38
|
+
|
|
39
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
40
|
+
|
|
41
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
42
|
+
|
|
43
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|
|
56
|
+
|
|
57
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
58
|
+
|
|
59
|
+
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
|
60
|
+
|
|
61
|
+
Copyright [yyyy] [name of copyright owner]
|
|
62
|
+
|
|
63
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
64
|
+
you may not use this file except in compliance with the License.
|
|
65
|
+
You may obtain a copy of the License at
|
|
66
|
+
|
|
67
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
68
|
+
|
|
69
|
+
Unless required by applicable law or agreed to in writing, software
|
|
70
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
71
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
72
|
+
See the License for the specific language governing permissions and
|
|
73
|
+
limitations under the License.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
U.S. Geological Survey public-domain attribution
|
|
2
|
+
|
|
3
|
+
U.S. Geological Survey-authored publications are in the public domain in the
|
|
4
|
+
United States. Credit is retained in accordance with the USGS copyright and
|
|
5
|
+
credit guidance:
|
|
6
|
+
https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits
|
|
7
|
+
|
|
8
|
+
Source report:
|
|
9
|
+
https://pubs.usgs.gov/of/1958/0087/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) <year> <copyright holders>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
6
|
+
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
12
|
+
portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
15
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
16
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
18
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|