Installation
To start using Dxtr you can choose one of the following three options:
- get it directly from PyPI using
pip, the main package installer for Python; - fetch the library from the mosaic channel on Anaconda using
conda, a package and environment management system that works on all major operating systems; - install the Python source files from the Inria's GitLab repository.
Only the last option provides direct access to the source files. This makes it the preferred method for anyone interested in exploring the library's implementation.
Use a Virtual Environment
We strongly recommend creating a virtual environment before installing Dxtr.
Virtual environments help isolate dependencies for specific projects, ensuring a clean and manageable Python environment.
If you are unfamiliar with virtual environments, you can refer to the Real Python guide here.
Install Python and pip first!
This method relies on the pip package management system.
If pip is not already installed on your machine, please follow the instructions here.
Once pip is succesfully installed on your machine (and a virtual environment is set up):
conda create -n dxtr # (1)
conda activate dxtr # (2)
pip install dxtr # (3)
dxtr virtual environment using conda
2. Activate the dxtr environment
3. Fetch the PyPI package
Note: In the example above we used conda to create a manage virtual environments, but you can adapt the procedure to any virtual environment manager by adapting the first two lines accordingly.
Install conda first!
This method relies on the conda package and environment management system.
If conda is not already installed on your machine, follow the instructions here.
Once conda is successfully installed on your machine:
conda create -n dxtr -c mosaic - c conda-forge dxtr # (1)
- Create the
dxtrvirtual environment, fetch thedxtrpackage using Conda, with dependencies given through themosaicandconda-forgechannels.
Install git first!
This method relies on the git tool.
If git is not already installed on your machine, follow the instructions here.
git clone https://gitlab.inria.fr/oali/dxtr.git #(1)
conda env create -f conda/env.yaml #(2)
conda activate dxtr #(3)
python -m pip install -e . #(4)
- Clone the package source code
- Create a new conda environment
- Activate the environment
- Install the package
Tests
Once the library is installed, we recommend running unit tests to ensure that all major features are functioning properly.
Be patient!
Running tests takes a few minutes depending on your machine.
cd dxtr #(1)
conda activate dxtr #(2)
conda list pytest #(3)
python -m pip install -e '.[test]' #(4)
pytest #(5)
- Move to the root of the
dxtrrepository. - Activate your
dxtrconda environment - Verify that the
pytestandpystest-covpackages are installed in your environment. If the packages
pytestandpytest-covare missing, you must install them in yourdxtrenvironment before proceeding.- Once
pytestis installed, run the test procedure at the root of the project. The test options are defined in thepyproject.tomlfile.
Note
Running tests is only required if you performed the gitlab procedure. If you installed the library directly from conda or pipy you can download and run the advanced examples notebooks to test your installation.