-
Notifications
You must be signed in to change notification settings - Fork 4
Testing the Fermitools
This page is for software testers of the Fermitools conda package. When testing these development tools, we recommend creating a separate conda environment to avoid overwriting your current installation.
We take special care to separate our testing versions and release candidates from the production code. These are stored in the dev, rc, and main (production) labels in the fermi conda channel. Do not use any other label strings since it will affect version numbering.
To obtain the latest Fermitools rc release and set it up in a fresh environment (which we will call fermi_dev but you can name whatever you want), use the command:
conda create -n fermi_dev -c fermi/label/rc -c fermi fermitools
Similarly, use the dev or main label to get the latest development/production versions.
After solving the environment, it may look like conda is going to install all the dependencies again, but if you already have a version the Fermitools installed, it will only download and install the changed ones.
You can then activate the new environment using
conda activate fermi_dev
If you already have a Conda environment set up that you would like to test in, you can install the tools directly into your active environment using the following command:
conda install -c fermi/label/<dev|rc|main> fermitools
You should then deactivate and reactivate the environment to make sure the changes take effect properly.
You can check which version you are using with the command conda list fermi. It should show the version we have asked you to test (2.5.1 in this case) and the dev/rc/main label in the channel column.
(fermi_dev) ~ % conda list fermi
# packages in environment at /Users/user/anaconda2/envs/fermi_dev:
#
# Name Version Build Channel
fermitools 2.5.1 py27h5b5c8cd_0 fermi/label/main
fermitools-data 0.18 0 fermi
You can get a list of the environments you have installed with the command conda env list or conda info --envs.
If you need to test a specific version of the Fermitools, you can specify the version by setting the name of the package to the version number:
conda create -n fermi_dev -c fermi fermitools=<VERSION>
or
conda install -c fermi fermitools=<VERSION>
Where <VERSION> is whatever version number you need to grab (e.g., 1.0.0). Note that in order to obtain a specific version of the Fermitools in this manner it MUST be available in the fermi Anaconda Cloud channel.
You can obtain specific versions of the dev or rc releases by including the appropriate label as described in the previous section.
To update an existing Fermitools installation simply activate the environment that the Fermitools are installed in (usually named fermi or fermi_dev) and run the following update command:
conda update -c fermi fermitools
This will grab and install the most recent compatible version of Fermitools from the fermi release channel.
When you are done testing, you can remove this environment with the command:
conda remove --name fermi_dev --all
Conda will show you a list of all the packages that it says will be removed, but any that are needed by another environment (e.g., another Fermitools version) won't actually deleted.
See Managing Environments for more information about conda environments.
The FSSC's unit testing scripts have been incorporated into their own package available via the fermi_dev_externals anaconda cloud channel. To obtain the scripts simply use the conda install command
conda install -c fermi fermitools-test-scripts
Note: The scripts will generate a large number of testing products so it is HIGHLY RECOMMENDED you run them from an empty directory created as a testing workspace. Otherwise you may end up polluting your working directory.
The 2 testing scripts you can call are:
ST-unit-test
ST-AGN-thread-test-Unbinned
Latest version of these tests are currently under ScienceTools/recipe/tests/ but will be moved to fermitools-test-scripts soon.
The AGN thread tests use to take a long time, but have been updated so they can be ran inside the CI/CD under 30 minutes.
The ST-unit-test script also tests the import of a number of python modules, a few of which are external to the Fermitools (namely pyds9). You will see import failures of these if you don't have them installed before running the script. They can be obtained via pip.