Repository navigation
Regional category schemes: pick a region at first launch - #316
Merged
Merged
Conversation
GLEAPP seeded every case with the US Project VIC codes 0-5. Other countries and agencies categorize differently, so the locked presets now come from the region the examiner picks: the US plus Australia, Austria, Canada (EN/FR), Denmark, Estonia, Europol, France, Ireland, Netherlands, Norway, Romania, South Korea, Sweden, Switzerland and the UK (gleapp/regions.py). - The region is app-wide (config category_region). The launcher asks for it on first launch, after the intro video closes; Menu > Category region or `gleapp region <ID>` changes it. - A case records the region it was created under (meta category_region) and keeps it, since its stored codes only mean something under that scheme. A case from before this is a US case; US behavior is unchanged. - Uncategorized, number keys, the first custom code, NSRL auto-landing (only where the region names a non-pertinent category) and severity come from the case's scheme instead of hard-coded 0/5. - The hash stash keys entries on (md5, region) and a case matches only its own region's entries; a format-1 stash migrates to US entries. CSV export/merge carry the region. - A Project VIC import passes codes through and warns when the file's @odata.context region differs from the case's. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every case used to be seeded with the US Project VIC category scheme (codes 0–5). Examiners elsewhere work under different schemes, so the locked presets now come from a region the examiner picks.
17 regions are included (
gleapp/regions.py): the United States (Project VIC, unchanged), Australia, Austria, Canada (English and French), Denmark, Estonia, Europol, France, Ireland, the Netherlands, Norway, Romania, South Korea, Sweden, Switzerland and the United Kingdom.How it behaves
gleapp region <ID>.meta category_region), because its stored codes only mean something under that scheme. A case from before this change opens as US. If a case's region differs from the app's, the case header says so.(md5, region), and a case matches only its own region's entries. The stash keeps the categories the region's scheme marks illegal; for the US that is still 1–3. A format-1 stash migrates to US entries on first open. CSV export and merge carry the region.@odata.contextregion differs from the case's.Compatibility
Known gaps
@odata.contexttags are unverified.Tests
tests/test_regions.py: schemes, seeding and persistence, pre-region cases, stash isolation, migration, CSV round trip, NSRL landing per region, VIC mismatch, and the settings API.--selfcheck.🤖 Generated with Claude Code