aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-13Merge branch 'profiles'Daniel Schadt
2023-04-04install driver for Postgres and MySQL on dockerDaniel Schadt
Considering this is the example/"official" image, it makes sense to support the big (open source) databases PostgreSQL and MySQL/MariaDB out of the box.
2023-04-03add a fietsctl hittekaart --delete optionDaniel Schadt
2023-04-03doc: document hittekaart configuration optionsDaniel Schadt
2023-04-03fietscron: add queue priority for hittekaart logDaniel Schadt
2023-04-03hittekaart: no error if no input files are passedDaniel Schadt
2023-04-03add translations for profile pageDaniel Schadt
I'm not too happy with the longest/shortest time/duration words (neither in English nor in German), but those will do for now until we can think of better ones.
2023-04-01remove import across toplevelDaniel Schadt
Python seems to do fine, but pylint complains (probably rightfully, since the tests do not represent packages). We lose type hinting for the playwright_helper, but there's probably a better way to do it in the future.
2023-04-01fix isolated running of unit testsDaniel Schadt
They caused issues because they might not have created the database tables or the data directory. Since the cleanup job runs globally after every test, it should take that into consideration and not error out.
2023-04-01add some very basic tests for profilesDaniel Schadt
I'd like to have more, but this is a start (and already caught some errors, see the last two commits).
2023-04-01fix division by zero for profile pageDaniel Schadt
Now that round_to_seconds can actually return 0, we need to catch this case.
2023-04-01fix round_to_multiple for second-level accuracyDaniel Schadt
It was ovious that this is broken when you try to round "0s" to second-level granularity, and you end up with "1s". The problem comes from the fact that we use the integer divison when checking whether we should round up or down, but then also use strict inequality. To fix this, we now also round down if the second_offset is equal to the halfway point (which in the case of second-level granularity is 0).
2023-04-01actually check permission for user profilesDaniel Schadt
Otherwise everyone can just access any profile.
2023-04-01fix copy/paste errorDaniel Schadt
We copied the factory method from Track, but forgot to change some of the words. Now the code fits better with what the function is doing. As a bonus, pylint no longer complains about a duplicate method.
2023-03-31hide ugliness of tile url functionDaniel Schadt
We basically do the same hacky trick in two different places, so maybe we should put it into a separate function, test it, and if a better implementation arises, swap it.
2023-03-31add a link to the profile to the user menuDaniel Schadt
2023-03-31suppress hittekaart standard outputDaniel Schadt
Otherwise it'll show progress bars.
2023-03-31insert user into hittekaart queue on track uploadsDaniel Schadt
2023-03-31make fietscron call hittekaartDaniel Schadt
2023-03-31stop sqlite3 DB creation if it doesnt existDaniel Schadt
This would otherwise happen if e.g. the user has the page open, the SQLite file is deleted, the user then activates the overlay layer, and the sqlite3.connect() creates the database.
2023-03-30allow log level to be easily set in containerDaniel Schadt
2023-03-30check if data version matches at startupDaniel Schadt
This might be helpful to see some errors early.
2023-03-30type hint the updaterDaniel Schadt
2023-03-29fix lintDaniel Schadt
2023-03-29profile: show longest duration & duration tracksDaniel Schadt
2023-03-29fix longest/shortest confusionDaniel Schadt
2023-03-28remove -c from docker documentationDaniel Schadt
With fietsboek.ini, those commands become very ergonomic to use (as long as the user has the configuration at the default place)
2023-03-28cli: have a hint if fietsboek.ini is not foundDaniel Schadt
2023-03-28fix import orderDaniel Schadt
2023-03-27use fietsboek.ini as default configDaniel Schadt
This makes it easy to use the scripts without always having to specify -c. The error message could be a bit better if fietsboek.ini is not found and -c is not given, maybe we can fix that later.
2023-03-27profile: add longest and shortest trackDaniel Schadt
2023-03-27profile: move cumulative stats to helper classDaniel Schadt
The reason for that is that we want to add "longest track"/"shortest track" soon, and the profile() function is getting a bit long
2023-03-25add documentation about DockerDaniel Schadt
2023-03-25add an initial DockerfileDaniel Schadt
2023-03-25first integration of hittekaart into fietsboekDaniel Schadt
This makes it a bit easier to generate heatmaps, but at the moment, it only works manually. The "long-term" goal is to have fietscron generate heatmaps on a regular basis.
2023-03-25profile: take into account all tracksDaniel Schadt
With the previous logic, we only counted those that the user themselves uploaded.
2023-03-25use own i18n strings for profile pageDaniel Schadt
2023-03-25add number of tracks to profileDaniel Schadt
2023-03-25profile: show first base layer per defaultDaniel Schadt
Otherwise it does look very empty when you open the page.
2023-03-25add docstringsDaniel Schadt
2023-03-25show heatmap on profileDaniel Schadt
So far, fietsboek does not generate them, but if you happen (by accident) to have hittekaart output a heatmap to the right location, the profile page will now show it.
2023-03-25first scaffolding for profilesDaniel Schadt
2023-03-25rename profile to user-dataDaniel Schadt
This is not really a profile page, but rather a page to change your personal data, so it should be named accordingly (in preparation for real profiles). Additionally, we use POST requests to deal with the data change.
2023-03-25fix eslint CI jobDaniel Schadt
Turns out you need to supply an actual empty array. While we're playing with the CI configuration, we also move the deprecated global image/cache/before_script sections into the "default" section.
2023-03-25run eslint on the CIDaniel Schadt
2023-03-25ignore compiled js and css files in linguistDaniel Schadt
2023-03-24move (most of the) JavaScript code to TypeScriptDaniel Schadt
Yay, types! (And a lot of escape hatches)
2023-03-23rewrite fietsctl to use clickDaniel Schadt
This makes it consistent with the other scripts (fietsupdate, fietscron), and makes the argument parsing setup a bit nicer to read.
2023-03-22add documentation about SASS and JSDaniel Schadt
2023-03-22use sass for the CSS filesDaniel Schadt