Skip to content

[IMP] cli: rewrite --help descriptions for clarity and completeness#226

Closed
nhomar wants to merge 9 commits intomainfrom
main-study-cli
Closed

[IMP] cli: rewrite --help descriptions for clarity and completeness#226
nhomar wants to merge 9 commits intomainfrom
main-study-cli

Conversation

@nhomar
Copy link
Member

@nhomar nhomar commented Feb 13, 2026

  • Add program description and usage examples epilog
  • Use RawDescriptionHelpFormatter for proper line formatting
  • Rewrite all 19 argument help strings with clear descriptions
  • Show default values consistently across all arguments
  • Organize arguments in logical groups (Docker, Paths, Git, Build, Run, Hooks, DeployV)
  • No logic changes, only cosmetic help text improvements

- Add program description and usage examples epilog
- Use RawDescriptionHelpFormatter for proper line formatting
- Rewrite all 19 argument help strings with clear descriptions
- Show default values consistently across all arguments
- Organize arguments in logical groups (Docker, Paths, Git, Build, Run, Hooks, DeployV)
- No logic changes, only cosmetic help text improvements
@nhomar
Copy link
Member Author

nhomar commented Feb 14, 2026

🔍 Análisis profundo del codebase — Hallazgos

Se realizó un análisis exhaustivo de todo el código fuente, templates, tests, configuración y documentación. Se encontraron 13 inconsistencias organizadas en 6 categorías:

🔴 Bugs (2)

  1. 20-run.sh duplica -itP — El template hardcodea -itP y el default de --run-extra-args también lo incluye (-itP -e LANG=C.UTF-8), generando flags redundantes en el docker run.

  2. --build-env-args descarta valores silenciosamente — El aplanamiento [x[0] for x in args.build_env_args] solo toma el primer elemento de cada sub-lista. Si se usa --build-env-args VAR1 VAR2, solo VAR1 se procesa.

🟡 Docs vs Código (3)

  1. README documenta paths de output obsoletos (/8.0/1) — el código genera /8.0/3_5/env_1_job_1/.
  2. README documenta SSH id_rsa — el código prioriza id_ed25519 y advierte que RSA está deprecated.
  3. README no menciona .t2d.yml — el formato alternativo real soportado por el código.

🟡 Vestigios (4)

  1. .travis.yml raíz obsoleto — La CI real usa GitHub Actions. El .travis.yml contiene un token PyPI encriptado inservible.
  2. Código Py2 residual (from __future__, encode('utf-8') try/except, universal=1 en setup.cfg).
  3. Python default hardcoded a 3.5 en travis2docker.py — anacrónico para Odoo 16+.
  4. Imagen default vauxoo/odoo-80-image-shippable-auto — era Odoo 8.0 / Shippable.

🟡 UX (2)

  1. print debug en git_run.py — imprime cada comando git a stdout sin poder silenciarlo.
  2. sleep 2 silencioso — se inyecta al final del script sin documentar si no se pasa --runs-at-the-end-script.

🟢 DeployV (2)

  1. build_env_args diverge entre Dockerfile normal y deployv — en normal genera ARG+ENV $VAR, en deployv hardcodea ENV VAR=TRUE.
  2. Auto-construcción de imagen en deployv no documentada — si no se pasa --docker-image se construye desde variables.sh sin documentar qué campos requiere.

Cada hallazgo tiene propuesta de solución concreta. Se pueden crear issues individuales por cada punto para trackear las correcciones.

nhomar and others added 5 commits February 13, 2026 23:01
The template hardcoded -itP in the docker run command, but the CLI
default for --run-extra-args already includes -itP -e LANG=C.UTF-8,
resulting in duplicate flags in the generated script.
The list comprehension [x[0] for x in args.build_env_args] silently
discarded all but the first value when multiple args were passed in a
single --build-env-args invocation (e.g. --build-env-args VAR1 VAR2).
Now properly flattens all sub-lists.
- Correct output directory structure to match actual code behavior
  (python_version/env_N_job_M instead of flat /1, /2)
- Document .t2d.yml as alternative config file name
- Clarify that HTTPS URLs are also accepted
- Add Ed25519 key instructions as recommended (matching code behavior)
- Keep RSA instructions as legacy fallback
- Note that 10-build.sh already uses --pull so manual pull is optional
- Fix typo: 'into of' -> 'inside of'
The project's CI has migrated to GitHub Actions (.github/workflows/).
This .travis.yml is vestigial and contains an unusable encrypted PyPI
deploy token. Removing to avoid confusion since this tool parses
.travis.yml files — having its own obsolete one is misleading.
- Remove from __future__ import print_function in git_run.py
- Remove 5 try/except encode('utf-8') blocks in travis2docker.py
  (in Py3 .encode() returns bytes, so text-mode write always raised
  TypeError — the except branch was always the one executing)
- Change setup.cfg universal = 0 (project no longer supports Py2)
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.61%. Comparing base (001f7f0) to head (0d40c32).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #226   +/-   ##
=======================================
  Coverage   80.61%   80.61%           
=======================================
  Files           7        7           
  Lines         614      614           
  Branches      113       91   -22     
=======================================
  Hits          495      495           
  Misses         86       86           
  Partials       33       33           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…to 3.10

- Remove 5 try/except encode('utf-8') blocks (in Py3 .encode()
  returns bytes, text-mode write always raised TypeError — the
  except branch was always executing)
- Update default Python version from 3.5 to 3.10 (Odoo 16+)
- Replace print('cmd list', ...) and print('cmd', ...) with
  _logger.debug() so output is controllable via logging config
- Remove obsolete pylint disable for print-used
- Use standard Python logging module
- --docker-image: note that the default is a legacy Odoo 8.0 image
- --runs-at-the-end-script: fix misleading 'none' default — the code
  actually injects 'sleep 2' when omitted (for interactive debugging)
- --build-env-args: document DeployV rendering divergence (shell
  exports vs ARG/ENV)
- --deployv: document auto-constructed image name pattern from
  variables.sh
@nhomar
Copy link
Member Author

nhomar commented Feb 14, 2026

Superseded by #227, which rebases these commits onto main with improved commit messages following the project's commit skill conventions (rationale, before/after behavior in each commit body).

@nhomar nhomar closed this Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants