kata to practice some python idioms. Based on the book Writing Idiomatic Python of Jeff Knupp.
This kata assumes you have basic knowledge of python and unit testing. The main objective is to practice python within pair programming and debate about different type of resolutions that come to minds due to the variety of reources the language provide. The steps to accomplish the kata are:
- Initial Status: All Test are in red ( except linter test)
- Work in pair programming or alone to put all the tests in green. Having in mind that
tests
package is immutable. - Delete the code.
The code is divided in two packages:
Kata
: Package that contains the logic of a Task Board, where the key concept is that we can add tasks to columns within a board and classify boards using tags. The rest of the logic will be describe via unit tests. This package is the one in wich we code to complete the kata.Tests
: Package containg the specification of the Board's logic using unit test and pytest library. This package is immutable when we are accomplishing the kata.
In order to run the code we can use:
-
The Makefile have predefined commands that runs in a docker container:
make build
: to build the containermake shell
: to run an interactive bash console inside the container.make test
: to run all the tests
-
Virtualenv:
Create and activate
python3 -m venv venv source venv/bin/activate EXPORT PYTHONPATH=<your_path>
Deactive
deactivate