CoNexDat / CoNexDat/LaNet-vi

CLI/config: YAML round-trip broken, --config discards other flags, and many accepted options are inert

Open
#23 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
8
Forks
0
Avg merge
6h 10m
Merged PRs (30d)
16

Description

Found by the September 2026 comparison against the C++ sources (see docs/migration-from-cpp.md on branch docs/legacy-heritage (PR #17)). Verified on main.

**Broken**
- `lanet-vi config out.yaml` dumps enum defaults as `!!python/object/apply:lanet_vi.models.config.DecompositionType` tags and `load_config_from_yaml` uses `yaml.safe_load`, so `--config out.yaml` fails with a ConstructorError. (`io/config_loader.py`; use `model_dump(mode="json")`.)
- With `--config`, every other CLI flag except `--weighted`/`--multigraph` is discarded (`cli.py` ~172-178). The C++ precedence was defaults < config file < command line.
- `--names` loads names but never draws labels: `VisualizationConfig.show_node_labels` defaults to False and is not settable from the CLI (`matplotlib_renderer.py` ~274). `--font-zoom` is therefore dead too. A per-node name `"0"` is treated as "skip"; in the C++ `-names` without a file meant "label with node numbers".
- Default-true booleans (`--show-degree-scale`, `--show-size-legend`, `--gradient-edges`, `--color-by-community`, `--draw-community-boundaries`) have no `--no-...` form and cannot be switched off.
- `--show-degree-scale` is mis-mapped: it toggles the colour legend, while the degree/size legend is `--show-size-legend`.

**Accepted but inert** (either wire them or remove them from the CLI/YAML/`config` output):
`--from-layer`, `--coord-distribution`, `--alpha`, `--beta`, `--delta`, `--gamma`, `--use-spiral-layout` + `--spiral-*`, all `--detect-communities`/`--community-*`/`--color-by-community`/`--draw-community-boundaries` (`config.community` is never read and `community_viz.py` has no callers), YAML `renderer` (`networkx`/`plotly`), `measure`, `unit_length`, `ratio_constant`, `use_spatial_hashing`, `opacity` (only used when `gradient_edges` is off). `maximum_strength` is YAML-only.

Contributor guide

Open the contributing guide

Research direction

Start with io/config_loader.py and cli.py around the cited config-loading and flag-handling sections, then inspect matplotlib_renderer.py and community_viz.py for the rendering paths. Compare the current behavior with docs/migration-from-cpp.md and verify which listed options are wired or inert. Done means config precedence, YAML round-tripping, flag mappings, boolean negations, and the accepted-option behavior are corrected or deliberately removed, with tests covering the changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.