generated from NOAA-OWP/owp-open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
2. Development Conventions
GuyLitt-NOAA edited this page Jan 29, 2025
·
9 revisions
This project uses the following coding styles, unit testing packages, and docstrings. New contributions to the code repository should follow these conventions.
- Please read pep8 style guide and raise any concerns
- google python style guide
- unit testing: unittest
- docstring convention: sphinx
- MUST use namespacing for all external functions, e.g. the dplyr:: in
dplyr::filter()
- tidyverse style guide
- google R style guide
- docstring: roxygen2 documentation
- unit testing: testthat
Run the dependency_grapher.R to interactively visualize the package layout. Note proc_attr_wrap
is deprecated.
- Name objects in R and python using the same name used in yaml config files to avoid confusion when reading R and python code
As a best practice, follow the semantics of conventional commits
The dev
branch represents the latest developments prior to merging into main
.
- Procedure to avoid the growing commit list, in the case that NOAA-OWP/formulation-selector is the origin. Alternatively this may be upstream instead depending on how you have your repos set up. You may determine upstream vs origin usage with
git remote -v
git checkout dev git fetch origin git rebase origin/main
In the case of RaFTS, say we want to make sure a feature branch is based on dev in your upstream repo, then it may look like this:
git checkout -b feature_branch dev
git fetch upstream
git rebase upstream/dev