Imperial DIRAC Development
From GridPP Wiki
Revision as of 10:42, 9 November 2022 by Daniela Bauer 7cecb7c591 (Talk | contribs)
So you need to patch things .....
Installing UI in development mode
Example: Testing the branch 'comdirac_merge' agaist diracdev.
git clone git@github.com:ic-hep/DIRAC.git cd DIRAC git checkout comdirac_merge cd .. curl -LO https://github.com/DIRACGrid/DIRACOS2/releases/latest/download/DIRACOS-Linux-$(uname -m).sh bash DIRACOS-Linux-$(uname -m).sh rm DIRACOS-Linux-$(uname -m).sh source diracos/diracosrc pip install -e DIRAC dirac-proxy-init -x -N dirac-configure -F -S GridPP -C dips://diracdev.grid.hep.ph.ic.ac.uk:9135/Configuration/Server -I
Building readthedocs locally
source diracos/diracosrc cd DIRAC/docs/source micromamba create -n docs -f environment.yml micromamba activate docs export READTHEDOCS=True python -m sphinx -T -E -W --keep-going -b html -d _build/doctrees -D language=en . _build/html
When finished copy the html directory somewhere easily accessible by the internet.
pylint
pylint-3 --rcfile .pylintrc src/DIRAC/Interfaces/scripts/dls.py
Not ideal, but will catch most problems.
Blacking your files (low key approach)
File to be formatted: src/DIRAC/Interfaces/scripts/dls.py This is for v8 onwards, so we are only interested in py3.
source diracos/diracosrc cd DIRAC git status (Find files you want to black. Do a commit if you think black might mangle your files beyond recovery.) pip install black (if not done previously) black -t py39 -l 120 src/DIRAC/Interfaces/scripts/dls.py if black has reformatted your file: git diff src/DIRAC/Interfaces/scripts/dls.py
All good ? Now push your changes back to git.