For documentation, examples, major changes, please consult the documentation site
Please use one of the latest stable versions of MOLA (in ONERA env): /stck/mola
- create a local directory named
MOLAand go into it:
mkdir /stck/$USER/MOLA
cd /stck/$USER/MOLA- clone the sources from GitLab:
git clone [email protected]:numerics/mola.gitMake sure that you have correctly set your public ssh Key onto your profile's preferences of ONERA GitLab.
- replace the newly created directory
molabyDev:
mv mola Dev- Replace paths directing to
lbernardby yours on filesenv_MOLA.shandTEMPLATES/job_template.sh(except the pathsEXTPYLIBandEXTPYLIBSATOR).
You may adapt this script to simplify this operation (just replace myMOLA and myMOLASATOR):
#!/usr/bin/sh
# Execute this script once when getting MOLA sources to adapt the files
# env_MOLA.sh and job_template.sh to your paths
# Do not commit these files !
# Before pushing your local branch to the GitLab, use the following command
# to get back these files in their original state :
# git checkout env_MOLA.sh && git checkout TEMPLATES/job_template.sh && chmod a+r env_MOLA.sh TEMPLATES/job_template.sh
# You amy create an alias for this command in your .bash_aliases
# MOLA version
MOLAVER='Dev'
# Custom paths for my dev version - TO MODIFY
myMOLA='/stck/tbontemp/softs/MOLA/$MOLAVER'
myMOLASATOR='/tmp_user/sator/tbontemp/MOLA/$MOLAVER'
################################################################################
################################################################################
# DO NOT MODIFY THE LINES BELOW
eval "myMOLAPATH=$myMOLA"
eval "myMOLASATORPATH=$myMOLASATOR"
# To be able to use your dev version on sator computation nodes, you must first
# to copy your dev done on /stck on /tmp_user/sator
# You may use the following command :
# rsync -rav $myMOLAPATH $myMOLASATORPATH
# MOLA paths of for the master version
MOLA='/stck/lbernard/MOLA/$MOLAVER'
MOLASATOR='/tmp_user/sator/lbernard/MOLA/$MOLAVER'
# Modify paths to my custom MOLA dev version
sed -i $myMOLAPATH/env_MOLA.sh -e "s|MOLA=$MOLA|MOLA=$myMOLA|"
sed -i $myMOLAPATH/env_MOLA.sh -e "s|MOLASATOR=$MOLASATOR|MOLASATOR=$myMOLASATOR|"
# Restore external librairies
sed -i $myMOLAPATH/env_MOLA.sh -e 's|MOLAext=/stck/lbernard/MOLA/$MOLAVER/ext|MOLAext=/stck/lbernard/MOLA/Dev/ext|'
sed -i $myMOLAPATH/env_MOLA.sh -e 's|MOLASATORext=/tmp_user/sator/lbernard/MOLA/$MOLAVER/ext|MOLASATORext=/tmp_user/sator/lbernard/MOLA/Dev/ext|'
# Modify paths to my custom MOLA dev version in the job template
sed -i $myMOLAPATH/TEMPLATES/job_template.sh -e "s|$MOLA|$myMOLA|"
sed -i $myMOLAPATH/TEMPLATES/job_template.sh -e "s|$MOLASATOR|$myMOLASATOR|"- Copy MOLA directory on your
satorspace:
cp -r /stck/$USER/MOLA /tmp_user/sator/$USER/MOLAFor making contributions, please follow these general rules:
- If never done, please configure your
gitusing your personal informations:
git config --global user.name "Georges Guynemer"
git config --global user.email [email protected]- create a new branch for your development:
git branch $USER-mydevname
git checkout $USER-mydevname- make your developments, and regularly update your sources onto GitLab:
Associate a commit short message to your major modifications:
git commit -m "this is a commit message"Important: Do not commit the files env_MOLA.sh and TEMPLATES/job_template.sh.
Before pushing your local branch to the GitLab, use the following command
to get back these files in their original state:
git checkout env_MOLA.sh && git checkout TEMPLATES/job_template.sh && chmod a+r env_MOLA.sh TEMPLATES/job_template.shYou may create an alias for this command in your .bash_aliases.
Update your sources towards GitLab:
git push origin $USER-mydevname- For each development, update your sator sources using:
rsync -var /stck/$USER/MOLA/Dev /tmp_user/sator/$USER/MOLA/-
Create preferrably light new examples using
EXAMPLESarborescence -
Before asking for the integration of your new developments into the
masterbranch of MOLA, please relaunch the cases contained inEXAMPLES(specially LIGHT ones) in order to verify that nothing is broken. -
After
commit+push, request a merge towardsmasterbranch using GitLab's web interface. You will be automatically notified by e-mail once MOLA's maintainer has integrated your contribution. -
You can update your own branch sources using master's branch with:
git pull origin masterThis is specially recommended once your development has been merged by MOLA's maintainer, or after major bug fixes.