Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meadsteve/cafefikakata
☕ TDD Kata for python focusing around types&mypy
https://github.com/meadsteve/cafefikakata
kata mypy python3 tdd
Last synced: 5 days ago
JSON representation
☕ TDD Kata for python focusing around types&mypy
- Host: GitHub
- URL: https://github.com/meadsteve/cafefikakata
- Owner: meadsteve
- Created: 2019-05-26T08:47:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-21T06:03:28.000Z (over 3 years ago)
- Last Synced: 2024-10-11T03:11:15.089Z (about 1 month ago)
- Topics: kata, mypy, python3, tdd
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cafe Fika Kata
## Setup
Locally run `pipenv install`. If you don't have pip installed
you'll need to run `pip install pipenv` first.Once this is setup run `./test.sh`
## Kata Requirements
### Requirement One - Pricing
We want to be able to find out the price of some simple itemsCoffee - 5kr
Fancy Coffee - 8kr
Kanelbulle - 10kr### Requirement Two - Basket shopping
We get a list of items from the customer.
What's the total?### Requirement Three - Different cafes have different prices
Extend the above so we can have multiple shops with
different prices### Requirement Four - Stock levels
A cafe has limited stock. When it's sold out orders can't be
placed for that time.### Requirement Five - Closing down
When a cafe has no stock of any kind it closes down.### Requirement Six - Let's take fika international
All the previous requirements dealt in Krona.
Now we want to launch in new countries. Each cafe
should only work in a single currency.### Requirement Seven - Special offers
There's now a special offer on the bullar.
If a customer buys 3 they only pay 25kr.## Considerations
Part of the focus of this Kata is using the type system
with mypy.When defining your functions and classes start to think
about what types they will receive and output. Dataclasses
added in 3.7 can also help with this.