Naming Schemes¶
Django¶
Tests¶
Our test naming scheme is loosely based on this blog post and follows this format:
test__<unit_of_work>__<state_under_test>__<expected_behaviour>
Tests must be prefixed with test to be picked up by unittest,
the testing framework we are using in Django.
Example
test__events__save__exists_in_databasetest__update_seogd_awr__called_with_correct_date__exists_in_databasetest__update_seogd_awr__called_with_incorrect_date__no_changes
Draft
This naming scheme is currently a draft.
Git¶
Branch names¶
Branch names should follow this format:
<type>/<jira_id>
Where <type> is one of (feat, fix, or hotfix) and <jira_id> is the branches related JIRA ticket ID. This allows
branches to be automatically linked to JIRA tickets.
Example
Features are the most common type that is used. It used for general feature changes to the product, cleaning up tech debt, etc.
feat/CB-42feat/CB-123feat/CB-42-extra-information
Fixes are the second most common type. This is used for general bug fixes.
fix/CB-42fix/CB-123fix/CB-42-extra-information
Hotfixes are the least common type and should be used sparingly. A hotfix is used to signify this branch has additional time pressure when in PR etc (e.g. a live issue)
hotfix/CB-42hotfix/CB-123hotfix/CB-42-extra-information
Draft
This naming scheme is currently a draft.