Gitflow
All packages use Gitflow way of working. Please see the linked to resource for details on how to work in this style.
Specifically each package always has the main
branch
that is functioning and deployable.
How to add a feature / bugfix
- Create new branch from main, lets say we call it
feature_A
- Develop, commit, and push to
feature_A
- When you are done, make a draft PR from
feature_A
intomain
. This will trigger the CI/CD pipelines and checks to run. - Check the output of the CI/CD checks and make any requisit changes
to
feature_A
- Once the pipeline runs wihout any errors, mark your draft PR as ready for review and assign a reviewer
- When the PR is approved, chose the option to squash and merge your commits. Here you will have the option to summarize the changes that your feature/bug fix address.
- Delete the source branch (
feature_A
)
Definition of done
A feature branch is defined as done and ready for a PR (pull request) into main branch only once it has been properly tested. Please see the Quality Control vignette for more detailed information on what this entails. Briefly, testing consists of:
- Unit-tests to test the basic functionality
- Integration testing to ensure all features work together
- Passing the CI/CD
If you are developing, for example, a new statistical function for {chefStats} then it must be checked with unit tests.
Additionally, all previous unit-tests and integration tests need to
pass. You can check this by running devtools::test()
in the
respective packages.
Note: Integration testing mostly resides in the
ramnog package, so you will need to run devtools::test()
there as well
DevOps: Pre-commit and Git-actions
The ramnog ecosystem uses both pre-commit hooks and Git-Actions to ensure code quality and consistency.
Configuration for Pre-commit as well as Git-action workflows are hosted in the {ramnog} package and consumed by the other packages. Idealy, the DevOps configuration should be hosted in a seperate repository, but for now it is in the {ramnog} package.