Installation guide¶
Pixi is the recommended tool to install PhoenixSerializer.
It is a modern package and environment manager designed for reproducible and multi-language software development based on the conda(-forge) ecosystem.
It allows to be develop, manage and distribute libraries on major platforms with a unified workflow regardless of the programming language or the operating system.
User installation¶
PhoenixSerializer packages are hosted at https://prefix.dev/channels/phoenix.
To use a library or tool, add the phoenix channels to your pixi workspace, then add the package dependency:
# This adds the Phoenix channels to existing channels in the workspace
pixi workspace channel add https://prefix.dev/phoenix
# Add the package_name dependency
pixi add phoenixserializer # (1)!
- To add the package to a specific
featureorenvironment, use-f <feature>or-e <environment>.
You workspace manifest should then look like
[workspace]
channels = [
"conda-forge", # Phoenix libraries build upon the conda-forge distribution
"phoenix", # Phoenix channel giving priority to stable versions
]
[dependencies]
phoenixserializer = ">=1.0.0,<2.0.0" # You can adapt the version range to your needs
You also have a pixi.lock file that contains the detailed information of all packages in your workspace, allowing to exactly reproduce the environment in the future.
Workspace initialization
You can initialize a pixi workspace with pixi init in an empty directory. It will use the conda-forge channel by default.
Developer installation¶
Phoenix libraries are developed using Pixi to manage development environments and tasks. Installing a library from sources is done with pixi install:
git clone git@gitlab.in2p3.fr:CTA-LAPP/PHOENIX_LIBS2/serialize-io/phoenixserializer.git PhoenixSerializer
cd PhoenixSerializer
pixi install --frozen # frozen to use exact environment in checked out lock file
PhoenixSerializer is then installed with its dependencies in an isolated pixi environment in .pixi.
You can list developments tasks with:
Check that the installation works with:
Development packages¶
In order to test PhoenixSerializer interface with another package, it can be convenient to install a revision that is not yet released.
To facilitate this, CI/CD pipelines build and publish "branch" packages: packages corresponding to each branch head in the source code repository.
These packages are published to a "development channel": https://prefix.dev/phoenix-dev, so installing a development version simply amounts to:
pixi workspace channel add https://prefix.dev/phoenix-dev
pixi add "phoenixserializer==1.0.0+main" # 1.0.0+main is a specific package version: branch versions are the latest release in the history + the branch name (sanitized).
Installing packages from source¶
To develop the interface of 2 (or more) packages simultaneously, it is also possible to install both packages from source using pixi's "path dependencies":
mkdir test_interface && cd test_interface
pixi init
pixi workspace channel add https://prefix.dev/phoenix https://prefix.dev/phoenix-dev # (1)!
git clone git@gitlab.in2p3.fr:CTA-LAPP/PHOENIX_LIBS2/serialize-io/PhoenixSerializer.git PhoenixSerializer
pixi add --path PhoenixSerializer
# add the packages to test the interface with in the workspace. It can also be added from sources for joint development.
- Add both development and release channels to the workspace so PhoenixSerializer dependencies can be found. Adding the release channel first gives it priority.