nds-mapviewer 2026.3.1.dev102__tar.gz → 2026.3.1.dev104__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.
- {nds_mapviewer-2026.3.1.dev102/src/nds_mapviewer.egg-info → nds_mapviewer-2026.3.1.dev104}/PKG-INFO +1 -1
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104/src/nds_mapviewer.egg-info}/PKG-INFO +1 -1
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/config.py +9 -2
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/tests/test_config.py +41 -1
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/.gitignore +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/CHANGELOG.md +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/README.md +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/pyproject.toml +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/setup.cfg +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/setup.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/nds_mapviewer.egg-info/SOURCES.txt +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/nds_mapviewer.egg-info/dependency_links.txt +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/nds_mapviewer.egg-info/entry_points.txt +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/nds_mapviewer.egg-info/requires.txt +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/nds_mapviewer.egg-info/top_level.txt +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/__init__.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/browser.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/cli.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/clipboard.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/container_runtime.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/docker_client.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/exceptions.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/tui.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/ui.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/viewer.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/tests/conftest.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/tests/test_cli.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/tests/test_clipboard.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/tests/test_docker_client.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/tests/test_tui.py +0 -0
- {nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/tests/test_viewer.py +0 -0
{nds_mapviewer-2026.3.1.dev102/src/nds_mapviewer.egg-info → nds_mapviewer-2026.3.1.dev104}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nds-mapviewer
|
|
3
|
-
Version: 2026.3.1.
|
|
3
|
+
Version: 2026.3.1.dev104
|
|
4
4
|
Summary: CLI to run the NDS MapViewer Docker container for visualizing map data (NDS.Live, GeoJSON, and more)
|
|
5
5
|
Author-email: NDS Association <support@nds-association.org>
|
|
6
6
|
License: Proprietary
|
{nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104/src/nds_mapviewer.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nds-mapviewer
|
|
3
|
-
Version: 2026.3.1.
|
|
3
|
+
Version: 2026.3.1.dev104
|
|
4
4
|
Summary: CLI to run the NDS MapViewer Docker container for visualizing map data (NDS.Live, GeoJSON, and more)
|
|
5
5
|
Author-email: NDS Association <support@nds-association.org>
|
|
6
6
|
License: Proprietary
|
{nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/config.py
RENAMED
|
@@ -6,7 +6,7 @@ import os
|
|
|
6
6
|
import re
|
|
7
7
|
import tempfile
|
|
8
8
|
from dataclasses import dataclass, field
|
|
9
|
-
from pathlib import Path
|
|
9
|
+
from pathlib import Path, PurePath
|
|
10
10
|
from typing import Any
|
|
11
11
|
from urllib.parse import urlparse
|
|
12
12
|
|
|
@@ -184,6 +184,13 @@ def _to_url_path(path: str) -> str:
|
|
|
184
184
|
return path.replace(os.sep, "/")
|
|
185
185
|
|
|
186
186
|
|
|
187
|
+
def _join_container_path(container_base: str, relative: PurePath) -> str:
|
|
188
|
+
"""Join a container mount path and relative host path with POSIX separators."""
|
|
189
|
+
if str(relative) == ".":
|
|
190
|
+
return container_base
|
|
191
|
+
return f"{container_base.rstrip('/')}/{relative.as_posix().lstrip('/')}"
|
|
192
|
+
|
|
193
|
+
|
|
187
194
|
def _split_background_template(
|
|
188
195
|
template: str,
|
|
189
196
|
base_dir: str | Path | None,
|
|
@@ -386,7 +393,7 @@ def transform_config(
|
|
|
386
393
|
# Calculate relative path from mount parent to the actual path
|
|
387
394
|
try:
|
|
388
395
|
relative = local_path.relative_to(mount_parent)
|
|
389
|
-
container_full_path =
|
|
396
|
+
container_full_path = _join_container_path(container_base, relative)
|
|
390
397
|
except ValueError:
|
|
391
398
|
# Path is not relative to mount parent (shouldn't happen)
|
|
392
399
|
container_full_path = f"{container_base}/{local_path.name}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Tests for config loading and transformation (no Docker required)."""
|
|
2
2
|
|
|
3
|
-
from pathlib import Path
|
|
3
|
+
from pathlib import Path, PureWindowsPath
|
|
4
4
|
|
|
5
5
|
import pytest
|
|
6
6
|
import yaml
|
|
@@ -9,6 +9,7 @@ from ndslive.mapviewer.config import (
|
|
|
9
9
|
CONFIGS_DIR,
|
|
10
10
|
_extract_local_path,
|
|
11
11
|
_is_localhost,
|
|
12
|
+
_join_container_path,
|
|
12
13
|
_transform_localhost,
|
|
13
14
|
_transform_localhost_url,
|
|
14
15
|
create_classic_config,
|
|
@@ -294,6 +295,45 @@ class TestTransformConfig:
|
|
|
294
295
|
assert len(result.volumes) == 1
|
|
295
296
|
assert "filestore:/data/" in result.config["sources"][0]["uri"]
|
|
296
297
|
|
|
298
|
+
def test_nested_filestore_paths_use_container_separators(self, temp_dir):
|
|
299
|
+
"""Nested filestores share a mount and keep POSIX container URIs."""
|
|
300
|
+
root_map = temp_dir / "map" / "map.ndslive"
|
|
301
|
+
nested_map = temp_dir / "map" / "and" / "othermap.ndslive"
|
|
302
|
+
nested_map.parent.mkdir(parents=True)
|
|
303
|
+
root_map.touch()
|
|
304
|
+
nested_map.touch()
|
|
305
|
+
|
|
306
|
+
config = {
|
|
307
|
+
"sources": [
|
|
308
|
+
{
|
|
309
|
+
"type": "SmartLayerTileService",
|
|
310
|
+
"uri": f"filestore:{root_map}",
|
|
311
|
+
"mapId": "Root",
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"type": "SmartLayerTileService",
|
|
315
|
+
"uri": f"filestore:{nested_map}",
|
|
316
|
+
"mapId": "Nested",
|
|
317
|
+
},
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
result = transform_config(config)
|
|
322
|
+
|
|
323
|
+
assert len(result.volumes) == 1
|
|
324
|
+
assert _same_path(result.volumes[0].host_path, root_map.parent)
|
|
325
|
+
assert result.config["sources"][0]["uri"] == "filestore:/data/0/map.ndslive"
|
|
326
|
+
assert result.config["sources"][1]["uri"] == (
|
|
327
|
+
"filestore:/data/0/and/othermap.ndslive"
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
def test_windows_relative_paths_are_rendered_as_container_paths(self):
|
|
331
|
+
"""Windows path separators must not leak into Linux container URIs."""
|
|
332
|
+
assert _join_container_path(
|
|
333
|
+
"/data/0",
|
|
334
|
+
PureWindowsPath(r"and\othermap.ndslive"),
|
|
335
|
+
) == "/data/0/and/othermap.ndslive"
|
|
336
|
+
|
|
297
337
|
def test_localhost_host_transformed(self):
|
|
298
338
|
"""localhost host is transformed to host.docker.internal."""
|
|
299
339
|
config = {
|
|
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
|
{nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/__init__.py
RENAMED
|
File without changes
|
{nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/browser.py
RENAMED
|
File without changes
|
{nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/cli.py
RENAMED
|
File without changes
|
{nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/clipboard.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/exceptions.py
RENAMED
|
File without changes
|
{nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/tui.py
RENAMED
|
File without changes
|
|
File without changes
|
{nds_mapviewer-2026.3.1.dev102 → nds_mapviewer-2026.3.1.dev104}/src/ndslive/mapviewer/viewer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|