... | ... | @@ -52,6 +52,36 @@ In this section we list few most important DM commands that can be used from a t |
|
|
$ dm-delete-user-experiment-role --username=d225159 --experiment=test-lscat-01 --role=User
|
|
|
```
|
|
|
|
|
|
## Python API
|
|
|
|
|
|
The DM Python API documentation is located in the /home/dm_bm/production/doc/html folder, while some simple examples can be found under the /home/dm_bm/production/examples directory.
|
|
|
|
|
|
|
|
|
1. After sourcing the DM setup file, DM Python will be in user's path and DM Python APIs will be in user's PYTHONPATH environment variable.
|
|
|
```
|
|
|
$ # This command brings up the DM API documentation
|
|
|
$ firefox /opt/dm/production/doc/html/index.html
|
|
|
$ # Retrieve list of existing experiments
|
|
|
$ python -c "from dm import ExperimentDsApi; api = ExperimentDsApi(); print(api.getExperimentsByStation())"
|
|
|
```
|
|
|
1. DM Python APIs can also be installed in a Conda environment:
|
|
|
```
|
|
|
$ # Install conda in a fresh terminal with a clean environment.
|
|
|
$ # Do NOT source regular DM setup file.
|
|
|
$ curl -o Miniconda3-latest-Linux-x86_64.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
|
|
$ sh Miniconda3-latest-Linux-x86_64.sh -b -p $PWD/CONDA
|
|
|
|
|
|
$ # Install conda DM API package
|
|
|
$ export PATH=$PWD/CONDA/bin:$PATH
|
|
|
$ conda install -c aps-anl-tag aps-dm-api
|
|
|
|
|
|
$ # Source dm.conda.setup.sh file, which does not modify PYTHONPATH environment variable
|
|
|
$ source /opt/dm/etc/dm.conda.setup.sh
|
|
|
|
|
|
$ # Retrieve list of existing experiments
|
|
|
$ python -c "from dm import ExperimentDsApi; api = ExperimentDsApi(); print(api.getExperimentsByStation())"
|
|
|
```
|
|
|
|
|
|
|
|
|
## System Administration
|
|
|
|
... | ... | |