Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,12 @@
// Test --build_index for 2026 to test a fixed layout
//"args": ["-v", "1", "--build_index", "--start", "20260101", "--end", "20261231", "--force"]
// Test fixing the "folded" bathymetry
"args": ["-v", "1", "--dlist", "ahi/missionlogs/2026/20260218_20260220.dlist", "--force", "--update_ssds_provenance", "--notify", "mccann@mbari.org"]
//"args": ["-v", "1", "--dlist", "ahi/missionlogs/2026/20260218_20260220.dlist", "--force", "--update_ssds_provenance", "--notify", "mccann@mbari.org"]
// Repair a badly plotted deployment with fixed bathymetry plotting - Pontus 54 Docking
//"args": ["-v", "1", "--dlist", "pontus/missionlogs/2025/20250604_20250616.dlist"]
// Test caching and setting User-Agent for OSM tile server
"args": ["-v", "1", "--dlist", "pontus/missionlogs/2026/20260810_20260812.dlist"]

},

]
Expand Down
12 changes: 12 additions & 0 deletions src/data/create_products.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@
MISSIONODVS = "missionodvs"
MISSIONIMAGES = "missionimages"

# Persist contextily's basemap tile cache across process invocations (it defaults to a
# per-session temp dir that's deleted on exit) so repeated/batch runs re-fetch far fewer
# tiles from OpenStreetMap, reducing exposure to its rate limiting (403s).
CONTEXTILY_CACHE_DIR = Path(BASE_PATH).parent / "contextily_cache"
CONTEXTILY_CACHE_DIR.mkdir(parents=True, exist_ok=True)
ctx.set_cache_dir(str(CONTEXTILY_CACHE_DIR))

# Identify ourselves to OpenStreetMap's tile servers per their usage policy
# (https://operations.osmfoundation.org/policies/tiles/), instead of contextily's
# default generic/anonymous User-Agent.
ctx.tile.USER_AGENT = "auv-python (https://github.com/mbari-org/auv-python; auv-python@mbari.org)"


class CreateProducts:
logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/data/test_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from archive import Archiver


@pytest.fixture()
@pytest.fixture() # noqa: PT001
def arch():
return Archiver(add_handlers=False, clobber=False)

Expand Down
Loading