Skip to main content
Latest PyPI version

openmairie.devtools is a collection of command-line programs and CI/CD configurations to handle tasks on openMairie Framework based projects. Mainly initialize environment, run tests, release a project, …

This document explains the usage of the devtools. For development purposes, look at CONTRIBUTING.rst.

CI/CD components for GitLab

See documentation for each component in the templates/ folder.

Command line tools

Installation

You just need pip ≥ 21.3

pip install openmairie.devtools

For the om-logo command, you must also have Inkscape and the Caviar Dream available on your system.

You can enable auto-completion for all the om-* commands at once using argcomplete’s global completion hook. This is a one-time, per-machine setup, so once it’s done any other argcomplete-enabled tool will complete automatically too

activate-global-python-argcomplete --user

Available commands

Here is an overview of each command-line tool included in the devtools. You can also use the –help flag on each one to learn more about it.

om-tests

Should be run from the tests folder of your project and allow you to initialize your test environment, to run all tests suites or to run only one tests suite.

om-svnexternals

Install SVN dependencies listed in EXTERNALS.txt.

Should be run from the root of your project. It scans for EXTERNALS.txt files and resolves each entry using the following strategy:

  1. Git branch export — for openmairie_exemple/branches/... URLs, if the matching branch exists in the openmairie/framework-openmairie git repository, the requested sub-directory is exported from that branch.

  2. GitLab package registry — the SVN URL is parsed to derive a package name and version. If a matching archive exists in the generic package registry, it is downloaded and extracted.

  3. SVN export — if neither path succeeds, a classic svn export --force --ignore-externals is performed and any nested EXTERNALS.txt discovered inside the export is resolved recursively.

Three URL patterns are recognised:

  • Externals (externals-- prefixed packages):

    .../externals/fpdf/tags/1.8.5/             → externals--fpdf          1.8.5
    .../externals/pear/pear-core/tags/v1.10.12 → externals--pear--pear-core v1.10.12
    .../externals/om-theme/kied/tags/2.0.0     → externals--om-theme--kied 2.0.0
  • Framework tags (openmairie_exemple) — maps to the single package externals--framework-openmairie. The bundled archive (with resolved sub-externals) is preferred over the bare one:

    .../openmairie_exemple/tags/4.11.0-a16/core → core-bundle.tar.gz then core.tar.gz
    .../openmairie_exemple/tags/4.11.0-a16/lib  → lib-bundle.tar.gz  then lib.tar.gz
  • Framework branches (openmairie_exemple) — exported from git, not from the package registry (and not cached, since a branch moves):

    .../openmairie_exemple/branches/4.11.x/core → branch 4.11.x, sub-directory core

Downloaded tag archives are cached locally so subsequent runs are near-instant.

Usage

cd /path/to/your/project
om-svnexternals            # normal run (uses cache)
om-svnexternals --no-cache # force re-download

om-release

Performs the complete release cycle for openMairie PHP applications (replacing the legacy om.releaser package). Should be run from the root of your project.

The workflow has three phases:

  1. Prerelease: version bump in VERSION.txt (or dyn/version.inc.php), history file update, documentation link update, framework externals pinning, DB init & SQL file handling, commit.

  2. Release: git tag.

  3. Postrelease: bump to next development version (.dev0), new history section, framework externals unpinning, new SQL files, commit.

By default all three phases run in sequence. Each phase can also be run independently.

Usage

cd /path/to/your/project
om-release                  # full release (prerelease + tag + postrelease)
om-release --prerelease     # prerelease only
om-release --release        # tag only
om-release --postrelease    # postrelease only

om-release-notes

Generates a release notes PDF (and CSV) from a GitLab milestone. It fetches all issues attached to the milestone, converts their markdown descriptions (including images) to PDF, and produces a document with a cover page, table of contents, and one section per issue category (evolutions, bugs, others).

Usage

om-release-notes --project openmairie/openXXX --milestone "1.15.0"
om-release-notes --project openmairie/openXXX --milestone "1.15.0" \
    --logo logo.png --output notes.pdf

Configuration

Configuration for CLI tools is read from ${XDG_CONFIG_HOME:-~/.config}/om-devtools/config.cfg.

Example config.cfg

[browser]
src_path = /path/to/browser/source
dest_path = /path/to/browser/destination

[gitlab]
url = https://gitlab.com
token = glpat-xxxxxxxxxxxxxxxxxxxx

[update]
check = false

Some commands interact with GitLab and need a GitLab private token. It can be provided by (read in this order):

  1. the --token command-line option

  2. the GITLAB_TOKEN environment variable

  3. the [gitlab] section of the configuration file

The GitLab URL defaults to https://gitlab.com and can be overridden with --gitlab-url, the GITLAB_URL environment variable, or the [gitlab] section of the configuration file.

