ament / ament/ament_index

introduce a version.txt for ament_python

Aperta
#125 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
15
Fork
32
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hey, onboarding to ros2. This `avent_python` template looks really good/standard for operational use from my perspective as a drone/embedded/hardware/IoT fleet CI/CD and C2 guy. It looks almost identical to the model templates I set up for employers actually, which has motivated me to make a comment :-).

Saw that the team here is still pretty small, and I'll be adapting this template with `version.txt`, thought I'd propose it here or at least start the conversation.

I really like the use of `version.txt` next to `setup.py` which I typically recommend referencing in the module's `__init__.py` file dynamically (along with other changes so that `setup.py` is standard and copy-able from one project to the next). I pulled this concept from `java` libraries, but it is something I've seen in production in IoT industry. I make use of it in my infra, and it's useful for allowing CI/CD + shell routines to easily hook into changes in the `version.txt` file in addition to Cxx sidecar libraries and other add ins that accumulate IRL.

Further, it is very easy to increment a semver in a `version.txt` rather than either `pyproject.toml`, `setup.py`, or `module_name/__init__.py` via normal `git` and CICD workflows (written in shell or abbreviated shell environments in alpine linux, for example), whereas jumping into any of those other file types can require extra work and packages in the build container to support whatever one liner we come up with (using perl/awk/sed, jq, etc.). It's also pretty fragile when not using `version.txt` and supporting many teams, as these python packaging approaches tend to be trendy rather than good, changing every 18 months (the versioning methods wind up being as numerous as the projects we support).

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.