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

Refactoring: Modularity and best practices #238

Open
6 of 8 tasks
aceisace opened this issue Jan 22, 2023 · 0 comments
Open
6 of 8 tasks

Refactoring: Modularity and best practices #238

aceisace opened this issue Jan 22, 2023 · 0 comments
Assignees
Labels

Comments

@aceisace
Copy link
Collaborator

aceisace commented Jan 22, 2023

Currently, there is no differentiation between Inkycal's built-in modules and requirements and those of third-party extensions.
This leads to problems with dependencies when installing Inkycal.
A better approach is to organise modules in the following way:

  • inkycal/modules/built-in/.. for built-in modules. The requirements from these is mandatory for installing Inkycal.
  • inkycal/modules/third-party/.. for third-party modules.

Furthermore, each module should have it's own folder containing the following:

  • __init__.py
  • requirements.txt
  • LICENSE
  • Unittest for WEB-UI and module itself
  • optionally any additional files it needs, e.g. additional functions

The aim for this is to make maintenance and testing much easier. Since modules can be tested independently from each other and errors can be narrowed down further. Additionally, it allows adding modules as easy as navigating to the third party folder and running git clone <url/to/inkycal_third_party_module>

TODO:

  • Create layout-generator class to create layouts for modules. This should contain functions to write text in rows, columns and the specified channel
  • Add support for pre-defined colour channels. Currently, 7 channels should be supported (ACeP), one for each colour band
  • Shift built-in modules to built-in modules folder
  • Create folder for third-party modules
  • Add unittests in each module and rename tests according to best-practices, starting with test_..
  • The current setup to load data in the web-ui from the required_parameters and optional_parameters field makes it difficult to enforce type enforcement, to add default parameters and to expand a field with multiple fields, e.g. adding an icon for each calendar. An alternate approach is docstrings or a separate config file, which would help solve these problems.
  • Refactor display class to be non-blocking or stop automatically after n-seconds if there has not been a response from the display
  • Add splashscreen before first rendering to show that Inkycal is actually running, independently from other modules.
@aceisace aceisace self-assigned this Jan 22, 2023
@aceisace aceisace reopened this Apr 3, 2023
@aceisace aceisace changed the title Feature request: improve modularity Refactoring: Modularity and best practices May 23, 2023
@aceinnolab aceinnolab deleted a comment from github-actions bot Feb 14, 2024
@aceinnolab aceinnolab deleted a comment from github-actions bot Apr 15, 2024
@aceinnolab aceinnolab deleted a comment from github-actions bot Jun 15, 2024
@aceinnolab aceinnolab deleted a comment from github-actions bot Jun 15, 2024
@aceinnolab aceinnolab deleted a comment from github-actions bot Jun 15, 2024
@aceinnolab aceinnolab deleted a comment from github-actions bot Jun 15, 2024
@aceinnolab aceinnolab deleted a comment from github-actions bot Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant