Git Product home page Git Product logo

Comments (7)

psilo909 avatar psilo909 commented on May 27, 2024

+1 - wer machts :)

from smarthome.

smaiLee avatar smaiLee commented on May 27, 2024

I suggest the following changes:

  1. Move folder /plugins/skeleton/ to /dev/plugin_skeleton/.
  2. Replace the moved /dev/plugin_skeleton/__init__.py by /dev/skeleton.py. This is the current version based on SmartPlugin and IMHO theres nothing relevant in init.py that's not in skeleton.py.
  3. Change paths in /dev/README.md.

I would left unchanged the rest of the two READMEs. The one in /plugins/skeleton/ is actually a skeleton for new plugins and the one in /dev/ is the how-to for developpping a plugin.

If you agree to that i make the changes.

from smarthome.

ohinckel avatar ohinckel commented on May 27, 2024

I did not check the code in both folders, but I think we should only have one skeleton for plugin and one documentation/howto.

But I prefer to put documentation and howtos into the wiki instead into the codebase. Skeleton seems to be OK in the code, but could also be moved into the wiki, so the whole stuff is in the wiki and not in the codebase. Just another idea.

from smarthome.

bmxp avatar bmxp commented on May 27, 2024

Ok, just integrated the two and created a new dir dev/sample_plugin. I really did not like the word skeleton. The both +.py were different not only in documentation but also in code. I think I saved the most of it but I would feel better if someone has a look over it and maybe has some improvement here or there.
If I do not get any more input, I will close this issue on Sunday evening.

from smarthome.

msinn avatar msinn commented on May 27, 2024

@Bxmp: Looks good. I am gonna make a few additions and push it to develop too.

  • The SmartPlugin Object defines the logger already, so we can remove it from the sample. (I'll test that)
  • The SmartPlugin Object defines __sh (with double '_') and has a method to set it. It's not clear to me if this ist just unfinished work (It is not initialized automatically)

from smarthome.

msinn avatar msinn commented on May 27, 2024

In plugin.py __sh should be set but neither self.__sh nor the predefined self.logger from SmartPlugin Object do work. So the sample_plugin can stay as it is for the time being.

If some has lots of time, he can try to find out why self.__sh and self.logger don't work by inheritance.

from smarthome.

msinn avatar msinn commented on May 27, 2024

@bmxp You didn't close the issue on last sunday... Just close it on next sunday πŸ˜‰

from smarthome.

Related Issues (20)

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.