aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-29fix lintDaniel Schadt
2022-12-29add type hints to fietsboek.emailDaniel Schadt
2022-12-29generate & build API docs for the Python packageDaniel Schadt
We have so many nice docstrings, but they aren't really rendered anywhere (expect locally in your IDE), as we did not include the API docs anywhere. This change uses sphinx-apidoc to generate autodoc stubs for Sphinx, so that the docstrings are actually rendered to HTML. This is not perfect yet (I'm not too happy about the default modules.rst simply listing one package), but it is good enough for the start and makes it possible to actually browse the docstrings in a browser.
2022-12-29update READMEDaniel Schadt
2022-12-29add & run isortDaniel Schadt
2022-12-29start to move out high-level actionsDaniel Schadt
This is code that needs to be repeated in possibly several places (website, API, tests), so it makes sense to have those "high level actions" a bit abstracted. edit.edit_images was already doing that to a certain degree, but the code shouldn't have stayed in the view.
2022-12-29add playwright tests for the sharing functionalityDaniel Schadt
2022-12-28embed metadata (title, description) in the fileDaniel Schadt
2022-12-28lock track directory when editingDaniel Schadt
This is important if concurrent requests to edit the same track are made, both for images and later for metadata embedding.
2022-12-23exclude vendored files from statsDaniel Schadt
2022-12-23fix .gitlab-ci YAML syntaxDaniel Schadt
2022-12-23update dependenciesDaniel Schadt
2022-12-23use right playwright versionDaniel Schadt
2022-12-22add more tests for the home pageDaniel Schadt
2022-12-22reorder playwright helper structureDaniel Schadt
To add more playwright tests and to cut down on the duplicated code, the helper methods have been put into a small class. This way, we don't have to add 100 pytest fixtures.
2022-12-20fix track deletion permissionDaniel Schadt
2022-12-20Merge branch 'gpx-exodus'Daniel Schadt
2022-12-19fix lintDaniel Schadt
2022-12-19use fietsupdate in documentation about backupsDaniel Schadt
This should be preferred over dealing with raw alembic now.
2022-12-19update changelogDaniel Schadt
2022-12-19output error when DROP COLUMN failsDaniel Schadt
In case it might be caused by something else than SQLite's inability to delete a column, it's good to have the actual error written out somewhere.
2022-12-19properly initialize logging in fietsupdateDaniel Schadt
This step would otherwise be done by alembic, which means that we'd lose the first log messages before calling into alembic.
2022-12-17use right alembic downgrade when downgradingDaniel Schadt
-1 is not always the right choice, e.g. when the previous update script has the same alembic version. Therefore, we actually need to do the effort to track the "previous alembic" version.
2022-12-17fix migration for old sqliteDaniel Schadt
2022-12-15fix lintsDaniel Schadt
2022-12-15fix integration & playwright testsDaniel Schadt
2022-12-15actually downgrade revision on update downgradeDaniel Schadt
2022-12-14first work on getting GPX out of the DBDaniel Schadt
This does a lot of changes already. What is definitely not working yet are the tests, as they still try to put the data into the database - but that should be easy to fix. The convenience methods Track.{length,uphill,...} were a bit stupid to fix, as our template code assumed that those attributes can just be accessed. As a fix, I've introduced a new class that "re-introduces" those and can lazily load them from the disk in case the cache does not exist. This works pretty well, but is not too nice - we end up with a lot of "proxy" properties. Other than that, I'm positively surprised how well this has worked so far, the upgrade scripts seem to be doing good and serving the file straight from the disk seems to work nicely as well. What isn't tested yet however is "edge cases", in case a data directory goes missing, ...
2022-12-14rework DataManagerDaniel Schadt
Since we plan on moving the GPX data (and the original copy) into the data directory, it makes more sense to have a per-track "handle" instead of having all methods of DataManager take a track_id parameter.
2022-12-14add type hints in data.pyDaniel Schadt
2022-12-14change deprecated way of Accept-Encoding headerDaniel Schadt
2022-12-14Merge branch 'playwright'Daniel Schadt
2022-12-14add test for track browsingDaniel Schadt
2022-12-13remove tileproxy.TileSourceDaniel Schadt
This tuple was basically the same as TileLayerConfig, just without the validation. You could see in the old _extract_user_layers that otherwise they were 1:1 doing the same job. Therefore, it made sense to remove TileSource and instead rewrite the code to use TileLayerConfig directly.
2022-12-13add support for stamen mapsDaniel Schadt
2022-12-13add a test for editing tracksDaniel Schadt
2022-12-11fix GitLab CI for playwrightDaniel Schadt
2022-12-10start with playwright testsDaniel Schadt
2022-12-10fix type hints for read_localized_resourceDaniel Schadt
2022-12-10update CHANGELOGDaniel Schadt
2022-12-10add a "Remember me" option for loginsDaniel Schadt
The default session timeout is at 15 minutes, which can be rather short. Therefore, we now have a "Remember me" option, which optionally saves the authentication in a cookie (signed of course, so nobody can tamper with it). This cookie is set to basically never expire, keeping the user logged in while not messing with the session timeout (which is also used for other things like flash messages). We might think about just removing the session authentication completely and doing everything with cookies, but we'll see about that. We definitely want to keep two separate timeouts, but the cookie helper doesn't seem to provide a way to have single cookies last for longer (short of having a second helper like we currently do).
2022-12-10fix localized resource loadingDaniel Schadt
2022-12-10Merge branch 'external-languages'Daniel Schadt
2022-12-09work around tox bug regarding section flake8Daniel Schadt
See https://github.com/tox-dev/tox/issues/2636 - without the rename, tox fails to recognize the configuration for flake8, as there is a (non-testenv) section named the same.
2022-12-09fix tox and poetry interactionDaniel Schadt
The Poetry FAQ[1] gives some options on how tox and poetry can be used together, since both of them want to do the virtual env managing. Since we mostly want to use tox as a venv manager and to easily run multiple linters, and we want to have poetry do the dependency management, the method of explicitely using `poetry install` seems to be the most reasonable. This means we don't have to generate a requirements.txt file or make duplicated listings of our dependencies in tox.ini. [1]: https://python-poetry.org/docs/master/faq/#is-tox-supported
2022-12-09Merge branch 'type-hints'Daniel Schadt
2022-12-08pin tox to old versionDaniel Schadt
There seems to be an issue with the latest one.
2022-12-08run black in CIDaniel Schadt
2022-12-08black formattingDaniel Schadt
This seems like something we should do rather earlier than later. Using black takes away the pain of manually formatting the code, adhering to the style guidelines and it takes away bikeshedding over minor things.
2022-12-08type hints for fietsboek.utilDaniel Schadt