From 61b93a8a117dcbe1b4a0e72363936cf0b83c571e Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 14 Dec 2022 23:59:43 +0100 Subject: first work on getting GPX out of the DB 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, ... --- .mypy.ini | 3 +++ 1 file changed, 3 insertions(+) (limited to '.mypy.ini') diff --git a/.mypy.ini b/.mypy.ini index ed220e3..f77b4ba 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -4,6 +4,9 @@ check_untyped_defs = True allow_redefinition = True exclude = fietsboek/updater/scripts/.+\.py +[mypy-brotli.*] +ignore_missing_imports = True + [mypy-pyramid.*] ignore_missing_imports = True -- cgit v1.2.3