Technical Aspects
What is Phoenix for ?
The phoenix libraries are aiming to facilitate the development and improve the quality of data acquisition and data analysis software. Therefore, they include some field specific tools for data exchange between processes, abstract socket API with build-in mock-ups, serialization, ... but also a lot of general purpose utilities for research software: testing, benchmarking, configuration and argument parsing, string manipulation, code generation... Phoenix also provides a complete CI/CD workflow (gitlab CI/CD) for projects managed with pixi.
Thanks to its modular design, a user interested in a specific subset of the features can install only the required packages, keeping their environment lightweight. Phoenix packages are implemented in either C++, Rust and python and packaged with pixi to the conda package format. Packages are available for the linux-64 and linux-aarch64 platforms. Additional platforms could be added upon request.
Phoenix is a research software infrastructure tier set of libraries. It is being developed at LAPP (Laboratoire d'Annecy de Physique des Particules) for over 6 years and will support long-term research experiments. Currently, Phoenix provides a suite of tools for:
- Data serialization into binary format
- Data exchange and management using sockets
- Executable program arguments and configuration parsing and validation
- Code generation for projects or classes
- Clock and time measurement
- SIMD programming using intrinsics
- Unit testing, benchmarking and memory analysis
- Continuous integration and deployment using gitlab CI components
Libraries and Systems Phoenix is implemented in C++, Rust, and python. Each library is packaged with pixi to the conda format, enabling easy multi-platform builds and language-agnostic installation. This approach simplifies dependency management and deployment for users.
Phoenix packages mostly rely on the standard library of their language, but specific backend implementation often require additional dependencies (for instance the ZMQ socket backend requires ZMQ). Nanobind is used to wrap C++ code to python for consistent multi-language interfaces.
Continuous Integration and Deployment
Phoenix development heavily leverages continuous integration and deployment practices
Phoenix strives to follow robust software development practices and heavily leverages gitlab CI/CD components and pixi tasks to standardize and automatize as many development and maintenance tasks as possible.
- The entire codebase is version-controlled using semantic versioning.
- Continuous integration validates the code, which is thoroughly tested by unit tests usually covering over 90% of the code.
- Commit conventions enable automatic detection of new releases according to semantic versioning.
- Releases are built in CI/CD and deployed as conda packages and/or OCI containers, along with updated documentation.
- A renovate bot continuously monitors and updates dependencies, ensuring the codebase remains up to date. Code review is strongly encouraged.
Research Software Community and beyond
Phoenix core developers are working at LAPP, with the goal to support long-term research experiment data acquisition and data analysis software by enabling the development of modular, extensible and maintainable solutions. Phoenix is currently being used by the LST and CTAO collaboration for its real-time stereo analysis. However, being completely open-source and free-licensed, as well as easily extensible, new usage or contribution are always possible.
New contributors are very welcome and can join by proposing merge requests to any repository, requesting access to the phoenix GitLab group or any repository. Contributions to the LAPP owned repositories are encouraged and discussed with collaborators, with the final decision resting with the core maintainers. Building upon Phoenix in another forge is also encouraged and will be supported whenever possible. An overview of all Phoenix repositories is available in this README ; the main documentation is hosted on gitlab pages. Each repository has its own documentation hosted with gitlab pages in addition to their README. New contributors can start by reading the documentation and tests, they are also welcome to reach out to the core maintainer via issues or mail. In order to work on a phoenix repository, only installing pixi is required: other tools and dependencies will be downloaded and installed in isolated environments when running pixi tasks.
Available tools
Phoenix uses languages specific tools for quality/testing sometimes enhanced with custom tools
C++ phoenix projects make use of ctest to implement unit test. CMake utilities are provided by PhoenixCMake. Python repositories use pytest and ruff for testing and linting. Rust repositories rely on cargo.
All projects are packaged using pixi to the conda package format. pixi also ensures that the development and deployment environments are reproducible via the mandatory check-in of the lock files in source control. It also standardizes the most common development tasks such as building packages, running tests, rendering documentation... The packages are uploaded to 2 conda channels:
- phoenix for released versions
- phoenix-dev for development versions.
In addition, OCI containers are provided for applications and hosted in the projects container registries on gitlab. The projects documentation are written in LaTeX or markdown.
In addition, Phoenix provides some tools to help developing high quality software:
- arbitrary data serialization (used to write mock-ups files)
- built-in mock-up capability in Socket and Clocks enabling single-thread, latency-free integration tests.
- code generator for data classes from HDF5 or serialized format
- intrinsic abstractions for easier SIMD maintenance
- benchmarking tools to measure execution time of C++ routines
- Reporter tool aggregating results from maqao, valgrind, malt and benchmarks
- documentation generation from LaTeX or markdown
- gitlab CI/CD catalog relying on pixi tasks tasks to centralize CI/CD definitions.