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

Feature/code style #150

Merged
merged 8 commits into from
Jan 26, 2021
Merged

Feature/code style #150

merged 8 commits into from
Jan 26, 2021

Conversation

SweVictor
Copy link
Collaborator

@SweVictor SweVictor commented Jan 22, 2021

Adjust code to airbnb style guid, including eslint rules and prettier config.

Relates to PR #149
Closes #147

- Based on "winston" logging library
- Removed no longer needed lodash
- Locked npm dependencies to most recent major versions to avoid installs breaking due to node module updates
- Break out reading of settings in js and remove it from shell scripts
- Pick up config from Logger via Configuration class
@SweVictor
Copy link
Collaborator Author

Forgot to link - diff for code style changes are here
SweVictor/hassio-plejd@feature/improved-logging...SweVictor:feature/code-style

@icanos
Copy link
Owner

icanos commented Jan 24, 2021

Really like the updated code style, this is how it should have looked from the start. Great work!

@SweVictor
Copy link
Collaborator Author

Really like the updated code style, this is how it should have looked from the start. Great work!

Great to hear! Thought it would be good to do a first pass over the code at least. And well - it's always a bit different when coding only by yourself regarding code style. This is overall a quite minor change, really appreciate the hard work you have been putting in to make the Plejd system work in HA (which is still the main thing here!).

@SweVictor
Copy link
Collaborator Author

Now code has been updated to actually build/run as well (Dockerfile updated for new file names). Should work the same as earlier code.

@icanos
Copy link
Owner

icanos commented Jan 25, 2021

Maybe we should update the version code as well? Those changes done over the last few weeks should probably stabilize the addon for many of our users. What do you think?

@SweVictor
Copy link
Collaborator Author

Sure. I'm not really sure how versioning is done here so I haven't touched that :-)

I also wonder a bit - how should we test things? "Beta" branch (or "vNext")? Or maybe release branch separate from master? Is it possible for end users (in the supervisor UI) to downgrade, select specific versions, or to install a dev branch? I'm not sure how those parts works, but I would prefer than someone apart from me tests new things before release if possible...

Also pending is to at least sync the two readme files so users see the most recent readme in HA, I can probably do that if we think the current structure with double readme's is the best way (I've been thinking about linking the root readme to the inner one that is seen by HA, but I'm not sure exactly what is the best way).

@icanos
Copy link
Owner

icanos commented Jan 26, 2021

I agree with you regarding the README's. We need to sync those and I think we should move the changelog to a separate file too.

I'm not aware of any possibilities to select a version of an addon in the Supervisor UI, so I guess that it's always gonna be the latest version when updating. A separate branch for development is the way I've been working previously and then just made a pull request to the master branch when a new version was ready to be tested. I solved the testing by manually uploading the files to a local repository in Hass.io (copy/paste files into a folder).

I think we merge these changes and test them, if all is ok, we then update the version so that everyone using the addon gets a notification. After that, we create a separate new branch for development work and continues there.

Sounds ok?

@SweVictor
Copy link
Collaborator Author

Sounds good. Let's merge this if you agree and people that want can start testing. I can probably fix the readme later today in a separate PR, and then we can break off a dev branch or something like it.

@icanos icanos merged commit 61d16fc into icanos:master Jan 26, 2021
@SweVictor SweVictor deleted the feature/code-style branch January 26, 2021 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove or fix mqtt settings code
2 participants