-
Notifications
You must be signed in to change notification settings - Fork 6
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
HACS support + latest noaa_coop version #22
base: master
Are you sure you want to change the base?
Conversation
rsnodgrass
commented
Jun 27, 2022
•
edited
Loading
edited
- add support for HACS (plus updating README.md with installation instructions)
- editing of README and examples
- bug fix for self.attr missing self reference
- error message bug fix
- bump to latest version of noaa_coop
- ran black, refurb, isort Python code formating/standard tools
…des into jshufro-master
Checking on this merge. |
@jshufro Any chance this would get merged into your official version so I don't have to maintain a fixed version for others? |
Main issue I see is the breaking change from renaming the path to support HACS. Many people just clone this repo under custom_components. |
but with HACS, people can install it and get updates without having to manage I think I subscribed to this issue because I wanted to use the plugin, but I'm already managing so much software that I actually need package managers like HACS (and docker, and others) to manage the sprawl. |
I'm not opposed to it, just weighing the pain against the benefits. I think it'll make peoples' lives easier long term. I'll just need to post on the forums and update the readme and all that to make the breaking change extremely well documented. Some people don't use HACS, and it will certainly make their lives harder- now they have to |
I'm an SRE by trade and one of my biased opinions is "git is not a deployment tool". You probably use git in your packaging workflows to make "Artifacts" that endusers and sysadmins install. These are ideally some form of Package Managed Object, be it Deploying directly from git is acceptable during development; heck, it's often the only choice when you're churning code and need to test it constantly... but it's hard to turn into a robust long-term solution. As you've already seen, managing paths and subdirectories can get annoying for the needs of Developers vs Deployers. It gets even more bulky and complicated if you start adding test suites, |
Python doesn't exactly need a build pipeline. I'd prefer to have set the repo up in a hacs-compatible way from the start, but not having done that, I don't have the luxury of blindly reorganizing things without considering what might break. As an SRE I am sure you are aware. |
@rsnodgrass looking at the options for manifest.json, it seems like setting https://hacs.xyz/docs/publish/start/#hacsjson If that doesn't work, i'd be more open to setting |
@jshufro since there is only a single sensor.py, the filename approach just might work. I don't know how it works with the manifest.json file. Another solution is to fork this into a new repo jschufro/hass-noaa-tides, add that to HACS, and then add warnings to the existing one that users should switch to the "new" one. Thank you! Look forward to getting automated notification of updates through HACS once this is done. |
"name": "NOAA Tides and Currents", | ||
"domains": ["sensor"], | ||
"render_readme": true, | ||
"filename": "sensor.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"filename": "sensor.py" | |
"filename": "noaa_coops/sensor.py" |
This would keep the path structure of the repo intact so it's the least likely to break anyone's setup.
If it isn't tenable for whatever reason, we can go with what you have here, and I'll just warn anyone who cloned into custom_components/ that they need to reclone into a subpath called noaa_coops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jshufro No that does not work since there are only two options for HACS path structures:
-
custom_components/<integration_name>
-
all files in the root of the repository AND the 'content_in_root' set to True in hacs.json
There is no other path structures supported.
However, one option might be to use a symlink. This may not work on Windows based installations, but should on any Linux or Mac HA instances. Nope, that still did not pass the HACS structure check for integrations.
HOWEVER, how about the reverse. Move noaa_tides into custom_components structure like most integrations that use HACS. Then symlink noaa_tides in root to the new path. This would allow people to install this manually still using whatever mechanism they previously did (e.g. clone, etc) AND also allow HACS to work.
I will test this later this week! Thanks.
…
On Nov 20, 2023 at 10:20 AM, <Jacob Shufro ***@***.***)> wrote:
@jshufro commented on this pull request.
In hacs.json (#22 (comment)):
> @@ -0,0 +1,6 @@ +{ + "name": "NOAA Tides and Currents", + "domains": ["sensor"], + "render_readme": true, + "filename": "sensor.py"
⬇️ Suggested change
- "filename": "sensor.py" + "filename": "noaa_coops/sensor.py"
This would keep the path structure of the repo intact so it's the least likely to break anyone's setup.
If it isn't tenable for whatever reason, we can go with what you have here, and I'll just warn anyone who cloned into custom_components/ that they need to reclone into a subpath called noaa_coops
—
Reply to this email directly, view it on GitHub (#22 (review)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAQY4XA544QMHJ3E7XCW7DDYFONO3AVCNFSM5Z7R4BMKU5DIOJSWCZC7NNSXTPCQOVWGYUTFOF2WK43UKJSXM2LFO45TCNZUGA2DEOBXHE3Q).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Should I be able to test this in HACS via adding the following? Repository: rsnodgrass/home_assistant_noaa_tides Asking as I tried that, but it comes back with an error.
|
…oot path to be a link into custom_components
Try now, the repo structure should now be compliant. |
@jshufro see my comment above about adding a symlink from noaa_tides to custom_components/noaa_tides. This should address your earlier concern about keeping the repo structure intact for those who have some sort of manual clone/install process. |
The updated repo does indeed work with HACS now, thank you. |