Commit Graph

390 Commits

Author SHA1 Message Date
Lukáš Kucharczyk 07452d8c43 Re-instance gitea actions
Django CI/CD / test (push) Failing after 34s Details
Django CI/CD / build-and-push (push) Has been skipped Details
2023-11-16 16:51:52 +01:00
Lukáš Kucharczyk 229a79d266 Update .drone.yml testing
continuous-integration/drone/push Build is failing Details
2023-11-16 16:30:17 +01:00
Lukáš Kucharczyk c6ed577fe3 Formatting
continuous-integration/drone/push Build is failing Details
2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk 171e4779a3 Move static files in prod 2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk 79f94e5984 Fix docker-compose.yml 2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk ccebcb89c6 Improve Dockerfile
Major inspiration (aka direct theft) from https://github.com/wemake-services/wemake-django-template
2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk fe0a6b39e3 Fix .dockerignore 2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk 6a495f951f Remove Django admin 2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk c8646d0a0c Update dependencies 2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk f2bb15e669 Fix naive date 2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk c49177d63c isort 2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk bd8d30eac1 Improve time-related stuff
Add created_at to all models
Add modified_at to Session
Get rid of custom now() function
Make sure aware datetime is used everywhere
2023-11-16 16:27:41 +01:00
Lukáš Kucharczyk c44d8bf427 Improve time-related stuff
continuous-integration/drone/push Build is passing Details
Add created_at to all models
Add modified_at to Session
Get rid of custom now() function
Make sure aware datetime is used everywhere
2023-11-15 19:14:09 +01:00
Lukáš Kucharczyk 3f037b4c7c Only allow choosing purchases of selected edition
continuous-integration/drone/push Build is passing Details
2023-11-15 14:25:42 +01:00
Lukáš Kucharczyk 8783d1fc8e Name and related_purchase validation for non-games 2023-11-15 13:04:47 +01:00
Lukáš Kucharczyk 9a1d24dbfd Sort imports, remove cruft 2023-11-15 12:19:31 +01:00
Lukáš Kucharczyk 4720660cff Fix wrong playrange ordering 2023-11-15 10:40:52 +01:00
Lukáš Kucharczyk e158bc0623 Improve how editions and purchases are displayed
continuous-integration/drone/push Build is passing Details
2023-11-15 10:37:24 +01:00
Lukáš Kucharczyk 8982fc5086 Game View: order editions by year 2023-11-14 21:19:36 +01:00
Lukáš Kucharczyk 729e1d939b Version 1.5.1
continuous-integration/drone/push Build encountered an error Details
2023-11-14 21:10:42 +01:00
Lukáš Kucharczyk 2b4683e489 Improve and cleanup ConditionalElementHandler 2023-11-14 21:09:43 +01:00
Lukáš Kucharczyk cce810e8cf Improve purchase __str__ 2023-11-14 19:55:56 +01:00
Lukáš Kucharczyk 62cd17f702 Disallow choosing non-game purchase as related purchase 2023-11-14 19:55:19 +01:00
Lukáš Kucharczyk f31280c682 Version 1.5.0
continuous-integration/drone/push Build is passing Details
2023-11-14 19:31:17 +01:00
Lukáš Kucharczyk a745d16ec3 Order purchases by date on game view 2023-11-14 19:30:19 +01:00
Lukáš Kucharczyk ae079e36ec Add purchase types 2023-11-14 19:27:00 +01:00
Lukáš Kucharczyk c8a3212b77 CI: run migrations before tests
continuous-integration/drone/push Build was killed Details
2023-11-12 08:11:22 +01:00
Lukáš Kucharczyk d211326c3f Make sure empty stats are 0
continuous-integration/drone/push Build is failing Details
2023-11-12 08:01:12 +01:00
Lukáš Kucharczyk 270a291f05 Change stats years to 2000 up to current year 2023-11-12 07:50:12 +01:00
Lukáš Kucharczyk 13b750ca92 Add stat for finished this year's games 2023-11-12 07:40:29 +01:00
Lukáš Kucharczyk 015b6db2f7 Fix detecting manual durations
continuous-integration/drone/push Build is failing Details
2023-11-11 15:02:28 +01:00
Lukáš Kucharczyk 667b161fff Remove deprecated USE_L10N
continuous-integration/drone/push Build is failing Details
2023-11-10 21:37:13 +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 4517ff2b5a Fix ordering
continuous-integration/drone/push Build is passing Details
2023-11-09 21:43:17 +01:00
Lukáš Kucharczyk 884ce13e26 Also prefill year between game and edition
continuous-integration/drone/push Build is passing Details
2023-11-09 21:20:12 +01:00
Lukáš Kucharczyk dd219bae9d Version 1.4.0
continuous-integration/drone/push Build is passing Details
2023-11-09 21:11:43 +01:00
Lukáš Kucharczyk 60d29090a1 Adding new games is easier 2023-11-09 21:11:28 +01:00
Lukáš Kucharczyk 1bc3ca057b Refactor, remove cruft 2023-11-09 19:35:57 +01:00
Lukáš Kucharczyk c2c0886451 Add backlog decrease count 2023-11-09 19:15:49 +01:00
Lukáš Kucharczyk b0be7b5887 Fix sort names getting mangled
continuous-integration/drone/push Build is passing Details
2023-11-09 15:41:46 +01:00
Lukáš Kucharczyk 099d989f16 Pre-fill year when adding edition 2023-11-09 15:20:30 +01:00
Lukáš Kucharczyk a879360ebd UX improvements
continuous-integration/drone/push Build is passing Details
* ignore English articles when sorting names
  * added a new sort_name field that gets automatically created
* automatically fill certain values in forms:
  * new game: name and sort name after typing
  * new edition: name and sort name when selecting game
  * new purchase: platform when selecting edition
2023-11-09 14:49:00 +01:00
Lukáš Kucharczyk 866f2526e6 Fix hardcoded year 2023-11-09 10:10:44 +01:00
Lukáš Kucharczyk ce3c4b55f0 Order devices alphabetically on new session form
continuous-integration/drone/push Build is passing Details
2023-11-09 10:09:32 +01:00
Lukáš Kucharczyk c52cd822ae Use safe_division in more places 2023-11-09 10:06:14 +01:00
Lukáš Kucharczyk cdc6ca1324 Fix potential division by zero
continuous-integration/drone/push Build is passing Details
2023-11-09 09:18:49 +01:00
Lukáš Kucharczyk e7ed349356 Add more stats
continuous-integration/drone/push Build is passing Details
* Finished (count)
* Unfinished (count)
* Refunded (count)
2023-11-08 18:13:48 +01:00
Lukáš Kucharczyk 5052ca7dbf Add more stats
continuous-integration/drone/push Build is passing Details
* All finished games
* All finished 2023 games
* All finished games that were purchased this year
* Total sessions
* Days played
2023-11-08 16:24:22 +01:00
Lukáš Kucharczyk f408bfd927 stats: change overall stats table layout 2023-11-08 15:48:06 +01:00