Companion/extra-waypoint GPX imported without matching cache silently produces zero results, no warning
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Empieza en src/opensak/importer/__init__.py: lee _insert_extra_wpts() y la rama if cache_id is None: continue, y luego el lugar de import_gpx() donde se construye ImportResult. Reproduce el caso con SAMPLE_WPTS_GPX de tests/data.py en una base de datos vacía y confirma que el resultado no tiene advertencias. Está terminado cuando esa importación añade a result.warnings una advertencia que indique cuántos waypoints no tenían un cache coincidente, y un test en los tests del importador lo comprueba.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Current State
Background
import_gpx() handles two kinds of GPX <wpt> entries: full geocache
records, and "extra" (child/companion) waypoints belonging to a parent cache
(type="Waypoint|..."). The latter are collected into extra_wpts during
parsing and linked to their parent via _insert_extra_wpts().
If a GPX file contains only extra waypoints — e.g. a companion
xxx-wpts.gpx from a Pocket Query with "Include Additional Waypoints", or
any file imported when its parent cache doesn't yet exist in the active
database — _insert_extra_wpts() silently drops them:
for suffix, wps in wpts_by_suffix.items():
cache_id = suffix_to_cache_id.get(suffix)
if cache_id is None:
continue # <-- silently discarded, no warning
get_import_type() (utils/utils.py) classifies purely by file extension, so
a companion-only GPX is indistinguishable from a normal cache GPX until
parsing — the user has no way to know which kind of file they picked.
Proposed Improvement
Reproduced
Imported a companion-only GPX (SAMPLE_WPTS_GPX from tests/data.py) into an
empty database:
created=0 updated=0 skipped=0 waypoints=0 errors=[]
No exception, no entry in result.errors, no entry in result.warnings
(the field exists and is already used by the LOC importer, just not here).
The import dialog shows a plain ✅ with all-zero counts — nothing to alert
the user that the file only contained orphaned child waypoints.
Expected Benefits
Expected behavior
When extra_wpts contains waypoints whose suffix has no matching cache,
append a message to result.warnings, e.g.:
"N waypoints found but no matching cache exists in the database.
Import the main cache GPX first."
so the existing warnings-display path in the import dialog surfaces it
instead of a silent all-zero success.
Where
src/opensak/importer/__init__.py, _insert_extra_wpts() (the
if cache_id is None: continue branch) and the caller in import_gpx()
where ImportResult is assembled.
- Lenguaje dominante
- Python
- Estrellas
- 37
- Forks
- 17
- Merge medio
- 16 h 7 min
- PR fusionados (30 d)
- 128
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenSAK-Org/OpenSAK
-
Make it clear that the Windows ZIP download is portable (no installer, not in Apps & Features)Abiertoarea: documentation documentation good first issue OS: windows
Dificultad 2/5 Medio día Aptitud para principiantes 78/100
OpenSAK-Org/OpenSAK#1289 ·
Los mantenedores suelen responder en 1 día
-
area: geo-data improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
OpenSAK-Org/OpenSAK#1285 ·
Los mantenedores suelen responder en 1 día
-
area: geo-data good first issue improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
OpenSAK-Org/OpenSAK#789 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area: UI improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
OpenSAK-Org/OpenSAK#729 ·
Los mantenedores suelen responder en 1 día
-
area: documentation improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
OpenSAK-Org/OpenSAK#570 ·
Los mantenedores suelen responder en 1 día
Todos los issues de OpenSAK-Org/OpenSAK
Issues similares
-
area: providers/aws priority: p2 size: S type: bug type: testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
finos/open-resource-broker#851 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
sandialabs/atlas-ui-3#1196 ·
Los mantenedores suelen responder en 1 día
-
enhancement triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ShaftHQ/SHAFT_ENGINE#7902 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: GraphML export writes invalid XML when a value contains a control character (e.g. form feed)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
topoteretes/cognee#6646 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
DOI-USGS/pywatershed#428 ·