Difference between revisions of "Imperial DIRAC Development"
From GridPP Wiki
Line 54: | Line 54: | ||
</pre> | </pre> | ||
All good ? Now push your changes back to git. | All good ? Now push your changes back to git. | ||
+ | |||
+ | |||
+ | '''Committing code back to DIRAC''' | ||
+ | |||
+ | A note on DIRAC commit messages: These must start with "fix:", "feat:" or "docs:". | ||
+ | |||
+ | Pull requests must start with the release in [] in the title: "[8.0] Make everything better". |
Revision as of 10:50, 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
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.
Committing code back to DIRAC
A note on DIRAC commit messages: These must start with "fix:", "feat:" or "docs:".
Pull requests must start with the release in [] in the title: "[8.0] Make everything better".