HomeAssistant vs Github

Hi, just an informal question, i want to know how home assistant works on github :slight_smile: , just want to know the background for this

so lets say, as an example
someone creates a platform, camera - synology
Github : https://github.com/snjoetw/py-synology

in home assistant github, the synology.py points to that package py-synology

so am i correct saying
If the user snjoetw, removes his repository, that homeassistant is unable to install py-synology? or all all those repositories also in homeassistant included?
if the users snjoetw changes something in py-synology , are those changes affected immediately?

so in other words , how does github and end developers work with each other? just interested in this kind of stuff

Additionally, if snjoetw stops updating the synology.py package. Can someone else take over?

yes, i think so, just copy paste all files, and start working , all source files are there

BUT, will this be reflected in HA or must it be a custom component. the “original” will not be updated again? I dont really get it…

indeed, interesting ,
because if you look in this file :

https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/camera/synology.py

i dont see there any link to the py-package …
so how does HA know to pull that package? the only thing i see =

REQUIREMENTS = ['py-synology==0.2.0']

i also forked some interesting projects on my account (backup), but actually i dont know what it does…
So i have somekind of duplicate repository, so if the original user deletes the project, is it also deleted from my github?

A developer can host the source code for a project on GitHub. If a Home Assistant component or platform requires that external code to work, the developer must push a packaged version of that code to PyPI (Python Package Index) with a version number. The “requirements” line you found tells HA to download that version of the package from PyPI.

If the developer updates the code of that project and HA can take advantage of something in the update, the dev must push a new version of that package to PyPI, and the “requirements” line in the HA component or platform needs to be changed to require the newer version of the package.

cool, but where is the location of those packages (PyPi) ? is that then globally? or somewhere in homeassistant?

ah, so once a package is in PyPi, it cant be changed anymore? so HA pulls from PyPI
so PyPi down? byebye HA? :slight_smile:

ok, and what about forking? is a fork always synched? so if owner updates , it updates also on my github?
if owners deletes, it also deleted from my github ?

it would need a new version uploaded to be changed.

well, if the python package index goes down, HA is probably the least of your worries of broken software. LOL.

No, that is up to the person that forked it.

nope, you need to sync and merge their changes into yours.

nope. your repo is yours.

verry interesting, thxn for feedback

But take the Arlo component. That component is not maintained, there is now a custom component for Arlo. Much better, how will this replace te old if the old is not maintained anymore? Will it be a new component “Arlo2”? Or can the new developer overwrite the old??

That’s at the discretion of the HA core team. I think the strong preference is to give the original dev a change to continue maintaining. But in the case that the original dev has truly abandoned the project, the only option is to submit a PR to change the HA component or platform’s requirement and make any changes necessary to the component or platform to get it working with the new library.