Feature flow#
This project uses GitHub flow as it's main workflow model. Simplified visualization can be seen on graph below:
%%{init: { 'theme': 'forest' , 'themeVariables': {
'git0': '#4db85f',
'git1': '#49b391',
'git2': '#59a7ff',
'git3': '#d93261',
'git4': '#00ffff',
'git5': '#ffff00',
'git6': '#ff00ff',
'git7': '#00ffff'
} } }%%
gitGraph
commit tag:"0.0.0"
branch feature
checkout feature
branch private
checkout private
commit
commit
checkout feature
merge private
branch private2
checkout private2
commit
commit
checkout feature
merge private2
commit tag:"1.0.0"
checkout main
merge feature
Clone repository#
Hint
You can skip this step if you already have a clone
Checking out main branch#
Make sure we are on main
branch.
Pull changes from origin#
Hint
You can skip this step if you just cloned the repository
Create feature branch#
Create new branch for our feature called (replace with whatever you want)
feature_name
. feature/
prefix is required because of convention.
Check repository status#
Result should be similar to this:
Commit-test-push cycle#
Your work on a feature should be divided into many steps during which you will add new units to the system. Each unit should have a set of tests to verify its operation.
-
Formatting & Quality checks#
Run code quality checks with tox to quickly fix most obvious issues in your code.
-
Run test suite for Python interpreter versions you have locally#
Run test suites on available interpreters with
If the tests fail, you have to repeat steps 1 and 2. Omission of the corrections will result in your changes being rejected by the CI tests executed for the pull request.
-
Add all changes to staging area with#
You can list file paths instead of using the asterisk symbol if you know you can add many unwanted files. If these unwanted files regularly appear in the codebase, add them to the
.gitignore
file. -
Check staging area#
If any files staged for commit shouldn't be there, unstage them with
-
Commit changes#
Now use commit command to send changes to git history
This command will open text editor for you, waiting for commit description. You can use
to add commit title and omit long description. The commit title should not be longer than 50 characters.
-
Push changes to remote branch#
For each subsequent push from this branch, you can omit
-u origin feature/feature_name
Create pull request#
Visit pull requests and create PR for you feature. Read in GitHub docs about pull requests.
Request review & wait for CI checks#
Now you can request a pull request review, as it's described here. Before your changes can be merged into another branch, at least one person should see them, and share their thoughts about them with you. If you are prompted to make corrections, do so immediately and do not apply your changes without fixes. Go back to Commit-test-push.
You changes should also pass all tests ran by CI system (Github Actions). If the tests fail, corrections will also be required before continuing.
Merge PR#
After receiving a positive response from the reviewer and passing the tests, the pull request can be merged.