@@ -5,95 +5,26 @@ This is a package with an API for signal access and processing for the LHC Signa
The API documentation is available at <https://sigmon.docs.cern.ch/api>
The User Guide is available at <https://sigmon-docs.web.cern.ch/>
The User Guide is available at <https://sigmon.docs.cern.ch/>
## Installation
There are two ways of using the API in your code:
1. Loading preinstalled packages from an EOS project folder (in SWAN environment)
2. Manual installation (in any environment)
:warning: The project is currently under heavy refactoring and the documentation could be outdated. Please try the exemplary notebooks and don't hesitate to contact us at <lhc-signal-monitoring@cern.ch> if you have any doubts.
The first option guarantees the use of the most recent code version without manual installation. The second one is more time consuming, however, works in environments with no access to the EOS folder (e.g., Apache Airflow scheduler). In addition, the second method allows to install a selected version (`pip install package_name=version`).
### Manual Installation
In order to use the API, it has to be installed with a python package installer as
## Installation
To install the `lhcsmapi` package with all the dependencies, you will need to setup a Python `venv` with access to the ACC-PY package repository.
Check the latest version at <ahref="https://pypi.org/project/lhcsmapi/">https://pypi.org/project/lhcsmapi/</a>
The API relies on several external python packages which have to be installed in a similar manner. The list of packages is stored in the <u><i>requirements.txt</i></u> file.
If you use SWAN, the service provides a set of pre-installed python packages through CVMFS. The LHC-SM notebooks require installation of several additional packages on top of CVMFS. In order to install a package, please open a SWAN Terminal by clicking [>_] icon in the top right corner.
Please note that the first four packages (tzlocal, tqdm, influxdb, plotly) have to be installed only once while the last one is still in the development phase and subject to frequent updates. Please send us an e-mail request (mailto:lhc-signal-monitoring@cern.ch) if you want to subscribe for updates. In order to update the lhcsmapi package, please execute the following command.
```
$ pip install --user --upgrade lhcsmapi
```
### Known Issues
At times, in order to update the lhcsmapi package one has to execute the command
```
pip install --user --upgrade lhcsmapi
```
twice while using the SWAN terminal (cf. an error message in the figure below).
In case this command returns an error, please try to execute it again. Should that operation also fail, please uninstall the package by executing
```
$ pip uninstall lhcsmapi
```
and performing a fresh installation the package
```
$ pip install --user lhcsmapi
```
:pencil: The library is available on EOS in the form of preinstalled packages so it can be loaded e.g. on SWAN. Please consult the `lhc-sm-hwc` README for the instructions.
Should you experience any further issues with installing a package, please contact <ahref="https://swan.web.cern.ch">SWAN support</a> or use the preinstalled package with the environment script.
### NXCALS Access with SWAN
## NXCALS Access
The API allows to perform a query of signals from PM and NXCALS. The NXCALS database requires an assignment of dedicated access rights for a user.
If you want to query NXCALS with the API, please follow a procedure below on how to request the NXCALS access.
If you want to query NXCALS with the API, please request the access following the procedure described in http://nxcals-docs.web.cern.ch/current/user-guide/data-access/nxcals-access-request/. You will need WinCCOA and CMW systems in the PRO environment.
1. Go to http://nxcals-docs.web.cern.ch/current/user-guide/data-access/nxcals-access-request/ for most updated procedure
2. Send an e-mail to mailto:acc-logging-support@cern.ch with the following pieces of information:
- your NICE username
- system: WinCCOA, CMW
- NXCALS environment: PRO
Optionally one can mention that the NXCALS database will be accessed through SWAN.
Once the access is granted, you can use NXCALS with SWAN.
\ No newline at end of file
Once the access is granted, you can query NXCALS. Please note that you need an active Kerberos ticket.