QM docum update

This commit is contained in:
2023-03-11 20:52:08 +00:00
committed by Wookey
parent 8ed436302f
commit c744dfe733
3 changed files with 43 additions and 14 deletions

View File

@@ -10,6 +10,10 @@
<h1>Troggle Data Model (python)</h1>
<h3>Troggle data architecture</h3>
<figure class="onright">
<a href="../l/trogclass-1.html"><img src="../t/trogclass-2.jpg"></a>
<br><figcaption>Class Diagram<br />(Click to enlarge)</figcaption>
</figure>
Auto-generated on 3 April 2020 with <var>troggle$ python3 manage.py inspectdb</var>. (Omitting all the 'Meta' sub-classes. )<br>
Several classes have been edited out of this file between then and 30 January 2023 as they have been deleted as troggle has been tidied up.
<p>All the classes below inherit from the django class (models.Model) and are thereby made persistent in the database. All <a href="https://docs.djangoproject.com/en/1.11/ref/models/fields/">persistent instance variables</a> are defined with e.g. "models.BooleanField()" types which is why they look so strange to a normal python programmer.

View File

@@ -64,16 +64,39 @@ It has been retired because the mapping software packages it used were terminall
<p>QMs all use <a href="../survey/qm.html">the same QM description conventions</a>.
<h2>QMs - monitoring progress</h2>
<p>Each cave has a report listing all the extant and ticked-off QMs, e.g.
<a href="/cave/qms/1623-264/">/cave/qms/1623-264/</a> or <a href="/cave/qms/1623-161/">/cave/qms/1623-161/</a>. The 161 report includes both old (spreadhseet-era) QMs and modern (2015 survex file) QMs.
<h2>QMs - recording progress</h2>
<p>Since 2015 we have had no generally agreed way of recording whether a QM has been ticked-off or not.
<p>In 2022 we developed a proposal (see "<a href="#ticking">Ticking them off</a>" below) to add an extra line to the original survex file, now that survex files can be edited easily on-line (and the version control happens invisibly and automatically).
<h2>QMs - how we first record them</h2>
<p>Today we write the QM into the survex file: see <a href="../survey/qmentry.html">documenting newly found QMs</a>.
<p>We used to write them into a spreadsheet file (pre-2015). These old files are today still parsed by troggle to produce reports.
<h4>troggle/parsers/survex.py</a></h4>
<p>Troggle <em>troggle/parsers/survex.py</em> currently parses and stores all the QMs it finds in survex files. The tables where the data
is put are listed in <a href="datamodel.html">the current data model</a>. For ticking them off we have only protoype code: adding an extra line
is put are listed in <a href="datamodel.html">the current data model</a>.
<h5 id="ticking">Ticking them off</h5>
For ticking them off we have only protoype code: adding an extra line
in the survex file of the format
<code><pre>QMnn TICK date comment</pre></code>
e.g.
<code><pre>QM15 TICK 2022-07-20 This is a dummy ticked QM</pre></code>
as illustrated in
<code>
QMnn TICK <em>date comment</em>
</code>
e.g.<code>
QM15 TICK 2022-07-20 This is a dummy ticked QM</code>
<p>as illustrated in
<a href="/cave/qms/1623-258/2015-15Aflashh2">2015-15A</a>
in <a href="/survexfile/caves-1623/258/flashhard2.svx">258/flashhard2.svx</a>.
in <a href="/survexfile/caves-1623/258/flashhard2.svx">258/flashhard2.svx</a>. <br>
The TICKed QM appears at the end of the report <a href="/cave/qms/1623-258">/cave/qms/1623-258</a> at the bottom of the page.</p>
<h4 id="qms.py">troggle/parsers/qms.py</a></h4>
<p>Troggle currently reports QMs separately collated for three historic caves and also imports all the QMs inside survex files.
@@ -101,6 +124,8 @@ These URL recognisers work:
<p>Note that the hand-edited <var>qm.csv</var> for Balkonhohle was apparently abandoned unfinished as we transitioned to putting the QMs in the survex files instead. It contains QMs from 2014 and 2016:<br />
<a href="../../1623/264/qm.csv" download>/1623/264/qm.csv</a> - unused <br/>
<h2>QM archeology</h2>
<h4 id="QM_helper">js/QM_helper.js</h4>
<p>A relic.
<p>This is referred to in core/admin.py and appears to help with the userinterface within the
@@ -137,9 +162,9 @@ Fields in 264/qm.csv are:
</span></pre></code>
<p>There are also three versions of the QM list for cave 161 (Kaninchenhohle) apparently produced by this method but hand-edited:<br />
<a href="../../1623/161/qmaven.html">/1623/161/qmaven.html</a> 1996 version<br />
<a href="../../1623/161/qmtodo.html">/1623/161/qmtodo.html</a> 1998 version<br />
<a href="../../1623/161/qmdone.html">/1623/161/qmdone.html</a> 1999 (incomplete) version
<a href="../../1623/161/qmaven.htm">/1623/161/qmaven.htm</a> 1996 version<br />
<a href="../../1623/161/qmtodo.htm">/1623/161/qmtodo.htm</a> 1998 version<br />
<a href="../../1623/161/qmdone.htm">/1623/161/qmdone.htm</a> 1999 (incomplete) version
</p>
<p>In the /1623/204/ folder there is a script <em>qmreader.pl</em> which apparently does the inverse of
<em>tablize-qms.pl</em>: it transforms a QMs' HTML file into a CSV file.
@@ -182,7 +207,7 @@ This will work on all survex *.svx files even those which have not yet been run
<p>Phil says (13 April 2020): <em>"The generated files are not meant to be served by the webserver, it's a tool for people to run locally. Someone could modify it to create HTML output (or post-process the CSV output to do the same), but that is work still to be done."</em>
<h4>troggle archeology</a></h4>
<h4>Even older troggle archeology</a></h4>
<p>Looking through urls.py and core/view_caves.py we see a lot
of archaic code for providing new QM numbers, producing lists of QMs for a given cave and for downloading QM.csv files generated by the database.
@@ -197,8 +222,8 @@ But none of it appears to be working today (5 July 2022).
</ul>
So someone was busy at one time.
<h2>QMs - monitoring progress</h2>
<h3>QMs - monitoring progress - old script</h3>
<h4 id="find-dead-qms">find-dead-qms.py</h4>
<p>This stand-alone script finds references to <em>completed</em> qms in the qm.csv files in the cave folders (/1623/ etc.) in the :expoweb: <a href="../computing/repos.html">repository</a>. It looks to see which QMs have been completed but where there is not yet a matching text in the cave description.
<blockquote><em>Quick and dirty Python script to find references to completed qms in the

View File

@@ -41,12 +41,12 @@ The core of the troggle software is the data architecture: the set of tables int
</div></div>
<p>
Also there have been tables added to the core representation which are not included in this old diagram, e.g. Scannedimage, Survexdirectory, Survexscansfolder, Survexscansingle, Tunnelfile, TunnelfileSurvexscansfolders, Survey. See <a href="datamodel.html">Troggle data model</a> python code (15 May 2020) and click on the Class Diagram below on the right.
<div class="onright">
<figure>
<figure class="onright">
<a href="../l/trogclass-1.html"><img src="../t/trogclass-2.jpg"></a>
<br><figcaption>Class Diagram<br />(Click to enlarge)</figcaption>
</figure>
</div>
<h3>Purpose</h3>
<p>The reasons why we have an online system at all are described in our <a href="../website-history.html">website history</a>.
<p>There is an introductory article "<a href="/expofiles/documents/troggle/troggle2020.pdf" download>Troggle: a revised system for cave data management</a>".