arrow_backRetour aux issues
HafidIdrissi/Time-Tracker
#19
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
Expand validation coverage for category configuration
ecoDébutant
enhancement
help wanted
good first issue
descriptionDescription
## User problem
`config.json` controls how private activity is categorized. The loader validates
many malformed inputs, but the test suite currently covers only a non-list
`categories` value. A future change could weaken validation and make the app
fail later with a confusing error.
## Expected result
Add focused, table-driven unit tests for the validation rules already provided
by `load_categorizer()`. Production code should change only if a test reveals a
small, clearly demonstrated defect.
## Likely files
- `tests/test_categories.py`
- `timetracker/categories.py` only when a failing test exposes a defect
## Acceptance criteria
- Cover invalid JSON and a configuration root that is not an object.
- Cover a missing or non-list `categories` field.
- Cover empty names, invalid `#RRGGBB` colors, and empty keyword lists.
- Cover non-string and whitespace-only keywords.
- Cover duplicate category names with different letter casing.
- Verify that valid names and keywords are trimmed.
- Use subtests or another compact pattern so failures identify the invalid case.
- Assert useful `CategoryConfigError` messages without depending on an entire
traceback.
## Test command
```powershell
python -m unittest tests.test_categories -v
python -m unittest discover -v
```
Issues similaires
calkit/calkit
star53
Poids du dépôt moyen
VS Code extension should be robust to YAML parser errors
Seeing this error: ``` Failed to read calkit.yaml: YAMLParseError: A block sequence may not be used as an implicit map…
Python
bug
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: a manual Refresh control
The dashboard polls: `refreshStats()` (`src/doberman/dash/app.py:408`) every 5 s and `refreshPending()` (`:546`) every …
Python
enhancement
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: "Copy details" button on each pending-approval card
Each pending-approval card in the dashboard (`renderPending`, `src/doberman/dash/app.py:448-544`) shows the risk badge,…
Python
enhancement
good first issue