diff --git a/handbook/troggle/trogdesignx.html b/handbook/troggle/trogdesignx.html index 2d0f5169c..0bbb527fe 100644 --- a/handbook/troggle/trogdesignx.html +++ b/handbook/troggle/trogdesignx.html @@ -47,14 +47,14 @@ enthusiast must have done this already surely ? Ah yes, Brython.
www.brython.info

Which is fun, but not useful. And not just because it is immature. None of -this addresses our biggest problem: devising something that can be +this addresses our biggest problem: devising something that can be maintained by fewer, less-expert people who can only devote short snippets -of time and not long-duration immersion. +of time and not long-duration immersion.

I know Wookey has been thinking of a loose federation of independent scripts working on the same data, but the more I look at troggle and the tasks it -does the less I feel that would work. At the core there is a common data -model that everything must understand - and the only unambiguous way of +does the less I feel that would work. At the core there is a common data +model that everything must understand - and the only unambiguous way of presenting that data model is working code, e.g. see Troggle architecture and click on the image to see a bigger copy. [It is out of date - if someone can quickly generate diff --git a/handbook/troggle/trogsimpler.html b/handbook/troggle/trogsimpler.html index 9a2195f25..66c751c21 100644 --- a/handbook/troggle/trogsimpler.html +++ b/handbook/troggle/trogsimpler.html @@ -9,7 +9,10 @@

CUCC Expedition Handbook

Troggle - a kinder simpler troggle?

Troggle runs much of the the cave survey data management, presents the data on the website and manages the Expo Handbook. - +

This part of the handbook is intended for people +maintaining the troggle software. +Day to day cave recording and surveying tasks are documented +in the expo "survey handbook"

stroggle

At one time Martin Green attempted to reimplement troggle as "stroggle" using flask instead of Django at git@gitorious.org:stroggle/stroggle.git (but gitorious has been deleted).

@@ -22,10 +25,7 @@

Radost's proposal

-

This part of the handbook is intended for people - maintaining the troggle software. - Day to day cave recording and surveying tasks are documented - in the expo "survey handbook" +

Radost Waszkiewicz (CUCC member 2016-2019) proposed a plan for superceding troggle

@@ -41,13 +41,18 @@ unnecessary - we have about 200 caves, about 250 entrances, about 200 people and couple dozen expos. We don't need efficient lookups at all. We can write something which will be 'slow' and make only things we actually care about. -
-[What Rad has misunderstood here is that the database is not for speed. We use it mostly so that we can manage 'referential integrity' i.e. have all the different bits of information match up correctly. While the total size of the data is small, the interrelationships and complexity is quite large. From the justification for troggle:

"A less obvious but more deeply rooted problem was the lack of relational information. One table named folk.csv stored +

+[What Rad has misunderstood here is that the database is not for speed. We use it mostly so that we can manage +'referential integrity' i.e. have all the different bits of information match up correctly. +While the total size of the data is small, the interrelationships and complexity is quite large. +From the justification for troggle: +

"A less obvious but more deeply rooted problem was the lack of relational information. One table named folk.csv stored names of all expedition members, the years in which they were present, and a link to a biography page. This was great for displaying a table of members by expedition year, but what if you wanted to display a list of people who wrote in the logbook about a certain cave in a certain expedition year? Theoretically, all of the necessary information to produce that list has been recorded in the logbook, but there is no way to access it because there is no connection between the -person's name in folk.csv and the entries he wrote in the logbook". +person's name in folk.csv and the entries he wrote in the logbook". +[Adrian Curtis]

And for ensuring survey data does not get lost we need to coordinate people, trips, survex blocks, survex files, drawing files (several formats), QMs, wallet-progress pages, rigging guides, entrance photos, GPS tracks, kataster boundaries, scans of sketches, scans of underground notes, and dates for all those - Philip Sargent] @@ -57,8 +62,21 @@ survex files, drawing files (several formats), QMs, wallet-progress pages, riggi template pages. These contain mainly nested for loops which could just as well be written in e.g. python. -

-[He could indeed. But for most people producing HTML while writing in python is just unnecessarily difficult.] +
+[He could indeed. But for most people producing HTML while writing in python is just unnecessarily difficult. +But it has to be said that the +django + HTML templating mechanism is sufficiently powerful that it does almost +amount to an additional language to learn. +

Troggle has 66 different url recognisersand there are 71 HTML django +template files which the recognisers direct to. +Not all page templates are currently used but still some kind of templating system would seem to be +probably necessary.

+

The django system is sufficiently well-thought-of +that it forms the basis for the framework-independent templaing engine +Jinja - and that site has a good discussion +on whether templating is a good thing or not. There are about +20 different python template engines.]

@@ -68,9 +86,9 @@ I'd advocate following solution:
  • have a small number of .py scripts which generate static webpages with content we want -
    +
    [A reasonable proposal, but needs quantifying with all the things troggle does -which Rad was unaware of. This will not be a "small" number but it needs estimating. We don't need +which Rad was unaware of. This will not be a "small number" but it needs estimating. We don't need everything troggle does for us of course, but that doesn't mean that removing django/troggle will reduce the total amount of code. The input data parsers will be nearly the same size obviously.] @@ -99,8 +117,10 @@ anymore
  • get's rid of the horrifying url rewrites that correspond to no files that exist -
    -[This vastly underestimates the number of things that troggle does for us. See "Troggle: a novel system for cave exploration information management". And a VM is not required to run and debug troggle. +
    +[This vastly underestimates the number of things that troggle does for us. +See "Troggle: a novel system for +cave exploration information management". And a VM is not required to run and debug troggle. Sam has produced a docker variant which he uses extensively.

    Troggle today has 8,200 lines of python (including comments and blank lines), plus 600 in imagekit and 200 in flatpages. 2,200 of those are in the parsers. Django itself has a lot more, including integration with TinyMCE in-browser HTML editor. ]

    @@ -118,11 +138,11 @@ changed to do this instead of modifying SQL database with minimal effort
  • html/css side of things already exists, but it would be nice to go for a more modern look there as well -
    +
    [The effort estimate is similarly a gross underestimate because (a) he assumes one script per page of output, forgetting all the core work to create a central consistent dataset, and (b) he is missing out most of the functionality we use without realizing it because it is built into django's SQL system, such as multi-user operations. -

    Eventually we will have to migrate from django of course, as it will eventually +

    Eventually we will have to migrate from django of course, as it will eventually fail to keep up with the rest of the world. Right now we need to get ourselves onto python3 so that we can use an LTS release which has current security updates. This is more urgent for django than for Linux. In Ubuntu terms we are on 18.04 LTS (Debian 10) which has no free maintenance updates from 2023. We should plan to migrate troggle from django to another framework in about 2025. See stroggle below.] @@ -137,7 +157,7 @@ solution to this minified automatically) Rad -

    +
    [Creating a cave description for a new cave, and especially linking in images, is currently so difficult that only a couple of people can do it. Fixing this is a matter of urgency. No one should have to imagine where the path to a file will be but isn't now. @@ -151,7 +171,7 @@ We need a file uploading system to put things in the right place; and this would
    Go on to: Troggle architecture
    -Return to: Troggle design notes
    +Return to: Troggle design and future implementations

    diff --git a/handbook/troggle/trogstatus.html b/handbook/troggle/trogstatus.html index 7d82e5fee..3efe10868 100644 --- a/handbook/troggle/trogstatus.html +++ b/handbook/troggle/trogstatus.html @@ -30,13 +30,21 @@ The loser repo and expoweb repo need more care in migration (expoweb is the webs

    Similarly expoweb is full of bloat from fat images and surveys and one 82MB thesis that got checked in and then removed. Clearing that out is a good idea. I have a set of 'unused fat blob' lists which can be stripped out with git-gilter. It's not hard to make a 'do the conversion' script, ready for sometime after expo 2019 has calmed down. -

    April 2020

    +

    April/May 2020 and django versions

    Wookey has now moved 'expoweb' from mercurial to git largely "as-is" and will to use the git tools to patch up the history and to remove redundancies, rather than the original plan to tidy them up "at the time of conversion". Mark Shinwell is working on loser.

    Sam continues to work on upgrading django from v1.7 . We are using python 2.7.17 and while we could upgrade to Python v3 using the same version (1.7) of django, we would rather upgrade django as much as possible first before we tackle that. Old versions of django have unpatched security issues.

    "Django 1.11 is the last version to support Python 2.7. Support for Python 2.7 and Django 1.11 ends in 2020." see: django versions.

    Ubuntu 20.04 came out on 23rd April but it does not support python2 at all. So we cannot use it for software maintenance. -

    +

    For a table displaying the various versions of django and support expiry dates +see the django download page. +Django 1.7 expired in December 2015. +Django: full deprecation timeline.

    +

    Ideally we should upgrade from django 1.7 to django 1.11, then port from python2 to python3 on +the same version of django, +then upgrade to as recent a version of django as we can. +

    +

    Enforced time at home is giving us a new impetus to writing and restructuring the documentation for everything.


    Go on to: Troggle maintenance manual