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

[FR] Refactor plugin registry #4340

Merged
merged 17 commits into from
Apr 19, 2023

Conversation

matmair
Copy link
Contributor

@matmair matmair commented Feb 13, 2023

This PR moves the (de)activation sequences for plugins out of the registry and into the mixins themselves. It also factors out the impacted plugins into their own files.

The main advantage of this is that mixin-specific parts are isolated in that mixins code. This makes tests more stable and possibly enables dynamic loading of mixins ie. mixins as plugins. The larger goal is to make core plugin code slimmer and simpler.

Fixes #4184

@matmair matmair added the plugin Plugin ecosystem label Feb 13, 2023
@matmair matmair self-assigned this Feb 13, 2023
@matmair matmair added this to the 0.11.0 milestone Feb 13, 2023
@SchrodingersGat SchrodingersGat modified the milestones: 0.11.0, 0.12.0 Apr 12, 2023
@SchrodingersGat
Copy link
Member

@matmair bumping this to the next release cycle

@matmair matmair marked this pull request as ready for review April 18, 2023 22:39
@matmair
Copy link
Contributor Author

matmair commented Apr 18, 2023

@SchrodingersGat this would be ready for review. No change in functionality, just a refactor.

@SchrodingersGat
Copy link
Member

Should we break all mixins out into their own file, if we are doing some of them?

@matmair
Copy link
Contributor Author

matmair commented Apr 19, 2023

@SchrodingersGat I only broke out the complex ones but I can do all integration mixins if you think it is better. Trying to keep my PRs more manageable in size ;-)

@SchrodingersGat
Copy link
Member

Trying to keep my PRs more manageable in size ;-)

Appreciated, it can be hard to keep up with larger PRs as the codebase evolves! I'll merge this in as-is for now, we can factor out others later as required. Thanks for the continued hard work :)

@SchrodingersGat SchrodingersGat merged commit 1b8ad70 into inventree:master Apr 19, 2023
9 checks passed
@matmair matmair deleted the matmair/issue4184 branch April 19, 2023 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin Plugin ecosystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Refactor plugin registry/mixins -> move activation sequences to mixin code
2 participants