nds-mapviewer 2026.3.1.dev110__tar.gz → 2026.3.2.dev113__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.dev110/src/nds_mapviewer.egg-info → nds_mapviewer-2026.3.2.dev113}/PKG-INFO +1 -1
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113/src/nds_mapviewer.egg-info}/PKG-INFO +1 -1
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/config.py +40 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/tests/test_config.py +70 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/.gitignore +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/CHANGELOG.md +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/README.md +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/pyproject.toml +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/setup.cfg +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/setup.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/nds_mapviewer.egg-info/SOURCES.txt +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/nds_mapviewer.egg-info/dependency_links.txt +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/nds_mapviewer.egg-info/entry_points.txt +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/nds_mapviewer.egg-info/requires.txt +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/nds_mapviewer.egg-info/top_level.txt +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/__init__.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/browser.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/cli.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/clipboard.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/container_runtime.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/docker_client.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/exceptions.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/tui.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/ui.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/viewer.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/tests/conftest.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/tests/test_cli.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/tests/test_clipboard.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/tests/test_docker_client.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/tests/test_tui.py +0 -0
- {nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/tests/test_viewer.py +0 -0
{nds_mapviewer-2026.3.1.dev110/src/nds_mapviewer.egg-info → nds_mapviewer-2026.3.2.dev113}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nds-mapviewer
|
|
3
|
-
Version: 2026.3.
|
|
3
|
+
Version: 2026.3.2.dev113
|
|
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.dev110 → nds_mapviewer-2026.3.2.dev113/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.
|
|
3
|
+
Version: 2026.3.2.dev113
|
|
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.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/config.py
RENAMED
|
@@ -27,6 +27,7 @@ FOLDER_URI_PATTERN = re.compile(r"^folder:(.+)$")
|
|
|
27
27
|
LOCALHOST_PATTERN = re.compile(r"^(localhost|127\.0\.0\.1)(:\d+)?$")
|
|
28
28
|
CUSTOM_STYLES_ROOT = "/custom-styles"
|
|
29
29
|
CUSTOM_BACKGROUNDS_ROOT = "/custom-backgrounds"
|
|
30
|
+
COORDINATE_LEGAL_TERMS_ROOT = "/coordinates-legal-terms"
|
|
30
31
|
|
|
31
32
|
# Default config for demo mode
|
|
32
33
|
DEFAULT_DEMO_CONFIG = {
|
|
@@ -478,6 +479,18 @@ def transform_config(
|
|
|
478
479
|
return container_dir
|
|
479
480
|
return f"{container_dir}/{suffix}"
|
|
480
481
|
|
|
482
|
+
def transform_coordinate_legal_terms(value: str) -> str:
|
|
483
|
+
"""Mount one local legal-terms document below its public static root."""
|
|
484
|
+
value = value.strip()
|
|
485
|
+
if not value or _is_explicit_browser_path(value, COORDINATE_LEGAL_TERMS_ROOT):
|
|
486
|
+
return value
|
|
487
|
+
host_file = _resolve_host_asset_path(value, base_dir)
|
|
488
|
+
return add_asset_volume(
|
|
489
|
+
host_file,
|
|
490
|
+
COORDINATE_LEGAL_TERMS_ROOT,
|
|
491
|
+
f"{COORDINATE_LEGAL_TERMS_ROOT}/{host_file.name}",
|
|
492
|
+
)
|
|
493
|
+
|
|
481
494
|
erdblick = transformed.get("erdblick")
|
|
482
495
|
if isinstance(erdblick, dict):
|
|
483
496
|
additional_styles = erdblick.get("additionalStyles")
|
|
@@ -503,6 +516,12 @@ def transform_config(
|
|
|
503
516
|
for item in url_template
|
|
504
517
|
]
|
|
505
518
|
|
|
519
|
+
coordinate_legal_terms = erdblick.get("coordinates-legal-terms")
|
|
520
|
+
if isinstance(coordinate_legal_terms, str):
|
|
521
|
+
erdblick["coordinates-legal-terms"] = transform_coordinate_legal_terms(
|
|
522
|
+
coordinate_legal_terms
|
|
523
|
+
)
|
|
524
|
+
|
|
506
525
|
return TransformedConfig(config=transformed, volumes=volumes + asset_volumes)
|
|
507
526
|
|
|
508
527
|
|
|
@@ -625,6 +644,27 @@ def validate_paths(
|
|
|
625
644
|
f"Directory does not exist: {host_root}"
|
|
626
645
|
)
|
|
627
646
|
|
|
647
|
+
coordinate_legal_terms = erdblick.get("coordinates-legal-terms")
|
|
648
|
+
if isinstance(coordinate_legal_terms, str):
|
|
649
|
+
coordinate_legal_terms = coordinate_legal_terms.strip()
|
|
650
|
+
if (
|
|
651
|
+
coordinate_legal_terms
|
|
652
|
+
and not _is_explicit_browser_path(
|
|
653
|
+
coordinate_legal_terms, COORDINATE_LEGAL_TERMS_ROOT
|
|
654
|
+
)
|
|
655
|
+
):
|
|
656
|
+
host_file = _resolve_host_asset_path(coordinate_legal_terms, base_dir)
|
|
657
|
+
if host_file.suffix.lower() not in (".json", ".yaml", ".yml"):
|
|
658
|
+
errors.append(
|
|
659
|
+
"erdblick.coordinates-legal-terms: "
|
|
660
|
+
"File must use .json, .yaml, or .yml"
|
|
661
|
+
)
|
|
662
|
+
elif not host_file.is_file():
|
|
663
|
+
errors.append(
|
|
664
|
+
"erdblick.coordinates-legal-terms: "
|
|
665
|
+
f"File does not exist: {host_file}"
|
|
666
|
+
)
|
|
667
|
+
|
|
628
668
|
return errors
|
|
629
669
|
|
|
630
670
|
|
|
@@ -453,6 +453,52 @@ class TestTransformConfig:
|
|
|
453
453
|
assert layers[2]["url"] == "service"
|
|
454
454
|
assert any(_same_path(vol.host_path, imagery_dir) for vol in result.volumes)
|
|
455
455
|
|
|
456
|
+
def test_erdblick_coordinate_legal_terms_are_mapped_from_config_dir(
|
|
457
|
+
self, temp_dir
|
|
458
|
+
):
|
|
459
|
+
"""Relative coordinate terms are mounted at the dedicated browser root."""
|
|
460
|
+
legal_dir = temp_dir / "legal"
|
|
461
|
+
legal_dir.mkdir()
|
|
462
|
+
legal_file = legal_dir / "coordinates.yaml"
|
|
463
|
+
legal_file.write_text("legal-terms: Test terms\n")
|
|
464
|
+
config = {
|
|
465
|
+
"sources": [],
|
|
466
|
+
"erdblick": {
|
|
467
|
+
"coordinates-enabled": True,
|
|
468
|
+
"coordinates-legal-terms": "legal/coordinates.yaml",
|
|
469
|
+
},
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
result = transform_config(config, base_dir=temp_dir)
|
|
473
|
+
|
|
474
|
+
assert result.config["erdblick"]["coordinates-enabled"] is True
|
|
475
|
+
assert result.config["erdblick"]["coordinates-legal-terms"] == (
|
|
476
|
+
"/coordinates-legal-terms/coordinates.yaml"
|
|
477
|
+
)
|
|
478
|
+
assert any(
|
|
479
|
+
_same_path(vol.host_path, legal_file)
|
|
480
|
+
and vol.container_path == "/coordinates-legal-terms/coordinates.yaml"
|
|
481
|
+
for vol in result.volumes
|
|
482
|
+
)
|
|
483
|
+
|
|
484
|
+
def test_explicit_coordinate_legal_terms_browser_path_is_preserved(self):
|
|
485
|
+
"""Raw-Docker browser paths do not create Python-managed mounts."""
|
|
486
|
+
config = {
|
|
487
|
+
"sources": [],
|
|
488
|
+
"erdblick": {
|
|
489
|
+
"coordinates-legal-terms": (
|
|
490
|
+
"/coordinates-legal-terms/manual.json"
|
|
491
|
+
)
|
|
492
|
+
},
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
result = transform_config(config)
|
|
496
|
+
|
|
497
|
+
assert result.config["erdblick"]["coordinates-legal-terms"] == (
|
|
498
|
+
"/coordinates-legal-terms/manual.json"
|
|
499
|
+
)
|
|
500
|
+
assert result.volumes == []
|
|
501
|
+
|
|
456
502
|
def test_existing_volume_mapping_is_reused(self, temp_dir):
|
|
457
503
|
"""Hot reloads keep container paths stable when entries are removed."""
|
|
458
504
|
first = temp_dir / "first"
|
|
@@ -614,6 +660,30 @@ class TestValidatePaths:
|
|
|
614
660
|
assert "erdblick.additionalStyles[0]" in errors[0]
|
|
615
661
|
assert "erdblick.backgroundLayers[0].urlTemplate[0]" in errors[1]
|
|
616
662
|
|
|
663
|
+
def test_coordinate_legal_terms_path_and_extension_are_validated(self, temp_dir):
|
|
664
|
+
"""Coordinate terms must be an existing JSON/YAML file."""
|
|
665
|
+
legal_file = temp_dir / "terms.json"
|
|
666
|
+
legal_file.write_text('{"legal-terms":"Text"}\n')
|
|
667
|
+
|
|
668
|
+
assert validate_paths(
|
|
669
|
+
{"erdblick": {"coordinates-legal-terms": "terms.json"}},
|
|
670
|
+
base_dir=temp_dir,
|
|
671
|
+
) == []
|
|
672
|
+
|
|
673
|
+
missing_errors = validate_paths(
|
|
674
|
+
{"erdblick": {"coordinates-legal-terms": "missing.yaml"}},
|
|
675
|
+
base_dir=temp_dir,
|
|
676
|
+
)
|
|
677
|
+
extension_errors = validate_paths(
|
|
678
|
+
{"erdblick": {"coordinates-legal-terms": "terms.txt"}},
|
|
679
|
+
base_dir=temp_dir,
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
assert len(missing_errors) == 1
|
|
683
|
+
assert "File does not exist" in missing_errors[0]
|
|
684
|
+
assert len(extension_errors) == 1
|
|
685
|
+
assert "File must use .json, .yaml, or .yml" in extension_errors[0]
|
|
686
|
+
|
|
617
687
|
|
|
618
688
|
class TestWriteConfigToTemp:
|
|
619
689
|
"""Tests for write_config_to_temp()."""
|
|
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.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/__init__.py
RENAMED
|
File without changes
|
{nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/browser.py
RENAMED
|
File without changes
|
{nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/cli.py
RENAMED
|
File without changes
|
{nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/clipboard.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/exceptions.py
RENAMED
|
File without changes
|
{nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/src/ndslive/mapviewer/tui.py
RENAMED
|
File without changes
|
|
File without changes
|
{nds_mapviewer-2026.3.1.dev110 → nds_mapviewer-2026.3.2.dev113}/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
|