Skip to content

kata to practice some python idioms. Based on the book Writing Idiomatic Python of Jeff Knupp.

License

Notifications You must be signed in to change notification settings

gardenunez/idiomatic-python-kata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kata: Idiomatic python

kata to practice some python idioms. Based on the book Writing Idiomatic Python of Jeff Knupp.

Running the kata

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:

  1. Initial Status: All Test are in red ( except linter test)
  2. Work in pair programming or alone to put all the tests in green. Having in mind that tests package is immutable.
  3. Delete the code.

Code Structure

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.

Environment

In order to run the code we can use:

  1. The Makefile have predefined commands that runs in a docker container:

    • make build: to build the container
    • make shell: to run an interactive bash console inside the container.
    • make test: to run all the tests
  2. Virtualenv:

    Create and activate

    python3 -m venv venv
    source venv/bin/activate
    EXPORT PYTHONPATH=<your_path>
    

    Deactive

    deactivate
    

About

kata to practice some python idioms. Based on the book Writing Idiomatic Python of Jeff Knupp.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published