Skip to content

Commit

Permalink
Merge next into master for 0.13.0 (#396)
Browse files Browse the repository at this point in the history
* Fix lineheight

* Added status tooltip

* custom log prefix if dev

* fix issue with None in when adding repository

* Bump minimum version

* Use LooseVersion

* add template tester

* Add devcontainer

* update gitignore

* move config

* update

* update

* update

* update

* mv

* Changes to dev container

* Use port 8124

* Add devcontainer docs

* fix reload

* Fix cache issue

* Adds custom_component_helper

* update custom_component_helper

* Adds shebang

* Add readme

* restructure tasks

* typo

* typo

* hide log

* Fix versionhandling for beta/dev versions

* update

* Fix hide

* Initialize onboarding

* Correct issue link fixes #324

* Add migration to schema 5 (Issue #322)

* Return 404

* Add new base structure

* Fix issue #327

* Add integrationhelper

* Add new HacsRepository class

* Add initial theme with new structure

* More additions for new format

* more structure updates

* More changes for new structure

* Add plugin to new structure

* Fix plugin issues

* Fix download issue

* It starts!, it's not working, but it starts!

* not completly broken

* Settings mostly work again

* Move AIOGitHub to external lib

* Adds "tabnine.tabnine-vscode" to devcontainer

* Add initial config_flow support

* More config flow updates

* rename

* Fix CF loading when using yaml

* More updates after restructure

* rename

* Fix layout issues

* Reenable CF

* Adds "github.vscode-pull-request-github"

* update

* format

* update

* Adds TabNine Cloud AutoCompleter

* adds pyls

* Format

* update

* Mostly not total shit

* update

* Not too bad

* Fix backup issues

* it kinda works

* Fix restore for hacs

* updates

* Cleanup on isle 3

* typo

* Startup fixes

* Not all the bad

* updates

* updates

* Fail if loading data failed

* download logs

* fix issues

* Fix pending upgrade

* Changes to restore

* create backups

* More validations

* more fixes

* no attrs

* upgrade

* skip configflow for HACS

* message

* fixes

* fix list after restore

* remove unused const

* Add integrationhelper to requirements

* remove lines

* Fix some restore issues

* Fix migration

* Fix some api calls

* fix typo (#378)

* Wrap progress bar and add margin (#379)

* Add location for settings

* Fix typo

* Highlight active tab (#383)

* Highlight active tab

* Store active when in repository view

* Refactor logic and remove repository tab highlighting

* Fix issue with show_beta

* Fix version restore of HACS

* Version bump

* Force beta for hacs

* Adds AIOGitHubRatelimit exception

* Change exceptions

* flow: Unload HACS when there are issues

* Check for missing manifest

* Change exception

* Fix uninstall bug

* Change repository menu click trigger

* bump version number

* Don't warn about HACS

* Add info about the repositories as attribute

* Goto overview after uninstall

* Fix version select

* fix merge issue

* version bump

* Version change
  • Loading branch information
ludeeus authored Aug 11, 2019
1 parent 5470138 commit 3cd19a2
Show file tree
Hide file tree
Showing 120 changed files with 6,521 additions and 5,875 deletions.
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM python:3.7

ENV DEVCONTAINER True

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN python -m pip install --upgrade colorlog black pylint python-language-server
RUN python -m pip install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
RUN cd && mkdir -p /config/custom_components


WORKDIR /workspace

# Set the default shell to bash instead of sh
ENV SHELL /bin/bash
59 changes: 59 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Devcontainer

_The easiest way to contribute to and/or test this repository._

## Requirements

- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- [docker](https://docs.docker.com/install/)
- [VS Code](https://code.visualstudio.com/)
- [Remote - Containers (VSC Extention)](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)

[More info about requirements and devcontainer in general](https://code.visualstudio.com/docs/remote/containers#_getting-started)

## How to use Devcontainer for development/test

1. Make sure your computer meets the requirements.
1. Fork this repository.
1. Clone the repository to your computer.
1. Open the repository using VS Code.

When you open this repository with VSCode and your computer meets the requirements you are asked to "Reopen in Container", do that.

![reopen](images/reopen.png)

If you don't see this notification, open the command pallet (ctrl+shift+p) and select `Remote-Containers: Reopen Folder in Container`.

_It will now build the devcontainer._

The container have some "tasks" to help you testing your changes.

## Configuration

Make a copy of `.devcontainer\sample_configuration.yaml` and place it here `.devcontainer\configuration.yaml`

Add your github token to the new file.

## Custom Tasks in this repository

_Start "tasks" by opening the the command pallet (ctrl+shift+p) and select `Tasks: Run Task`_

Running tasks like `Start Home Assistant on port 8124` can be restarted by opening the the command pallet (ctrl+shift+p) and select `Tasks: Restart Running Task`, then select the task you want to restart.

### Start Home Assistant on port 8124

This will copy the configuration and the integration files to the expected location in the container.

And start up Home Assistant on [port 8124.](http://localhost:8124)

### Upgrade Home Assistant to latest dev

This will upgrade Home Assistant to the latest dev version.

### Set Home Assistant Version

This allows you to specify a version of Home Assistant to install inside the devcontainer.

### Home Assistant Config Check

This runs a config check to make sure your config is valid.
38 changes: 38 additions & 0 deletions .devcontainer/custom_component_helper
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

function StartHomeAssistant {
echo "Copy configuration.yaml"
cp -f .devcontainer/configuration.yaml /config || echo ".devcontainer/configuration.yaml are missing!" exit 1

echo "Copy the custom component"
rm -R /config/custom_components/ || echo ""
cp -r custom_components /config/custom_components/ || echo "Could not copy the custom_component" exit 1

echo "Start Home Assistant"
hass -c /config
}

function UpdgradeHomeAssistantDev {
python -m pip install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
}

function SetHomeAssistantVersion {
read -p 'Version: ' version
python -m pip install --upgrade homeassistant==$version
}

function HomeAssistantConfigCheck {
hass -c /config --script check_config
}

function InstallTabNine {
echo "Enable TabNine autocomplete"
mkdir -p /root/.config/TabNine
cp -f .devcontainer/tabnine_config.json /root/.config/TabNine
while [ -z "$CLOUD_KEY" ]; do
echo "Enter cloudkey:"
read CLOUD_KEY
done
sed -i "s/REPLACE_CLOUD_KEY/$CLOUD_KEY/g" /root/.config/TabNine/tabnine_config.json
echo "TabNine autocomplete done!"
}
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "HACS dev",
"context": "..",
"dockerFile": "Dockerfile",
"appPort": "8124:8123",
"runArgs": [
"-e",
"GIT_EDTIOR='code --wait'"
],
"extensions": [
"ms-python.python",
"github.vscode-pull-request-github",
"tabnine.tabnine-vscode"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"python.pythonPath": "/usr/local/bin/python",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
Binary file added .devcontainer/images/reopen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions .devcontainer/sample_configuration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
default_config:
logger:
default: error
logs:
custom_components.hacs: debug


hacs:
token: CHANGE_ME
appdaemon: true
python_script: true
theme: true
dev: true
15 changes: 15 additions & 0 deletions .devcontainer/tabnine_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.2",
"hide_promotional_message": false,
"beta_enabled": "No",
"ignore_all_lsp": false,
"semantic_status": {},
"disable_auto_update": false,
"user_understands_that_enabling_tabnine_cloud_sends_code_to_tabnine_servers": true,
"hosted_deep_completions_enabled": "Enabled",
"tabnine_cloud_host": null,
"tabnine_cloud_port": null,
"cloud_whitelist": [],
"api_key": "REPLACE_CLOUD_KEY",
"api_key_service_level": "Cloud"
}
32 changes: 16 additions & 16 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/flag.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: flag
about: Flagging of content shown
title: ''
labels: flag
assignees: ludeeus

---

## Describe why you are flagging this
---
name: flag
about: Flagging of content shown
title: ''
labels: flag
assignees: ludeeus

---

## Describe why you are flagging this
68 changes: 34 additions & 34 deletions .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
---
name: Issue
about: Create a new issue

---

<!-- Before you open a new issue, search through the existing issues to see if others have had the same problem.
Issues not containing the minimum requirements will be closed:
- Issues without a description (using the header is not good enough) will be closed.
- Issues without debug logging will be closed.
-->

## Version of HACS

<!-- If you are not using the newest version, download and try that before opening an issue
If you are unsure about the version check the "SETTINGS" tab.
-->


## Describe the bug
A clear and concise description of what the bug is.


## Debug log

<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/ -->

```text
Add your logs here.
---
name: Issue
about: Create a new issue

---

<!-- Before you open a new issue, search through the existing issues to see if others have had the same problem.
Issues not containing the minimum requirements will be closed:
- Issues without a description (using the header is not good enough) will be closed.
- Issues without debug logging will be closed.
-->

## Version of HACS

<!-- If you are not using the newest version, download and try that before opening an issue
If you are unsure about the version check the "SETTINGS" tab.
-->


## Describe the bug
A clear and concise description of what the bug is.


## Debug log

<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/ -->

```text
Add your logs here.
```
4 changes: 2 additions & 2 deletions .github/delete-merged-branch-config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
exclude:
- master
exclude:
- master
- next
44 changes: 22 additions & 22 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
repository:
private: false
has_issues: true
has_projects: false
has_wiki: false
has_downloads: false
default_branch: master
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: false
labels:
- name: "Feature Request"
color: "fbca04"
- name: "Bug"
color: "b60205"
- name: "Wont Fix"
color: "ffffff"
- name: "Enhancement"
color: a2eeef
- name: "Documentation"
color: "008672"
- name: "Stale"
repository:
private: false
has_issues: true
has_projects: false
has_wiki: false
has_downloads: false
default_branch: master
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: false
labels:
- name: "Feature Request"
color: "fbca04"
- name: "Bug"
color: "b60205"
- name: "Wont Fix"
color: "ffffff"
- name: "Enhancement"
color: a2eeef
- name: "Documentation"
color: "008672"
- name: "Stale"
color: "930191"
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
site
.pytest*
__pycache__
site
.pytest*
__pycache__
settings.json
.devcontainer/configuration.yaml
Loading

0 comments on commit 3cd19a2

Please sign in to comment.