NRLMMD-GEOIPS / geoips

Main Geolocated Information Processing System code base with basic functionality enabled.
https://nrlmmd-geoips.github.io/geoips/
Other
13 stars 10 forks source link

Automating ``create_plugin_registries`` #647

Open evrose54 opened 1 week ago

evrose54 commented 1 week ago

Requested Update

Description

After some conversation, we've came up with some ideas on how to automate create_plugin_registries to ensure the plugin registries are in a correct state whenever GeoIPS is ran.

To start, we'll need to attach a pre-build script to plugin_package installation process, that generates a text file (or other suitable file type) which includes the installation time of that certain package. If this installation time is newer than the modification time of any plugin package's registered_plugins.json (assuming one exists), then run / rerun create_plugin_registries to ensure GeoIPS is in a correct / valid state.

I think it'd probably be a good idea to attach this functionality to the top level __init__.py file of all registered GeoIPS plugin packages. It'd be optimal to have this attached to non-registered plugin packages' top level __init__.py files, so maybe it'd be a good idea to discuss whether or not we want to add this to Template Basic Plugin in the future.

Background and Motivation

This issue comes from the last bullet in this issue https://github.com/NRLMMD-GEOIPS/geoips/issues/541.

Code to demonstrate issue

geoips.create_plugin_regstries and geoips.plugin_registry.

Checklist for Completion