Repository for using McM scripts and example scripts
Create an isolated virtual environment using a Python version >= 3.9 via:
python3.9 -m venv venv && source ./venv/bin/activate
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!
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.
McM supports two authentication mechanisms: Session cookies and ID tokens
auth-get-sso-cookie
command line tool to generate it:
auth-get-sso-cookie --url https://cms-pdmv-dev.web.cern.ch/mcm/ -o dev-cookie.txt
auth-get-sso-cookie --url https://cms-pdmv-prod.web.cern.ch/mcm/ -o prod-cookie.txt
auth-get-sso-cookie
is already available in lxplus nodesMcM(id='oidc')
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
voms-proxy-init -voms cms
export X509_USER_PROXY=$(voms-proxy-info --path)