Code-style guide and reference patterns for DL/CV research at the ЛИСАД laboratory (NADEZHDA / SOFIA CVGL projects). Files: - Стандарт написания кода для DL CV исследований (CVGL).md - Правила написания Python-кода (Gin-Config Strict Pattern).md - REQUIREMENTS_GIN_STYLE.md - Gin-Config Strict Pattern Reference Examples.md - Переход от argparse и dataclass к gin-config.md - gin-parse.md - Рекомендуемые gin-config категории.md - config_loader_reference.py - README.md (this commit) - .gitignore (Python artifacts)
2.0 KiB
2.0 KiB
style_code_lisad
Code-style guide and reference patterns for DL/CV research at the ЛИСАД laboratory (CVGL projects: NADEZHDA / SOFIA).
Contents
| File | Purpose |
|---|---|
Стандарт написания кода для DL CV исследований (CVGL).md |
Master coding standard for the lab |
Правила написания Python-кода (Gin-Config Strict Pattern).md |
Quick-reference rule sheet |
REQUIREMENTS_GIN_STYLE.md |
Detailed gin-config requirements |
Gin-Config Strict Pattern Reference Examples.md |
Annotated example files |
Переход от argparse и dataclass к gin-config.md |
Migration guide |
gin-parse.md |
Notes on gin parsing semantics |
Рекомендуемые gin-config категории.md |
Suggested groupings of gin-configurable classes |
config_loader_reference.py |
Reference implementation of get_*_cfg() loader pattern |
Core principles
- Configuration via
gin-config(noargparse, nodataclass). @gin.configurableon classes only — all defaults live in__init__.- Loader pattern:
get_<name>_cfg(path: str) -> Instancethat callsgin.parse_config_file(path)then constructs the class. - Pass configs explicitly via constructor arguments, never via global gin state.
- Strict typing on all public APIs, Google-style docstrings, English code.
See the full standard in Стандарт написания кода...md.
Layout for derived projects
project_root/
├── in/
│ └── config_files/ # one .gin file per config class
├── src/
│ ├── conf/ # config classes + get_*_cfg() loaders
│ ├── augmentor/ # business logic (or other domain modules)
│ └── ...
├── tests/
└── README.md
License & usage
Internal lab reference. Apply when writing new CVGL research code (e.g.
code_sofia_v71/ should follow this standard — current dataclass-based
config is a known deviation that will be migrated in a separate refactor).