This is a template for the Python course workout activities. This repository is compatible with Replit IDE.
This template comes with pre-configured test runner and documentation builder.
The workout sources root is src/workout directory. Any Python sources are
supposed to be placed here. In case, you want to name the installed package
something other than workout
- adjust tools.poetry.packages
property in
pyproject.toml file.
E.g.
[tool.poetry]
packages = [{ include = "workout", from = "src", to = "dicts" }]
will install the workout package as dicts
.
Press the Use this template
green button at the top.
This will lead you to the repository creation page. Provide a valid meaningful repo name and add its description.
There is no need to clone branches except master
. Default branch is always at
the most stable version.
It's important not to work within the default branch. So, ensure noone can
commit directly into master
. In Settings navigate to Branches under
the Code and automation section. Press Add branch protection rule
button.
Provide branch name pattern and check following options:
- Require a pull request before merging
- Do not allow bypassing the above settings
This will protect the default branch from committing directly into it. You may apply other protection rules, in case of need.
Create a branch protection rule.
Please refer to the CONTRIBUTING guide for more details.
- Create a new topic branch (e.g.
feature/workout
). - Provide the boilerplate module(s) within src/workout directory.
- Provide documentation for the workout within docs directory.
- Add test cases within tests directory (
unittest
preferably).
When a boilerplate code is ready, you may want to implement the actual logic for the assignment. It's useful for running tests especially. However, you do not want to put the implementation to the assignment repository.
To make changes inside a file invisible for Git use:
git update-index --assume-unchanged <file>
To switch it back:
git update-index --no-assume-unchanged <file>