solgenomics / sgn

The code behind the Sol Genomics Network, Cassavabase and other Breedbase websites
https://solgenomics.net
MIT License
66 stars 35 forks source link

Trait name conventions causes issue when exporting Field Book photos on Windows computers #4104

Open ch728 opened 2 years ago

ch728 commented 2 years ago

Field Book exports photos with the trait name appended. The trait name, following ontology conventions used in Breedbase has a ":" in it. The ":" is not allowable in file names on Windows file systems, so the file name gets mangled; thus, making it difficult to upload the images to Breedbase.

nickmorales commented 2 years ago

hi @ch728 on windows is it allowed to have a file name with a backslash before the :, like myfilename_ONTO\:001111.png? Another solution suggested by @bellerbrock is to not use ontology traits when taking photos, or use a string like "photo". I believe that is how it was intended to be used.

ch728 commented 2 years ago

It doesn't like that either. I understand what you mean by the photos not needing to be ontology traits. I think that will be our solution for now. The downside is that if we do it like that then we can't pull the photo traits into Field Book via BrAPI. I guess another solution would be to push the photo traits directly from Field Book to the database using BrAPI rather than exporting to the Windows computers and then uploading.

trife commented 2 years ago

@ch728 If we remove the colon characters in the exported image files will that break the ability to import those images directly into breedbase?

ch728 commented 2 years ago

@trife, yeah I believe that would break the import. These are the two formats allowed:

Screenshot from 2022-05-31 09-30-20

Screenshot from 2022-05-31 09-29-54

The first upload option is the problem child because of the trait names having colons. The second option should work for us, but will require some reformatting. I think doing it via BrAPI would probably work as is, but currently we only import traits via BrAPI.