-
Notifications
You must be signed in to change notification settings - Fork 17
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
, alpha
, and beta
labels in the fermi conda channel. Do not use these labels unless you intend to test potential broken software!
To obtain the latest Fermitools alpha 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 conda-forge/label/cf201901 -c fermi/label/dev -c fermi fermitools
Similarly, use the alpha
or beta
label to get the latest beta release.
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 conda-forge/label/cf201901 -c fermi/label/<dev|alpha|beta> 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 (1.1.3 in this case) and the alpha or beta 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 1.1.3 py27h5b5c8cd_0 fermi/label/alpha
fermitools-data 0.16 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 conda-forge/label/cf201901 -c fermi fermitools=<VERSION>
or
conda install -c conda-forge/label/cf201901 -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 alpha or beta 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 conda-forge/label/cf201901 -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.
You shouldn't run the testing scripts unless we have specifically asked you to.
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 four testing scripts you can call are:
ST-unit-test
ST-AGN-thread-test-Unbinned
ST-AGN-thread-test-Binned
ST-pulsar-test
Note: When calling the ST-unit-test
script you must include the --bit64
flag, otherwise the script may not run correctly.
The AGN thread tests take quite a while to run, so please be patient.
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
.