Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

edu-python-course/workout-template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workout: WORKOUT NAME

This is a template for the Python course workout activities. This repository is compatible with Replit IDE.

Template description

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.

Set up workout repository

Creating a new repository from template

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.

Protect master branch

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.

Providing workout materials

Please refer to the CONTRIBUTING guide for more details.

  1. Create a new topic branch (e.g. feature/workout).
  2. Provide the boilerplate module(s) within src/workout directory.
  3. Provide documentation for the workout within docs directory.
  4. Add test cases within tests directory (unittest preferably).

Making changes invisible for VCS

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>