Every command checks (at most once a day) whether a newer release is available on PyPI, and prints a short notice if so. This check can be disabled with the OMDT_NO_UPDATE_CHECK environment variable, or with check = false in the [update] section of the configuration file.

Changelog

1.5.0 (2026-09-10)

  • (om-svnexternals): support installing openmairie framework externals from the GitLab repository [flohcim]

  • Print a notice to the user if a new version is available on PyPi [nathanaelhoun], idea from [flohcim]

  • Revert pinned argcomplete version, upstream is fixed [nathanaelhoun,epritchard2]

1.4.2 (2026-08-05)

  • Ensure argcomplete is compatible with python 3.9 [epritchard2]

1.4.1 (2026-07-24)

  • Fix argument autocompletion breaking the whole scripts [nathanaelhoun]

  • Modernize python packaging by following PEP 621 [nathanaelhoun]

1.4.0 (2026-07-24)

  • Code base modernization. [nathanaelhoun]

  • Always drop existing database on ìnitenv. [nathanaelhoun]

  • GitLab CI/CD : new build-robotframework-documentation CI/CD component to build the robotframework documentation for all keywords of a given project and allow them to be published on GitLab Pages [nathanaelhoun]

  • feat(om-release): add release workflow command replacing om.releaser. [flohcim, nathanaelhoun]

  • feat(om-release-notes): new script to generate a PDF and CSV with release notes from a GitLab milestone. [flohcim, nathanaelhoun]

  • Rename configuration directory from ~/.om-devtools/ to $XDG_CONFIG_HOME/om-devtools/. The legacy paths are still read with a deprecation warning. [nathanaelhoun]

1.3.0 (2026-03-30)

  • om-tests: runall command now excludes the dev tag by default. [epontagnier]

  • om-svnexternals: resolve externals from GitLab generic package registry instead of svn export when the archive is available. Falls back to svn export when not found. [flohcim]

  • om-svnexternals: add local cache for downloaded archives (~/.cache/om-devtools/packages/). Use -N / --no-cache to force re-download. [flohcim]

  • om-svnexternals: use svn export --force --ignore-externals and recursively resolve nested EXTERNALS.txt files. [flohcim]

  • om-svnexternals: support framework URLs (openmairie_exemple) mapped to externals--framework-openmairie package with bundle priority. [flohcim]

  • Rename configuration directory from ~/.om-tests/ to ~/.om-devtools/. The legacy path is still read with a deprecation warning. [flohcim]

1.2.0 (2025-05-28)

  • Fixed documentation for pabot. [rasseum]

  • Added two contributors. [rasseum]

  • Note: Version 1.1.1 should have been named 1.2.0. This 1.2.0 version restores proper versioning by correcting several aspects. [rasseum]

1.1.1 (2025-04-24)

  • Add pabot to openmairie.devtools. [rasseum]

1.1.0 (2023-10-08)

  • Use robot and not pybot command anymore. [flohcim]

1.0.0 (2022-05-10)

  • Python 3 support only. [flohcim, tiazma]

0.4.0 (2018-04-10)

  • Add ‘additional_sql’ option config to om-tests. [flohcim]

0.3.1 (2018-01-10)

  • Removed unnecessary jinja2 env options [tiazma]

0.3.0 (2018-01-10)

  • Added om-logo, application logo generation [tiazma]

0.2.2 (2017-11-25)

  • Remove the externals was breaking travis CI. [flohcim]

0.2.1 (2017-11-24)

  • Filename of EXTERNALS.txt file parsed was missing. [flohcim]

0.2.0 (2017-11-24)

  • Add om-svnexternals script. [flohcim]

0.1 (2017-11-23)

  • Initial release as a python package. [flohcim, fmichon, jymadier, mbroquet, nhaye, NHaye, nmeucci, oc1n, softime, stimezouaght, tiazma]

Contributors

Release files for openmairie.devtools 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openmairie.devtools 1.5.0
File Size Uploaded
openmairie_devtools-1.5.0.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openmairie.devtools 1.5.0
File Interpreter ABI Platform
openmairie_devtools-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 47.8 kB

Release files / openmairie_devtools-1.5.0.tar.gz

Download URL openmairie_devtools-1.5.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
38ab7f176dcd97199df521d0ee9f290f372b7100d9f6b4ee2d24f34f360a3d2c
BLAKE2b-256 checksum
How to use checksums
a91b9c7ee6f97e27d84aa7c02c354ecec3903ec353b8cd3db8a9b340f616128c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / openmairie_devtools-1.5.0-py3-none-any.whl

Download URL openmairie_devtools-1.5.0-py3-none-any.whl
Size 42.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03987e49d6f36013e60ccdd8dc91e426871ffc3261119fe12861880625c532aa
BLAKE2b-256 checksum
How to use checksums
26f7d56d449acad1a89d129da87c8e5b93b482d604bb9bfd903547b4e02cdbea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

1 release file

1.0.0

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page