= Treffen vom 28. 2. 2018 = * [[http://www.meetup.com/PYUGAT/events/247967976/|Meetup-Seite zu diesem Treffen]] == Agenda == * Begrüßung * Metalab * Vorstellungsrunde * [[FrontPage|Wiki]], MailingLists, [[https://twitter.com/pyugat|Twitter]], [[http://www.meetup.com/PYUGAT/|Meetup]], [[http://webchat.freenode.net/?channels=%23pyugat|IRC: #pyugat on freenode]], [[https://flattr.com/thing/1804445/Python-User-Group-Austria|Flattr]] * Anwesenheitsliste pflegen * Am Wiki anmelden & [[CategoryHomepage|persönliche Seite]] anlegen (Kontaktinfos, Name, Interessen, Foto,…) * Mögliche Themen in [[FutureTalks]] eintragen * Nächsten Termin festlegen * Events * Buchbesprechungen? * [[Jobs|Job-Börse]] * Zeiteinteilung für den Abend festlegen * Wer hat Kurzvorträge mitgebracht? * Groben Zeitplan für Hauptvortrag festlegen == Anwesenheitsliste == * ''tbd'' == Programm == * Haupt-Aktivität: PythonDojo * ''Trag' hier '''deinen''' Kurzvortrag und Namen ein! :)'' == Dojo == Minimal test example: {{{ #!/usr/bin/env python3 # 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 [[https://github.com/emilybache/GildedRose-Refactoring-Kata|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 [[https://www.wko.at/service/w/innovation-technologie-digitalisierung/Digital-Service-der-WK-Wien.html|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: * All items have a "sell in" value which denotes the number of days we have to sell the item * All items have a "quality" value which denotes how valuable the item is * At the end of each day our system lowers both values for every item To be more specific, we require the following: * Once the sell by date has passed, quality degrades twice as fast * The quality of an item is never negative * "Aged Brie" actually increases in quality the older it gets * The quality of an item is never more than 50 * "Sulfuras", being a legendary item, never has to be sold or decreases in quality Optional: * "Backstage passes", like aged brie, increases in quality as its sell in value approaches; more precisely quality increases by 2 when there are 10 days or less and by 3 when there are 5 days or less but quality drops to 0 after the concert 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 * [[https://piratenpad.de/p/ZVC4oR3xp5sjJZJFsy9rq|left]] * [[https://piratenpad.de/p/G6WPwazDS06lcuxeak|right]] Team 2 * [[https://piratenpad.de/p/XiWRAq9b0LCwwTWRFIXJtz|left]] * [[https://piratenpad.de/p/BYdKeG8K4V|right]] Team 3 * [[https://piratenpad.de/p/5vjywiSmkAS49NHVaG0|left]] * [[https://piratenpad.de/p/gxbUuWPzMtJTWy9sa3|right]] Team 4 * [[https://piratenpad.de/p/UD8yLDdGBt1|left]] * [[https://piratenpad.de/p/f7s1m5maKjq3Ei|right]] ===== 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: * Due to popular demand, we now sell "Conjured" items that degrade in quality twice as fast as normal items. * After doing some research we realized that we could as well provide expiration dates that specify each items sell by date. Update our system accordingly. 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 ====== * We have heard that [[https://coverage.readthedocs.io/en/coverage-4.5.1/|Coverage.py]] (also available as a [[https://github.com/pytest-dev/pytest-cov|pytest plugin]], which reports test-covered code lines can aid the refactoring process. * Although it might me informative to implemente date-time functionality from scratch, the [[https://docs.python.org/3/library/datetime.html|datetime]] library is your friend. == Diskussions- und Plauderrunde == * ''tbd'' ---- CategoryShownotes