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

Define plug-in system #792

Closed
ZyanKLee opened this issue Feb 16, 2020 · 8 comments
Closed

Define plug-in system #792

ZyanKLee opened this issue Feb 16, 2020 · 8 comments

Comments

@ZyanKLee
Copy link
Collaborator

ZyanKLee commented Feb 16, 2020

We need some robust mechanism to control how plugins/components are installed, enabled and disabled at runtime.

@ZyanKLee ZyanKLee added this to the 3.0 milestone Feb 16, 2020
@ZyanKLee
Copy link
Collaborator Author

For a first step I would suggest to symlink files instead of copying them.
We could add a folder settings/components.d and settings/scripts.d/ and components/scripts that should be enabled would be linked there.

@MiczFlor @s-martin Does that sound sane?

@s-martin
Copy link
Collaborator

Sounds like a good idea and if it works for Linux it should work for us 😃

@MiczFlor
Copy link
Owner

Hi @ZyanKLee @s-martin
what is the goal here? I think we need to separate local installs and their file changes from the git repo. This can be done with configuration files. Not all components will have a beautiful separation of core functionality and individual tweaks.
With symlinks, that will not make a difference. The local repo files will still be changed. Making copies decouples the two. Then it is independent.
Possibly I am missing something :) ?

@ZyanKLee
Copy link
Collaborator Author

ZyanKLee commented Feb 24, 2020

well, using copies instead of symlinks is always an option if changes to the scripts themselves are made by the user.
But if a script is going to be used as-is, but is not part of the core-functionality, I would suggest to not use scripts, but symlinks to point at the original scripts.

But perhaps my idea went short of the goal and instead we should think about putting the configuration itself outside of the RPi-Jukebox-RFID folder. Having it at ~/.config/phoniebox/ for example would allow us to update the git repo to newer releases without caring much about anything else in the same parent directory.

@ZyanKLee
Copy link
Collaborator Author

is it feasible to also look into how components communicate with the "core"?

currently almost all RFID readers are handled by one python script, correct?
does that scale? can we improve maintainability by separating code that is specific to one device into a component and hook those components into the Reader.py based on a config variable?

same questions for buttons, displays, etc

@ZyanKLee
Copy link
Collaborator Author

should we provide a common interface for components to communicate with other parts and the core? every read and write access to the file settings/ files should in my opinion go through the core.

@s-martin
Copy link
Collaborator

I agree that we should think about that.

I don't know enough about Python, but we should just define an interface and let each RFID reader implement that (maybe providing the Neuftech reader as default implementation).

@s-martin
Copy link
Collaborator

Adressed for future3 in #1771

@s-martin s-martin closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2022
@s-martin s-martin removed this from the 3.0 milestone Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants