PyUGAT

Treffen vom 28. 2. 2018

Agenda

Anwesenheitsliste

Programm

Dojo

Minimal test example:

# minimal.py
import pytest


def fun():
    return False


def test_fun():
    assert fun()


if __name__ == '__main__':
    pytest.main([__file__, '--doctest-modules'])

You execute the script directly or do $ pytest minimal.py to run the tests.

Round I

Implement from scratch:

Gilded Rose Requirements Specification

Please note that this specification as well as the exercise itself it based on the Gilded Rose Refactoring Kata by Emily Bache.

Hi and welcome to team Gilded Rose. As you know, we are a small inn with a prime location in a prominent city ran by a friendly innkeeper named Allison. We also buy and sell only the finest goods. Unfortunately, our goods are constantly degrading in quality as they approach their sell by date. After having attended workshop "Nutzen Sie die Chancen der Digitalisierung" by Wirtschaftskammer Wien we are entrusting you to implement a system that updates our inventory for us.

Here is what this system is supposed to do:

To be more specific, we require the following:

Optional:

Just for clarification, an item can never have its quality increase above 50, however "Sulfuras" is a legendary item and as such its quality is 80 and it never alters.

Due to technical requirements (*mia hom des imma scho so g'mocht*), you are are asked to put both your module as well as test code into one single file.

Round II

Copy-paste your code to these etherpads. Each row is a team, counting starts at the screen; left and right while looking at the screen. Continue with the code from your neighbouring team. ;)

Team 1

Team 2

Team 3

Team 4

Gilded Rose Requirements Specification II

Hi and welcome to team Gilded Rose. As you know, we are a small inn with a prime location in a prominent city ran by a friendly innkeeper named Allison. We also buy and sell only the finest goods. Unfortunately, our goods are constantly degrading in quality as they approach their sell by date. We have a system in place that updates our inventory for us. It was developed by a no-nonsense type named Leeroy, who has moved on to new adventures. Your task is to add the a few new feature to our system.

Please see above for the original specification.

We require the following:

Although we believe in the odour of "Aged Brie", we think code should not smell. If, while updating our code base, you stumble upon implementation details that do not meet your high standards, please refactor.

Notes for the ambitious developer

Diskussions- und Plauderrunde


CategoryShownotes

PyUGAT: Treffen/2018-02 (last edited 2018-02-28 19:11:48 by ClausAichinger)