ErwinKomen / RU-passim

0 stars 0 forks source link

Plugin: problem with some selections #775

Closed ErwinKomen closed 3 months ago

ErwinKomen commented 3 months ago

GS:

selection by Anchor manuscript or by a combination of sermons in the clustering plugin does not work

ErwinKomen commented 3 months ago

Search

I see that an error gets generated there, pointing to the plugin view BoardApply (which is executed after pressing the Apply button. The error is in this line:

arg_dic['contains'] = [x.name for x in sermons]

The name is not known. And the reason for that is that sermons is filled with Passim Signature objects, which do not have a name property. What should have been done: load it with the plugin's contents of char_codes.csv, which is loaded into GenGraph's variable local_store[dataset].char_codes

Possible resolution

So, what should be done could be this:

  1. Create a model Psermon to hold the plugin Sermons: name, abbreviation, dataset
  2. Fill it one-time
  3. Let the Sermons take the data from Psermon
  4. Make the Sermons select2 dependant upon the selection of the dataset
  5. Test

Okay, I tried this in the development environment, but I am often getting errors.\

And the manuscripts...

I now see that the manuscripts should not be the Passim manuscripts, but they should be taken too from a dataset-dependant source, i.e. from char_series.csv and the fuller description metadata.csv. So that would follow this kind of path (after the launch:)

  1. Create a model Pmanuscript to hold the plugin Manuscript with field names SeriesName, EncodedWorks and dataset + all the fields defined in metadata.csv.
    1. And notice: the encoded works are the code items (field abbr) within Psermon
    2. Should these Psermon items be linked to the manuscripts??
  2. Fill the Pmanuscript table one-time
    1. Make sure the use the field dataset to point to the BoardDataset
  3. Let the plugin Manuscripts take their data from the Pmanuscript model
  4. Make the Manuscript select2 dependant upon the selection of the dataset (just like Psermon)
  5. Test
ErwinKomen commented 3 months ago

Okay, all seems to work now...