cms-PdmV / mcm_scripts

Repository holding examples of McM scripts
4 stars 15 forks source link

McM Scripts

Repository for using McM scripts and example scripts

How to run this

Prerequisite

Create an isolated virtual environment using a Python version >= 3.9 via:

python3.9 -m venv venv && source ./venv/bin/activate

Development version

If you want to set up a development environment to contribute to this project:

Install poetry and the required dependencies.

pip install poetry && poetry install

Run the test suite via: poetry run pytest -s -vv

[!IMPORTANT] Make sure your execution environment has a valid Kerberos ticket to consume CERN services!

Build package

If you just want to use this package in your own project, install it via:

pip install git+https://github.com/cms-PdmV/mcm_scripts.git@refactor/rest-client

Make sure to remove the sys.path.append(...) statements to avoid overloading old versions from AFS.

Basic info

SSO credentials

McM supports two authentication mechanisms: Session cookies and ID tokens

Session cookies

ID tokens

If you want to know more details about how it works, check the code available in rest.py module and its unit tests rest_test.py

Priority change