Installation
Simple use
Use pip to install this package,
pip install lisainstrument
Development
We use poetry to manage development environment. To set up a development environment
Install poetry
Clone repository
git clone https://gitlab.in2p3.fr/lisa-simulation/instrument.git
cd instrument
Set up environment, optionally including Jupyter
poetry install --with notebooks
Running commands, e.g. tests
poetry run pytest
User manual
For any commit, the manual is build in the CI pipeline and made available as artifact. To build the user manual locally, use
poetry install --with doc
poetry run make -C docs html
The start page will be created in docs/_build/html/index.html.
Commandline interface
Besides the Python interface for use in Python scripts and notebooks, there is now an experimental commandline interface. It allows to run a simulation with parameters stored in a YAML file. See
lisainstrument --help
or, equivalently
python -m lisainstrument --help
when it was pip-installed. For the poetry development environment, prefix the command with poetry run.
Containerized
There is an experimental Dockerfile in the /docker folder. Building the docker file Dockerfile_git fetches the latest commit of the branch it is from directly from gitlab (not the local repo clone).
The user inside the container is lisauser with home directory /home/lisauser.
The entrypoint is the lisainstrument commandline interface, meaning one can use the container in place of the lisainstrument command. To get the results, one needs to provide a path pointing to either a volume or a bind-mount to a host folder.
We recommend podman to run docker container locally for development. Podman is also used for testing the dockerfile, but it should work with docker as well. The minimal example below just prints the usage instructions and version.
cd docker
podman build -f Dockerfile_git -t lisainstrument:justtesting
podman run lisainstrument:justtesting --help
podman run lisainstrument:justtesting --version