Git Product home page Git Product logo

Comments (5)

DropD avatar DropD commented on July 28, 2024

from aiida-registry.

giovannipizzi avatar giovannipizzi commented on July 28, 2024

Thanks @DropD !
Actually, our use case is the following:

  • user A (here: aiidateam) takes ownership of the 'quantumespresso.*' name
  • user B (potentially out of the aiida team) wants to develop independently a quantumespresso-related plugin, but for any reason he prefers to work independently from user A (so he doesn't do PRs to A's repository)

In this case, it would be still great to have B's work under quantumespresso.something. Do you agree?
Here, the requirement of locking any 'quantumespresso.*' is in the end too restrictive, maybe.
It's enough to know, for a given complete string, e.g. 'quantumespresso.pw', who "owns" it.

A proposed solution was what Sebastiaan mentioned, i.e. registering (in the "global" registry) all entry points used, rather than just the top name 'quantum espresso'.
Actually one needs a bit less than what originally proposed: probably this is enough for the registry:

...
"entry_points": {
        "aiida.calculations": [
            "quantumespresso.ph",
            "quantumespresso.pw"
        ]
    }
...

i.e., just the names, not also which class (that instead is written in the setup.py). Note also that we would probably separate the entry points in their namespaces, so different people could register "quantumespresso.pw", one for the plugin and one for the parser, potentially.

The reason to register them all (and not just rely on what's in the setup.py) is that this is the only way to guarantee that the name is taken only once - otherwise two people could work in parallel on two entry points with the same name.

What do you think? Would this approach have major problems?

from aiida-registry.

DropD avatar DropD commented on July 28, 2024

from aiida-registry.

ltalirz avatar ltalirz commented on July 28, 2024

The reason to register them all (and not just rely on what's in the setup.py) is that this is the only way to guarantee that the name is taken only once - otherwise two people could work in parallel on two entry points with the same name.

While this is possible in principle, from a practical point of view, I would say that so far we have not yet encountered issues like these.
On the other hand, if we ask people to duplicate their entry point specification in the plugin registry, I guarantee that people will forget to update the registry, when they make changes to their plugin.
While this could be detected at the next build of the registry, I don't think this is currently worth the effort.

So, for the moment I propose that the build of the registry will print a WARNING whenever it detects that an "entry point root" is used by multiple plugins.

I think we should still discuss whether reusing the same entry point root for different plugins is really a good idea.
A one-to-one relationship between entry point root and plugin name is easy to remember and to understand. Simplicity is worth preserving, if we can.

In the example of aiida-quantumespresso-uscf, there are two alternative solutions to sharing the entry point root:

  • the modifications are worthy to be in a separate plugin. simply use the quantumespresso_uscf entry point
  • the modifications don't need to be in a separate plugin. add the functionality directly to aiida-quantumespresso

from aiida-registry.

ltalirz avatar ltalirz commented on July 28, 2024

As discussed in the AiiDA team meeting today:

  • we stick with the convention laid out in the README
  • we will warn about cases not following this convention, e.g. like this, but
  • we will not strictly enforce the convention in order to enable corner cases where this is deemed acceptable (e.g. if one plugin anyhow plans to merge with another plugin, ...)

Closing...

from aiida-registry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.