Workflow - idaholab/HYBRID GitHub Wiki
Development workflow
Clone or update the repository
The first time, you need to install (clone) the repository together with RAVEN on your local machine (for instructions see here) or if you already have a clone, you just need to update it
cd hybrid
git pull
Create a new ticket in gitlab
First, a ticket needs to be created in gitlab under Issues describing the development. For this, click on Issues and then "+ New Issue" on the top right.
Under 'Choose a template', select 'ISSUE_TEMPLATE'. After that, fill in the title and the description of the issue. The work 'issue' is used in a very broad sense here, i.e. all new development, bug-fixes, enhancements, etc are 'issues'.
Finally, assign somebody to the issue (mostly this will be yourself) and select some labels. At least priority 'Normal', 'Critical' or 'Minor' has to be selected. Then submit the issue.
Create a new development branch
After that, a new branch of the repository from "devel" can be created:
cd hybrid
git checkout devel
git checkout -b username/branch_name
Download an existing development branch
cd hybrid
git fetch
git checkout username/branch_name
Do development
To edit files use
git add -u
and to create new files in the repository, use
git add new_file
git commit
Push
Note that this assumes that:
git config --global push.default simple
is used.
git push --set-upstream origin username/branch_name
After the first push, then:
git push
can be used.
Merge development back into devel from your development branch
Once your development is finished and you would like to make it part of the main branch, i.e. 'devel' of the HYBRID repository, a merge request can be submitted. Please consider that regression tests should be prepared before a merge request is submitted.
To submit a merge request, click on Merge Requests and then on "New merge request" on the top right. Then select the branch you pushed as source branch and 'devel' as target branch and click "Compare branches and continue".
Under 'Choose a template', select 'PULL_REQUEST_TEMPLATE'. After that, fill in the title and the description of the merge request.
Finally, assign somebody to the request (this can not be yourself!) and select some labels. At least priority 'Normal', 'Critical' or 'Minor' has to be selected. Then submit the merge request.
The assigned person can then review the request, i.e. go through the checklist that is part of the template. He can also add comments and start a discussion with the developer. The developer might have to make changes to his branch and push them again. The merge request will automatically detect mew pushes and report them on the merge request's web page. Furthermore it will automatically rerun the automatic regression tests.
Once the reviewer is happy and the check list is finished, the reviewer can click on 'merge' and merge the development branch into 'devel'. This finalizes a development cycle. Further new development will start with a new ticked (see above).