oaregithub / oare_sql

1 stars 0 forks source link

script for renumbering text_epigraphy #48

Closed Gertrudius closed 5 months ago

Gertrudius commented 7 months ago

script for checking and renumbering iterative values in text_epigraphy where they do not match the expected order.

Gertrudius commented 6 months ago

After an immense amount of trial and error, I have the script working for updating object_on_tablet in comparison with the given order of the lines, which does so without it being prohibitively expensive in resources (which is an issue when working with data sets as large as text_epigraphy). The next step is to do the same with the other static value in text_epigraphy, side, and then to propagate the logic to include the other iterative columns. Getting this working required me to manually fix several outstanding issues in text epigraphy, but I'm working to add support to the script to work around and correct these issues in case front-end editing or insertions might ever cause these issues to crop up again. Most of these were relatively simple issues like 'undeterminedLines' showing up with a line number etc.

edstratford commented 6 months ago

Rewrite as maintenance script (side) where checks for the sequence of 1-6,9 and converts 10 to 4.5 (obv ii), and then checks for when 8 or 7 don't occur as the only side.

Gertrudius commented 6 months ago

The script now internally assigns 4.5 to side values of 10, and is sorting correctly there. It also now checks for side values of 7 & 8, as well as texts that start on their upper edge. Running it as such resulted in these hits:

text contains mirror: 17659377-3afb-416d-a099-85079536921f u.e. begins text: 9a6cdd25-c624-44e4-dbf1-00913b3b71a7 u.e. begins text: 9d32ac33-88ff-446a-8ed5-3270118ae4ea u.e. begins text: bf3fd270-8834-f6d0-37ff-0eb7c5f54a17

Gertrudius commented 5 months ago

I think I've got the recursive function for assembling text_epigraphy parent relationships working, and its plugged into the rest of the script and I'm going through the hits that it propagates. There are only 10 texts that it identified as issues, so I'll go ahead and fix those manually.

Gertrudius commented 5 months ago

The ten remaining texts have been cleaned up, and I think we are good to call this issue completed unless some other text_epigraphy issue comes up.