This is a comprehensive audit of the repo on fix/initial-setup (post-hasteutils → hastelib directory rename and haste/hasteutils → hastegeo package rename). All Python module imports under api/, hastelib/src/hastegeo/, and docker/training/code/ are clean — but a number of stale references in code, scripts, and docs still need to be cleaned up. One of them is a runtime crash and another is a silent production-deploy break.
Filing as a single issue because the items are tightly related (all fallout from the same refactor). Happy to split into per-PR sub-issues if preferred.
Critical — runtime crash
1. hastelib/src/hastegeo/core/processors/artifacts.py:231 — hardcoded stale module path
command = '"python -m haste.workflows.zip_artifacts"'
ArtifactProcessor.submit_zip_job() builds the Azure Batch task command literally referencing the old package name. With the rename to hastegeo, every artifact-zip job will fail with ModuleNotFoundError: No module named 'haste' — both on Azure Batch and through the local Docker runner (runner_type=local).
For comparison, imagery.py:319 correctly uses the prepare-imagery CLI shim, which the Dockerfile maps to python -m hastegeo.workflows.prepare_imagery (fixed in commit ffdfb30).
Fix: Either change to python -m hastegeo.workflows.zip_artifacts or, for symmetry with imagery.py, switch to the zip-artifacts CLI shim (already provisioned in docker/imageryprep/Dockerfile).
High — production deploy silently broken
2. AZURE_BATCH_REGISTRY_SERVER_URL vs AZURE_BATCH_REGISTRY_SERVER env-var mismatch
The setup/deploy scripts and the local-settings example all set:
setup/deploy_apps.sh:146 — AZURE_BATCH_REGISTRY_SERVER_URL=https://${ACR_NAME}.azurecr.io
setup/setup_infra.sh:582 — same
.github/scripts/deploy_apps.sh:110 — same
local.settings.example.jsonc:41 — same
But the Config layer reads a different name:
hastelib/src/hastegeo/core/config.py:411 — os.getenv(\"AZURE_BATCH_REGISTRY_SERVER\", \"<registry-name>.azurecr.io\")
…and the value flows straight through to Azure Batch:
hastelib/src/hastegeo/core/runners/azure_batch.py:139 — self.batch_config[\"registry_server\"]
So in every production deployment, the registry server falls back to the placeholder \"<registry-name>.azurecr.io\" and Azure Batch will fail to authenticate to ACR for any training/imagery-prep job.
Fix: Pick one name everywhere. Cleanest is to rename the env var in all four deploy locations to AZURE_BATCH_REGISTRY_SERVER (and also drop the https:// prefix — the Azure Batch SDK's ContainerRegistry.registry_server expects a bare hostname).
High — broken docs / contributor guide
3. README.md references nonexistent path hastelib/src/haste_geo
Lines 224, 272, 300, 312, 325 all use hastelib/src/haste_geo (with underscore). The directory does not exist — the actual path is hastelib/src/hastegeo (no underscore). The hot-reload docker run -v examples will silently mount an empty directory, defeating the purpose. Lines 272/300/325 also mount to /usr/local/lib/python3.11/site-packages/haste, which doesn't match the current Dockerfiles (they copy the source to /app/hastegeo and use PYTHONPATH=/app).
Fix: Replace hastelib/src/haste_geo with hastelib/src/hastegeo everywhere; update the mount target to /app/hastegeo (or remove that block if it no longer represents a supported workflow).
4. docs/hastelib/*.md Sphinx automodule directives use old haste. package
Every page under docs/hastelib/ uses .. automodule:: haste.core.X and haste.workflows.X:
docs/hastelib/processors.md, models.md, config.md, utils.md, data-layer.md, artifact-storage.md, runners.md, workflows.md, modules.md
The Jupyter Book build (run by .github/workflows/docs-deploy.yml) imports the renamed hastegeo package, so every automodule directive will produce empty / failed pages.
Fix: Bulk rename haste. → hastegeo. across docs/hastelib/*.md. Also fix docs/hastelib/modules.md title and tree (haste_geo → hastegeo) and docs/architecture.md:79-90 ("haste (hasteutils)", "haste v0.0.67", -e hasteutils/).
5. docs/requirements.txt:8 and :43 — stale wheel name in install instructions
Comments tell the user to install:
pip install --no-deps hastegeo @ https://researchlabwuopendata.blob.core.windows.net/haste-binaries/haste-0.0.67-py3-none-any.whl
That wheel filename hasn't existed since the rename — the current wheel is hastegeo-1.0.0-py3-none-any.whl (matching the references in api/*/requirements.txt).
Fix: Update the wheel URL to hastegeo-1.0.0-py3-none-any.whl.
Medium — misleading docs
6. docs/getting-started.md:31
Says "installs the haste core library in editable mode (-e hasteutils/)" — both names are wrong. Should be \"installs the hastegeo core library in editable mode (-e hastelib/)\".
7. docs/README.md:38
Lists hasteutils/ - Core library documentation — directory is now hastelib/.
8. THIRD-PARTY-NOTICES.md:15
References hasteutils/pyproject.toml. Path is now hastelib/pyproject.toml.
9. docker/api/Dockerfile and docker/ui/Dockerfile — dead files
Already filed separately in #20 — listed here for completeness.
Low — cosmetic
10. README.md:184
VSCode tip mentions haste.core modules — should be hastegeo.core.
11. .github/copilot-instructions.md:202-203
Documents the legacy hot-reload mount path /usr/local/lib/python3.11/site-packages/haste. Current Dockerfiles use /app/hastegeo.
12. docs/azure_functions_simple.py:119 and :160
Stale comments saying "(like hasteutils functions)" / "(like hasteutils style)". Cosmetic only.
13. ui/src/Components/LabelingTool/LabelingToolHelper.js:154
await apiPut(\"PutLabelsFromLabelTool?imageLayerId\", labelingToolDataRef.current);
Sends ?imageLayerId with no value. The server reads imageLayerId from the JSON body (function_app.py:1074), so the query parameter is unused — harmless but misleading.
Fix: Drop the ?imageLayerId fragment from the URL.
Out of scope / intentionally left
- The
\"hastetraining\", \"hasteimageryprep\", \"hastefuncapi\", \"hastequeue\", \"hastestorageapi\" Azure resource names in setup/*.sh, setup/README.md, and .github/workflows/README.md are intentional infra naming conventions that were not part of the package rename.
- The
HASTE = \"haste\" enum value in hastelib/src/hastegeo/core/models/training.py:10 is a model-source identifier, not a package reference.
CHANGELOG.md:35 mentions hasteutils as a historical entry, which is appropriate for a changelog.
This is a comprehensive audit of the repo on
fix/initial-setup(post-hasteutils→hastelibdirectory rename andhaste/hasteutils→hastegeopackage rename). All Python module imports underapi/,hastelib/src/hastegeo/, anddocker/training/code/are clean — but a number of stale references in code, scripts, and docs still need to be cleaned up. One of them is a runtime crash and another is a silent production-deploy break.Filing as a single issue because the items are tightly related (all fallout from the same refactor). Happy to split into per-PR sub-issues if preferred.
Critical — runtime crash
1.
hastelib/src/hastegeo/core/processors/artifacts.py:231— hardcoded stale module pathArtifactProcessor.submit_zip_job()builds the Azure Batch task command literally referencing the old package name. With the rename tohastegeo, every artifact-zip job will fail withModuleNotFoundError: No module named 'haste'— both on Azure Batch and through the local Docker runner (runner_type=local).For comparison,
imagery.py:319correctly uses theprepare-imageryCLI shim, which the Dockerfile maps topython -m hastegeo.workflows.prepare_imagery(fixed in commitffdfb30).Fix: Either change to
python -m hastegeo.workflows.zip_artifactsor, for symmetry withimagery.py, switch to thezip-artifactsCLI shim (already provisioned indocker/imageryprep/Dockerfile).High — production deploy silently broken
2.
AZURE_BATCH_REGISTRY_SERVER_URLvsAZURE_BATCH_REGISTRY_SERVERenv-var mismatchThe setup/deploy scripts and the local-settings example all set:
setup/deploy_apps.sh:146—AZURE_BATCH_REGISTRY_SERVER_URL=https://${ACR_NAME}.azurecr.iosetup/setup_infra.sh:582— same.github/scripts/deploy_apps.sh:110— samelocal.settings.example.jsonc:41— sameBut the Config layer reads a different name:
hastelib/src/hastegeo/core/config.py:411—os.getenv(\"AZURE_BATCH_REGISTRY_SERVER\", \"<registry-name>.azurecr.io\")…and the value flows straight through to Azure Batch:
hastelib/src/hastegeo/core/runners/azure_batch.py:139—self.batch_config[\"registry_server\"]So in every production deployment, the registry server falls back to the placeholder
\"<registry-name>.azurecr.io\"and Azure Batch will fail to authenticate to ACR for any training/imagery-prep job.Fix: Pick one name everywhere. Cleanest is to rename the env var in all four deploy locations to
AZURE_BATCH_REGISTRY_SERVER(and also drop thehttps://prefix — the Azure Batch SDK'sContainerRegistry.registry_serverexpects a bare hostname).High — broken docs / contributor guide
3.
README.mdreferences nonexistent pathhastelib/src/haste_geoLines 224, 272, 300, 312, 325 all use
hastelib/src/haste_geo(with underscore). The directory does not exist — the actual path ishastelib/src/hastegeo(no underscore). The hot-reloaddocker run -vexamples will silently mount an empty directory, defeating the purpose. Lines 272/300/325 also mount to/usr/local/lib/python3.11/site-packages/haste, which doesn't match the current Dockerfiles (they copy the source to/app/hastegeoand usePYTHONPATH=/app).Fix: Replace
hastelib/src/haste_geowithhastelib/src/hastegeoeverywhere; update the mount target to/app/hastegeo(or remove that block if it no longer represents a supported workflow).4.
docs/hastelib/*.mdSphinx automodule directives use oldhaste.packageEvery page under
docs/hastelib/uses.. automodule:: haste.core.Xandhaste.workflows.X:docs/hastelib/processors.md,models.md,config.md,utils.md,data-layer.md,artifact-storage.md,runners.md,workflows.md,modules.mdThe Jupyter Book build (run by
.github/workflows/docs-deploy.yml) imports the renamedhastegeopackage, so everyautomoduledirective will produce empty / failed pages.Fix: Bulk rename
haste.→hastegeo.acrossdocs/hastelib/*.md. Also fixdocs/hastelib/modules.mdtitle and tree (haste_geo→hastegeo) anddocs/architecture.md:79-90("haste (hasteutils)", "haste v0.0.67",-e hasteutils/).5.
docs/requirements.txt:8and:43— stale wheel name in install instructionsComments tell the user to install:
That wheel filename hasn't existed since the rename — the current wheel is
hastegeo-1.0.0-py3-none-any.whl(matching the references inapi/*/requirements.txt).Fix: Update the wheel URL to
hastegeo-1.0.0-py3-none-any.whl.Medium — misleading docs
6.
docs/getting-started.md:31Says "installs the
hastecore library in editable mode (-e hasteutils/)" — both names are wrong. Should be\"installs the hastegeo core library in editable mode (-e hastelib/)\".7.
docs/README.md:38Lists
hasteutils/ - Core library documentation— directory is nowhastelib/.8.
THIRD-PARTY-NOTICES.md:15References
hasteutils/pyproject.toml. Path is nowhastelib/pyproject.toml.9.
docker/api/Dockerfileanddocker/ui/Dockerfile— dead filesAlready filed separately in #20 — listed here for completeness.
Low — cosmetic
10.
README.md:184VSCode tip mentions
haste.coremodules — should behastegeo.core.11.
.github/copilot-instructions.md:202-203Documents the legacy hot-reload mount path
/usr/local/lib/python3.11/site-packages/haste. Current Dockerfiles use/app/hastegeo.12.
docs/azure_functions_simple.py:119and:160Stale comments saying "(like hasteutils functions)" / "(like hasteutils style)". Cosmetic only.
13.
ui/src/Components/LabelingTool/LabelingToolHelper.js:154Sends
?imageLayerIdwith no value. The server readsimageLayerIdfrom the JSON body (function_app.py:1074), so the query parameter is unused — harmless but misleading.Fix: Drop the
?imageLayerIdfragment from the URL.Out of scope / intentionally left
\"hastetraining\",\"hasteimageryprep\",\"hastefuncapi\",\"hastequeue\",\"hastestorageapi\"Azure resource names insetup/*.sh,setup/README.md, and.github/workflows/README.mdare intentional infra naming conventions that were not part of the package rename.HASTE = \"haste\"enum value inhastelib/src/hastegeo/core/models/training.py:10is a model-source identifier, not a package reference.CHANGELOG.md:35mentionshasteutilsas a historical entry, which is appropriate for a changelog.