Include parameter descriptions as comments in generate-config's output
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- cli, documentation
Direzione di ricerca
Start by locating the generate-config implementation and the init-project path that calls generate_config(), then inspect pipeline-class docstrings such as pyopia.process.Segment for parameter descriptions. The work will involve preserving those descriptions while writing TOML comments, so identify the relevant configuration-generation tests or add coverage for the generated config.toml. Done means generated configuration files contain a description comment above each parameter sourced from the corresponding docstring.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
generate-config (and init-project, which calls it) builds a plain Python dict and dumps it via toml.dump(), so the resulting config.toml has no comments at all - every step's parameters are just bare key = value lines, even though the corresponding pipeline classes already have real per-parameter descriptions in their own docstrings (e.g. pyopia.process.Segment's numpydoc Parameters section).
Found this building pyopia-gui's Configuration tab, which shows each step's parameters with these descriptions - it works by introspecting the classes' docstrings itself at runtime (inspect.signature + parsing the Parameters section), so this isn't blocking pyopia-gui specifically. But anyone editing a generated config.toml by hand, outside pyopia-gui, currently gets no hint of what any parameter does or what values are valid, even though PyOPIA's own docstrings already have that information.
Would be a nice, low-risk improvement if generate-config's output included each parameter's description as a comment above it, sourced from the same docstrings - e.g.:
[steps.segmentation]
pipeline_class = 'pyopia.process.Segment'
# threshold for segmentation. Defaults to 0.98.
threshold = 0.98
Since generate_config() currently builds a plain dict before toml.dump(), this would need moving to something that writes TOML directly (or post-processing the dumped text to insert comments) rather than round-tripping through a dict - a bit more work than a one-line change, but the underlying descriptions already exist in docstrings PyOPIA already maintains, so it's not new documentation to write.
- Lingua principale
- Jupyter Notebook
- Stelle
- 19
- Fork
- 7
- Merge medio
- 10g 11h
- PR unite (30g)
- 1
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SINTEF/pyopia
-
Guard clean_bw against the scikit-image remove_small_objects change before lifting the <0.25 pinForse di nuovo libera @riyagoyal01 l’ha presa 13 giorni fa e non c’è nessuna pull request aperta. Apertapatch / enhancement testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Use explicit, per-instrument-configurable timestamp format when parsing filenames (SilCam/Holo/UVP)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
-
patch / enhancement priority-medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Document running Python directly in the Docker image, and which functions are publicForse già presa @emlynjdavies l’ha presa 17 giorni fa. Apertadocumentation question
Tutte le issue di SINTEF/pyopia
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
lem-project/lem#2524 ·
I maintainer di solito rispondono entro 1 giorno
-
GitHub registry install via `gh` credentials rewrites `\u0000`–`\u001f` escapes in source files to `^@`–`^_`Forse già presa @carlosrobert0 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
I maintainer di solito rispondono entro 2 giorni