Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins? #56

Open
webknjaz opened this issue Jan 6, 2025 · 0 comments
Open

Plugins? #56

webknjaz opened this issue Jan 6, 2025 · 0 comments

Comments

@webknjaz
Copy link

webknjaz commented Jan 6, 2025

Looking into the project more, it seems that some Sphinx sites might be heavily used in some ecosystems, but not the others. This project pulls in a huge number of references that might not be needed in some projects. So I'm thinking that it'd be reasonable to have a concept of groups of intersphinx sited. So the end-users might use subsets of references by group. Like 'python-generic', 'science', 'ml', 'web', 'data-science' etc.

This might work for a number of things. But what if there's an ecosystem that is fairly isolated, and it wouldn't make sense for it to be listed in this project's hardcoded lists?

I think, that it would be interesting to see this implement a plugin system that would allow external installables to augment or replace the list of intersphinx entries with their own. I can see some ecosystems maintaining their own lists of intersphinx entries maintained as a PyPI project and used across their ecosystems. Building on top of the idea #55, they'd have this project in their extensions list but would pip install intersphinx-registry-custom-ecosystem in the same env, and would get a bunch of entries into their Sphinx envs automatically.

This plugin mechanism wouldn't need a lot of fancy stuff. It could rely on pluggy (the lib that tox and pytest use) but it could also rely on the bare-bones importlib.metadata. Such projects might even get away with shipping a single JSON or TOML file + a few lines of metadata in pyproject.toml with no Python. Or, they could have hooks with some custom logic in Python too.

WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant