Ignore list: prevent deleted and found caches from being re-imported
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- database, desktop, documentation
Direzione di ricerca
This is a multi-part design task, not a first contribution. Start by reading the module docstring in src/opensak/importer/gsak_importer.py (#473), then _upsert_cache, count_own_found_logs and FOUND_LOG_TYPES, since the new skip check must run before _upsert_cache. Done means the ignored_caches table and both skip rules work on every import path and are covered by the unit tests listed in the acceptance criteria.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Background
Requested by a member of the Facebook community:
Is there an ignore list to prevent caches I've found, or other caches that I've deleted, from being re-imported into the 'main' database?
OpenSAK has no ignore list today. GSAK users know this feature ("Delete and add to ignore list"), so it belongs alongside the other GSAK-parity work. The GSAK importer also explicitly left GSAK's Ignore list out of scope (see the module docstring in src/opensak/importer/gsak_importer.py, #473).
Why the usual workaround doesn't help: the usual advice is to set the Pocket Query to "I haven't found" on geocaching.com, but that only works for PQs you run yourself. Many users receive PQs through a PQ club, where another member runs the query against their own account. "I haven't found" then filters on the club member's finds, not yours, so your found caches keep arriving with every import. OpenSAK has to handle this on the import side.
Proposal
Two related mechanisms with different semantics:
1. Ignore list (explicit, per cache)
- New per-database table, e.g.
ignored_caches:gc_code(primary key)added_at(timestamp)name(cache name at the time of ignoring, so the list stays readable after the cache row is deleted)note(optional, free text)
- Per-database, consistent with OpenSAK's independent-database architecture, and matching GSAK's behaviour.
- Cache list context menu: "Delete and ignore" for single and multi-select. The existing confirmation dialog is reused, with the count shown.
- Ignore List dialog (e.g. under the Database or Tools menu): list, search, remove entries (un-ignore), and optionally add a GC code manually.
- Un-ignoring only removes the entry. The cache comes back on the next import that contains it.
2. "Skip caches I've found" import option
- An import setting, off by default, since many users deliberately keep their finds in a database.
- A cache counts as "found by me" if either:
- it already exists in the target database with
found = True(covers finds marked via the found-updater / reference database), or - the incoming GPX data contains a Found it log (
FOUND_LOG_TYPES) by the user's configured geocaching name/ID (same logic ascount_own_found_logs).
- it already exists in the target database with
- When a found cache is skipped, it is not added to the ignore list, so turning the option off later restores normal behaviour.
- Open question: if a found cache already exists in the database, should it be left untouched (skip update) or removed? Suggest leave untouched for v1. Removal is something the user can do explicitly with "Delete and ignore".
Importer behaviour (both mechanisms)
- Applies to every import path: GPX, PQ ZIP, PQ e-mail (IMAP, #443), and GSAK import.
- The check happens before
_upsert_cache, so skipped caches never touch waypoints, logs, attributes or trackables. - The import summary reports skipped counts separately, e.g.:
N caches skipped (ignore list)N caches skipped (already found)
- Locked caches (#202) are unaffected. The lock still only protects against overwrite. It does not exclude anything.
Follow-up (separate issue once this lands)
- GSAK importer: import GSAK's ignore list into
ignored_caches, closing the remaining gap noted in #473. - Optional: export/import of the ignore list as plain text (one GC code per line), useful for copying between databases.
Out of scope
- Sharing one ignore list across multiple databases. Each database stays independent.
- Ignoring by owner, cache type, or other criteria. This is per-GC-code only. Criteria-based exclusion is a filter concern.
Acceptance criteria
-
ignored_cachestable created via the existing schema/migration mechanism. Existing databases are upgraded without data loss. - "Delete and ignore" in the cache list context menu (single + multi-select) deletes the cache(s) and adds them to the ignore list.
- Ignore List dialog: view, search, remove, manual add.
- All import paths (GPX, PQ ZIP, PQ e-mail, GSAK) skip ignored GC codes.
- "Skip caches I've found" setting (default off) skips found caches as defined above, on all import paths.
- Import summary shows skipped counts per reason.
- New strings added to all language files (
test_no_missing_keys). - Unit tests: ignore-list CRUD, importer skip (ignored), importer skip (found, both detection rules), un-ignore then re-import, migration of an existing database.
-
docs/filters.md/ user guide updated with the ignore list and the import option, including the PQ-club explanation.
- Lingua principale
- Python
- Stelle
- 37
- Fork
- 17
- Merge medio
- 16h 7m
- PR unite (30g)
- 128
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenSAK-Org/OpenSAK
-
Make it clear that the Windows ZIP download is portable (no installer, not in Apps & Features)Apertaarea: documentation documentation good first issue OS: windows
Difficoltà 2/5 Mezza giornata Idoneità per principianti 78/100
OpenSAK-Org/OpenSAK#1289 ·
I maintainer di solito rispondono entro 1 giorno
-
area: geo-data improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
OpenSAK-Org/OpenSAK#1285 ·
I maintainer di solito rispondono entro 1 giorno
-
area: geo-data good first issue improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
OpenSAK-Org/OpenSAK#789 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area: UI improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
OpenSAK-Org/OpenSAK#729 ·
I maintainer di solito rispondono entro 1 giorno
-
area: import improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenSAK-Org/OpenSAK#648 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OpenSAK-Org/OpenSAK
Issue simili
-
area: providers/aws priority: p2 size: S type: bug type: testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
finos/open-resource-broker#851 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
sandialabs/atlas-ui-3#1196 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ShaftHQ/SHAFT_ENGINE#7902 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: GraphML export writes invalid XML when a value contains a control character (e.g. form feed)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
topoteretes/cognee#6646 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
DOI-USGS/pywatershed#428 ·