Lukáš Kucharczyk
5eee7176d4
add streak-releted basic functionality
2024-09-04 21:58:56 +02:00
Lukáš Kucharczyk
5ef8c07f30
Initial working API
2023-11-30 17:35:44 +01:00
Lukáš Kucharczyk
c49177d63c
isort
2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk
5958cbf4a6
Add more tests
2023-11-10 21:34:36 +01:00
Lukáš Kucharczyk
3b37f2c3f0
Fix edge case in format_duration
...
continuous-integration/drone/push Build is passing
Details
Fixes #65
```python
def test_specific_precise_if_unncessary(self):
delta = timedelta(hours=2, minutes=40)
result = format_duration(delta, "%02.0H:%02.0m")
self.assertEqual(result, "02:40")
```
This test fails by returning "03:40" instead. The problem is in the way `format_duration` handles fractional hours.
To fix it, we need to switch between using hours and fractional hours
depending on if minutes are present in the formatted string.
2023-11-10 20:07:41 +01:00
Lukáš Kucharczyk
518c0ecd56
Add more time tests for fractional numbers
continuous-integration/drone/push Build is passing
Details
2023-10-13 17:01:33 +02:00
Lukáš Kucharczyk
56e5dfaa03
Rename project, part 2 ( #42 )
...
continuous-integration/drone/push Build is failing
Details
Reviewed-on: #42
2023-01-20 13:37:46 +00:00
Lukáš Kucharczyk
2f00be455d
Rename project ( #41 )
...
continuous-integration/drone/push Build is passing
Details
The old naming scheme was causing confusion and probably errors.
Reviewed-on: #41
2023-01-19 19:35:25 +00:00
Lukáš Kucharczyk
6fa049e1b1
Sort and clean up imports
2023-01-15 23:39:52 +01:00
Lukáš Kucharczyk
078f87687f
Make format_duration more robust
continuous-integration/drone/push Build is passing
Details
2023-01-09 22:48:09 +01:00
Lukáš Kucharczyk
b77089f7ad
Show playtime total on session list
...
continuous-integration/drone/push Build is passing
Details
Fixes #6
Fixes #25
2023-01-09 18:57:22 +01:00
Lukáš Kucharczyk
24f4459318
Avoid raising exception on format_duration(None)
...
Fixes #25
2023-01-09 16:14:01 +01:00
Lukáš Kucharczyk
4e67735de8
Fix negative playtimes being considered positive
2023-01-05 17:13:45 +01:00
Lukáš Kucharczyk
34ce1e9b05
Set up tests, add tests for common.util.time, add %d
continuous-integration/drone/push Build is passing
Details
2023-01-05 15:18:57 +01:00
Lukáš Kucharczyk
c57f969a00
Add tests for common.util.time
continuous-integration/drone/push Build is failing
Details
2023-01-05 11:52:50 +01:00