Skip to content

installation

The installation of the local code git repository is made via ansible.

Note

In role bliss task local_bliss_code.yml

Repository is generated by cookicutter (https://gitlab.esrf.fr/bliss/cookiecutter) :

docs/
idXX/
tests/
.gitignore
.gitlab-ci.yml
LICENSE
MANIFEST.in
README.rst
setup.cfg
setup.py
README.rst

usage

Local code has to be put in ~/local/idXX.git/idXX/ directory.

Example: ~/local/idXX.git/idXX/bl_utils.py

import time

def align_the_beamline():
    print("I'm aligning the beamline")
    print("please wait...")
    time.sleep(0.5)
    print("...beamline aligned")

It can then be easily used in a BLISS session:

Example

from idXX.bl_utils import align_the_beamline

align_the_beamline()

local code management

manual installation

If you want to create such a repo without running ansible, here is a short recipe:

Just replace all XX by your Beamline number.

manual execution of roles/bliss/tasks/local_bliss_code.yml

  • Ensure /users/blissadm/local/idXX.git does not exist
ll /users/blissadm/local/idXX.git
git ls-remote git@gitlab.esrf.fr:idXX/idXX.git
X11 forwarding request failed on channel 0

remote: 
remote: ========================================================================
remote: 
remote: The project you were looking for could not be found or you don't have permission to view it.
remote: 
remote: ========================================================================
remote: 
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

In a conda env:

pip install cookiecutter

cookiecutter --no-input --output-dir=/users/blissadm/local/ git@gitlab.esrf.fr:bliss/cookiecutter.git beamline=IDXX root_name=idXX.git

cd /users/blissadm/local/idXX.git/

git init

git add .

git remote add origin git@gitlab.esrf.fr:idXX/idXX.git