Difference between revisions of "Imperial DIRAC Development"

From GridPP Wiki
Jump to: navigation, search
Line 29: Line 29:
 
</pre>
 
</pre>
 
When finished copy the html directory somewhere easily accessible by the internet.
 
When finished copy the html directory somewhere easily accessible by the internet.
 +
 +
 +
 +
'''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.
 +
<pre>
 +
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
 +
</pre>
 +
All good ? Now push your changes back to git.

Revision as of 10:33, 9 November 2022

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

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.


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.