You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.5 KiB
2.5 KiB
Constraint Files Index
This directory contains all constraint files for the Stemwijzer codebase.
Quick Navigation
| Category | File | Purpose |
|---|---|---|
| Stack | ../stack/stack.yaml |
Tech stack overview |
| Architecture | ../architecture/architecture.yaml |
Data flow, page routing, component relationships |
| Conventions | ../conventions/conventions.yaml |
Naming, error handling, code organization |
| Domain | ../domain/domain-glossary.yaml |
Dutch political terms, algorithm concepts |
| Patterns | ../patterns/patterns.yaml |
10 code patterns (page wrapper, pipeline, etc.) |
| Anti-Patterns | ../anti-patterns/anti-patterns.yaml |
⚠️ 7 issues including CRITICAL BUG |
| Dependencies | ../dependencies/dependencies.yaml |
Library wiring, singletons, imports |
How to Use
- Before writing code: Check
patterns/patterns.yamlfor how similar features are implemented - When naming things: Follow
conventions/conventions.yaml(snake_case functions, PascalCase classes) - When handling errors: Avoid patterns in
anti-patterns/anti-patterns.yaml - When working with domain terms: Reference
domain/domain-glossary.yaml - When connecting components: See
dependencies/dependencies.yamlfor wiring
Key Conventions Summary
- Files: snake_case (
explorer_helpers.py) - Functions: snake_case (
compute_party_coords) - Classes: PascalCase (
MotionDatabase) - Constants: UPPER_SNAKE_CASE (
PARTY_COLOURS) - No bare
except:— always specify exception type - Pure functions in helpers — no IO, no Streamlit calls
- One singleton per module —
db,config,PARTY_COLOURS
⚠️ Critical Bug
Read ../anti-patterns/anti-patterns.yaml first. Section 1 documents a critical bug in
explorer_helpers.py:compute_party_coords where party names in svd_vectors entity_id are
not recognized because party_map only contains MP-name keys.
Files Generated
manifest.yaml— lists all constraint files with group mappingsstack/stack.yaml— tech stackarchitecture/architecture.yaml— data flow & componentsconventions/conventions.yaml— coding conventionsdomain/domain-glossary.yaml— domain terminologypatterns/patterns.yaml— 10 code patterns with examplesanti-patterns/anti-patterns.yaml— 7 anti-patterns including CRITICAL BUGdependencies/dependencies.yaml— library wiringREADME.md— this index