2 Somehow friendly API to get and share coffee related data from database.
6 Scripts to be run by systemd timers should by as simple as possible, runnable,
9 There are no tests needed for runnables.
12 For running tasks periodically, please see [Timers][6] and [User][7] pages
13 about systemd on archlinux wiki.
15 The example `top5_mate_stats.service`:
18 Description=Run top 5 Mate drinkers stats
21 Environment=PYTHONPATH=/path/to/coffee-getter/repo/
22 ExecStart=/path/to/coffee-getter/repo/run/top5_mate_stats.py
25 The example `top5_mate_stats.timer`:
28 Description=Run top 5 Mate drinkers stats each Mon 9am
31 OnCalendar=Mon *-*-* 09:00:00
35 WantedBy=timers.target
38 Both files must be stored in `~/.config/systemd/user/` directory.
40 Then enable timer and service by:
42 systemctl --user enable top5_mate_stats.timer
43 systemctl --user enable top5_mate_stats.service
48 systemctl --user start top5_mate_stats.timer
53 For quick orientation see the [changelog][1].
55 Please, think about [The seven rules of a great Git commit message][2] when
56 making commit. The project use [OneFlow][3] branching model with the `master`
57 branch as the branch where the development happens.
60 Test Driven Development (TDD) is used in this project. Each *feature* **must**
61 start with adding test and all the tests **must** pass before merge to the
66 python3 -m unittest discover ut/
69 See [unittest][5] for start.
72 By default, sqlite3 `coffee.db` file is needed. You may create testing copy of
76 from ut.test_db import create_test_db
77 create_test_db("coffee.db")
81 Database is needed to pass the tests.
84 This project is developed under [GNU GPLv3 license][4].
87 [2]: https://chris.beams.io/posts/git-commit/
88 [3]: http://endoflineblog.com/oneflow-a-git-branching-model-and-workflow
90 [5]: https://docs.python.org/3.5/library/unittest.html
91 [6]: https://wiki.archlinux.org/index.php/Systemd/Timers
92 [7]: https://wiki.archlinux.org/index.php/Systemd/User