MimiPAGE2020 - joining the registry?

Hi all! Has there been any development on bringing this into the Mimi registry?

Can include fine as stated in the example.jl, but if it was brought to the registry, I think that would mean one could use consistent syntax across the IAMs? (for example, modifying inputs and run_mcs, etc.) Additionally, would it allow for PAGE2009 and PAGE2020 to be included in the same environment? (right now it appears they need to be in separate environments)
Thanks!

@jrising

Hi @parthum,

Mimi Registry:

I actually believe we may move away from having our own Mimi Registry and towards just registering packages directly in the General Registry in Julia for various reasons I can share if you are curious, but the goal is to optimize for a smooth user experience and minimize upkeep and thus potential for bottlenecks or failures.

Use as a Package:

You are right that MimiPAGE2020 is not currently set up as a Package, nor registered in the Mimi or General Registries. In fact, it is not necessary to register a package to have it accessible via the Pkg add interface (Models as Packages Ā· Mimi.jl), and I think James was thinking of taking those steps soon so that it will be addable via

Julia> ]
pkg> add https://github.com/openmodels/MimiPAGE2020.jl

which does not require actually registering it with the General registry ā€¦ @jrising can I help you with that? I see this PR which looks pretty close to ready to go?

This would make your environment situation easier @parthum .

API:

We do have a somewhat consistent story for a few public API calls (get_model, etc.) that many of the models implemented in Mimi adhere to, however that is ultimately up to the model creators.

We have considered adding some documentation instructing on the best practices for making your model a package and including our suggested API here and I can bump that to the top of my list if developers and users think this would be helpful.

That is to say making MimiPAGE2020 addable as a package will not automatically create a consistent API, and if there are specific functions that would help your work I encourage you to reach out to @jrising here or as an issue on the repository to request those! I can also help do that.

Lisa

1 Like

Okay! This all makes sense, and your intuition behind not centralizing model development is totally understandable, thank you!

Regarding having the models in the same environment, I think you probably discovered the same issue I was having (which, as you point out, isnā€™t a big deal). But getpage() doesnā€™t work with model prefix such as MimiPAGE2020.getpage(), it seems to only be pinned to the first version that is read in? There were a few other things I ran into when they were in the same environment, but again, not a big deal to keep them separate.

Thanks again!

Hi @parthum sorry Iā€™ve edited the above response too many times, I was experimenting myself!

At this moment MimiPAGE2020 is registered, nor is it set up to registered as a package, which would allow the following syntax without being actually registered in the General registry (see Models as Packages Ā· Mimi.jl):

Julia> ]
pkg> add https://github.com/openmodels/MimiPAGE2020.jl

I think @jrising and I could easily get it to be a package sometime this week though, and trivially probably check that it contains some of the typical API calls, so that something like

Julia> ]
Pkg> add Mimi
Pkg> add MimiPAGE2009
Pkg> add https://github.com/openmodels/MimiPAGE2020.jl

pkg> using Mimi
pkg> using MimiPAGE2009
pkg> using MimiPAGE2020

Julia> m = MimiPAGE2020.getpage() # or MimiPAGE2020.get_model()
...

would work smoothly. You canā€™t call that last line now because you arenā€™t properly importing MimiPAGE2020 as a module, which will be done by using MimiPAGE2009 when we make that a package.

In the meantime, as described in the README, you can clone the repository, open it in an editor, activate an environment with

Julia> ]
Pkg> activate .

and use

using Mimi
include("../src/main_model.jl")

m = getpage()
run(m)
explore(m)

FYI, the packag-ization of MimiPAGE2020 is now merged in. So we just need to get it in the registry.

1 Like

Once we tag a new version youā€™ll be able to add it as a package with

pkg> add https://github.com/openmodels/MimiPAGE2020.jl

And then if we want it in the General Registry we can add that with the name MimiPAGE2020 and use

pkg> add MimiPAGE2020

I can remind myself of the exact steps to help do that I donā€™t think itā€™s too hard! It does mean that you need a small extra step when you tag new versions etc though so itā€™s not required James, we can chat with @davidanthoff

Alright @parthum you can now add with

pkg> add https://github.com/openmodels/MimiPAGE2020.jl

and in two days when the General registry accepts the request, you will be able to just do

pkg> add MimiPAGE2020
...
julia> using MimiPAGE2020

so if you have the time Iā€™d recommend just waiting for that since itā€™s the cleanest! Thanks to @jrising for all the work to accommodate this request!

1 Like

Awesome, thank you @lrennels and @jrising!