ome / omero-metadata

OMERO plugin for metadata manipulation https://www.openmicroscopy.org/omero/
GNU General Public License v2.0
7 stars 13 forks source link

Refactor pandas-based header detection #74

Open sbesson opened 2 years ago

sbesson commented 2 years ago

https://github.com/ome/omero-metadata/pull/67 introduces a new strategy based on the pandas library for parsing the columns of a CSV file and choosing the appropriate OMERO.table columns types when running populate metadata with the default ParsingContext. The initial implementation was introduced at the MetadataControl level, allowing to generate a column_types list and pass it to the existing API of the HeaderResolver.

A downside of this approach is that any non CLI-based usage of the new functionality requires the omero_metadata.cli.MetadataControl class to be approach- see https://github.com/ome/omero-metadata/pull/67#issuecomment-1082029510. A minimal approach would be to migrate the column types detection logic under the omero_metadata.library module.

Capturing a few wider thoughts about the migration of this API down at the library level: