Pikaliov 98e98f591c Add code-style skill (gin-config strict pattern)
- code-style/SKILL.md — skill spec for the LISAD code-style enforcement
- code-style/reference/gin_examples.md — gin-config canonical examples

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 10:33:43 +03:00

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

  1. Configuration via gin-config (no argparse, no dataclass).
  2. @gin.configurable on classes only — all defaults live in __init__.
  3. Loader pattern: get_<name>_cfg(path: str) -> Instance that calls gin.parse_config_file(path) then constructs the class.
  4. Pass configs explicitly via constructor arguments, never via global gin state.
  5. 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).

Description
Code-style guide and gin-config reference patterns for DL/CV research at LISAD lab.
Readme 62 KiB
Languages
Python 100%