inlab-geo / espresso

Earth Science PRoblems for the Evaluation of Strategies, Solvers and Optimizers
https://geo-espresso.readthedocs.io
Other
12 stars 9 forks source link

Using a plugin architecture for all Espresso contributions #174

Open jwhhh opened 3 months ago

jwhhh commented 3 months ago

Currently, we've packaged all the contributions together with Espresso core and released all of them together as geo-espresso.

It would be ideal if we utilise a plugin architecture (where all Espresso problems are "plugins" of Espresso core), and decouple installation and dependency issues from individual contributor projects.

The ultimate goal of this change will be: instead of pip install geo-espresso, users in the future can choose what inference problem they would like to install, e.g.

$ pip install geo-espresso
$ python
>>> import espresso
>>> my_problem = espresso.SurfaceWaveTomography()  # error
--- ERROR ---
    $ pip install geo-espresso-surface-wave-tomography
>>> exit()
$ pip install geo-espresso-surface-wave-tomography
$ python
>>> import espresso
>>> my_problem = espresso.SurfaceWaveTomography()  # success

Here is a reference checklist, but feel free to adjust as needed:

jwhhh commented 3 months ago

An improvement on top of this pull request: have some minimal examples included in the core package (pure Python, no complex dependencies).