Git Product home page Git Product logo

pie-audio's People

Contributors

uselessvevo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

pie-audio's Issues

Simplify paths in system/config.py

To simplify usage paths in config.py they must be Path typed. For example, we have this line:

System.user_root / System.config.USER_CONFIG_FOLDER / "assets.json"

We can simplify it:

# system/config.py
USER_CONFIG_FOLDER: Path = USER_FOLDER / "configs"

# example.py
System.config.USER_CONFIG_FOLDER / "assets.json"

Add EType class decorator to extend them

Why? For example, I want to extend some built-in structure without overriding it.

# piekit/system/config.py

@etype
class Struct:
    SomeAttribute: EList = [1, 2, 3]


# pieapp/config.py

@etype
class Struct:
    SomeAttribute: EList = [4, 5, 6]
    AdditionalAttribute: str = "string value"

Managers | A propouse to spawn new instance inside manager registry

This is just a propouse, but we can add new or spawn method that will create new manager instance with new given name. For example:

# This will create new class that will inherit from `ConfigManager` and read and listen user folder only
>>> System.registry.new(name="config", new_name="userconfig", path=os.path.expanduser("~"))
>>> System.registry.userconfig.get("config.json")
>>> {"key: "value"}

Add `get_plugin` alias-method

At this moment, there are two methdos to get needed plugin or container - via Managers or PluginAccessor mixin which makes me sad.

We can add get_plugin/getPlugin alias-method to make us happy and cut unnecessary code.

For example - the old method:

Managers(SysManagers.Plugins)(Plugins.About)  # <- sad
self.getPlugin(Plugins.About)  # <- less
getPlugin(Plugins.About)  # <- no more mixins

Plugin initialization steps

  • Mount managers - mount method
  • Prepare shortcuts, actions etc. - prepareShortcuts method
  • Render on mainwindow components (if available) - placeOn method
  • Render on activation (click, for example) - init method

Managers | Add path info interface to load multiple files with section info

At this moment, managers like ConfigManager and LocalesManager accepts root and section arguments, but we want to load files from multiple directories with information about section.

For example, we can create interface/dataclass to achieve this:

@dt.dataclass
class PathConfig:
    root: Path
    section: str = "shared"

Add API extension for plugins/containers

We can add ApiAccessor/ApiExtension to provide API calls for plugins/containers.

For example, we can add api method for plugins/containers:

result = getPlugin(Containers.ContentTable).api("<method>", <args>, <kwargs>)

Rename project in Pie Audio

First, this name is much clear and easy to understand what this program do.
Second, under a different angle it signals that this project written in python

Add default files for user folder

At this moment, we have a really bad way to populate/create files in user folder. Create template files for config, locales and etc..

Remove SystemManager

There is no reason to keep this manager in the project.
Will be removed in system-remove branch.

Add plugins observer

Plugins observer must signal about available and non-available (disposed) plugins. This observer will be used in PluginsManager.

CLI for project startup/create

At this moment, you need to make a lot of things to just start a project with cloudykit/cloudyui. That means, we need to create CLI to startup/create project.

Add system managers enums

At this moment, all access to the managers is really unclear.

For example:

# This will return an instance of `ConfigManager` which is unclear
System.registry.configs
# To make it clear, we can use enum with the system managers
# Yes, it's a little bit longer to type, but it will be MUCH clear
Managers.get(SystemManagers.Configs)

A proposal to rename BasePlugin object into PieObject

At this moment, a we have plugins and containers. Both of them are uses the same BasePlugin class which is bad, because a container doesn't use all plugin's methods.

We can make a PieObject and PluginMixin to extend it.

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.