Unbundling generator scripts

We had a discussion about this recently, but I’m coming back around:

  • if users have to install all plugins (including generators, xtb, etc.) everything receives the same treatment and we avoid issues with read-only AppImage, etc. (For example, I’m slightly worried about MacOS code signing since we install into the app bundle itself.)
  • a huge fraction of users expect a range of input generators to be included
  • users without open network access / installation rights may have problems with unbundled plugins

I’m leaning towards unbundling everything, perhaps with a first launch suggesting people install the input generators.

Thoughts?

My instinct says that as long as there’s a mechanism to install plugins from file, locally, without network access, it’s fine, because whichever system administrator can take care of things.

The most important thing is not requiring network access – I don’t think there is realistically any setup where the user does not have write access to the local user data location.

I guess the other option is that generators (or other plugins) are included in the bundle, and avogadroapp copies them into the plugin directory if the user doesn’t have them. They can then be installed there.

1 Like

Okay, that’s what I’m trying now - copy and install…

1 Like

Tried this just now, everything worked perfectly for me.
Here’s the steps I went through:

  1. Downloaded AppImage build artifact
  2. Completely removed all directories and files in .local/share/OpenChemistry/Avogadro
  3. Launched the AppImage, clicked yes on the install
  4. Everything went smoothly. Input generators took maybe half a second to populate, if that, and then worked fine after that.
  5. Relaunched, was not prompted to install the generators, seems like success.
1 Like

Well I can confirm it also works like a dream on my PC, amazing job :smiley:

Though speaking of permissions issues, ~/.local/share/OpenChemistry/Avogadro/pyproject.toml is set to read-only for me, despite my user being the owner of the file, making it a bit laborious to delete. Just a small oddity.

1 Like

The issue with this approach that has occurred to me is that if changes are made to the avogenerators repo but no one updates the plugins repo accordingly, people using the continuous builds will have a different version to the people who install it via the plugin manager.

Could we adjust the checkout-repositories action so that it uses the same commit as found in repositories.toml or at https://avogadro.cc/plugins2.json?

Yes, that’s the point of automating the plugins repository:

I guess it’s possible to look up repositories.toml but it seems much easier to just make sure that the plugins repository (and thus repositories.toml) is automatically up-to-date.

I’m thinking we’re approaching it from the wrong direction.

Rather than having plugins run checks, we would be better having a GitHub Action in avogenerators that runs when changes are merged (or once per day), that opens and merges a PR into plugins. That way we can automate any other things necessary to occur at the same time. We ought to bump the patch version number for each different version we publish to the index, for example.

Naturally the script/action to check for updates is still generally useful, I’m talking specifically about avogenerators.

1 Like

I’m happy to be proven wrong, but I don’t think an action running as avogenerators can force a merge in a separate repository. OTOH, I already set up an action to run once a day in plugins to handle that.

1 Like

I’m pretty sure I’ve seen it somewhere else. Just requires the necessary secrets, of course.

But if you’ve already got a working setup then it’s irrelevant. :slight_smile: