From e90f7b2fbce9b02a5d9940440cc95a403bed8739 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 26 Sep 2016 21:51:56 +0200 Subject: [PATCH] Add initial maintenance docs --- source/developers/maintenance.markdown | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 source/developers/maintenance.markdown diff --git a/source/developers/maintenance.markdown b/source/developers/maintenance.markdown new file mode 100644 index 00000000000..3419830e31b --- /dev/null +++ b/source/developers/maintenance.markdown @@ -0,0 +1,42 @@ +--- +layout: page +title: "Maintenance" +description: "Steps involved to maintain the current state of Home Assistant." +date: 2016-09-13 17:00 +sidebar: true +comments: false +sharing: true +footer: true +--- + +This page documents a couple of points for maintaining the Home Assistant code. Most of the tasks don't need to be performed on a regular base thus the steps, used tools, or details are preserved here. + +### {% linkable_title Line separator %} + +People are using various operating systems to develop components and platforms for Home Assistant. This could lead to different line endings on file. We prefer `LN`. Especially Microsoft Windows tools tend to use `CRLF`. + +```bash +$ find homeassistant -name "*.py" -exec file {} \; | grep BOM +$ find homeassistant -name "*.py" -exec file {} \; | grep CRLF +``` + +To fix the line spearator, use `dos2unix` or `sed`. + +```bash +$ dos2unix homeassistant/components/notify/kodi.py +``` + +### {% linkable_title Dependencies %} + +A lot of components and platforms depends on third-party Python modules. The dependencies which are stored in the `requirements_*.txt` files are tracked by [gemnasium](https://gemnasium.com/github.com/home-assistant/home-assistant) and [Requires.io](https://requires.io/github/home-assistant/home-assistant/requirements/?branch=dev). + +If you update the requirements of a component/platform through the `REQUIREMENTS = ['modules-xyz==0.3']` entry, run the provided script to update the `requirements_*.txt` file(s). + +```bash +$ script/gen_requirements_all.py +``` + +Start a test run of Home Assistant if that was successful include all files in a Pull Request. Add a short summary of the changes, a sample configuration entry, details about the tests, and other useful information to the description. + + +