Coder Social home page Coder Social logo

mithomas / hacs-only-betas-not-visisble Goto Github PK

View Code? Open in Web Editor NEW

This project forked from boralyl/github-custom-component-tutorial

0.0 0.0 0.0 58 KB

A tutorial for creating a custom component for Home Assistant using GitHub's API.

License: MIT License

Python 100.00%

hacs-only-betas-not-visisble's Introduction

Github Custom for Home Assistant

About

This repo contains a custom component for Home Assistant that was created in a tutorial series on aarongodfrey.dev.

The tutorial walks through the steps to create a custom component for use in Home Assistant.

What It Is

An integration that monitors GitHub repositories specified in a configuration.yaml file or optionally via the Integrations UI.

Running Tests

To run the test suite create a virtualenv (I recommend checking out pyenv and pyenv-virtualenv for this) and install the test requirements.

$ pip install -r requirements.test.txt

After the test dependencies are installed you can simply invoke pytest to run the test suite.

$ pytest
Test session starts (platform: linux, Python 3.7.5, pytest 5.4.3, pytest-sugar 0.9.4)
rootdir: /home/aaron/projects/github-custom, inifile: setup.cfg, testpaths: tests
plugins: forked-1.3.0, timeout-1.4.2, cov-2.10.1, aiohttp-0.3.0, requests-mock-1.8.0, xdist-2.1.0, sugar-0.9.4, test-groups-1.0.3, homeassistant-custom-component-0.0.20
collecting ...
 tests/test_config_flow.py ✓✓✓✓✓✓✓✓✓✓✓                                                                                                                                          85% ████████▌
 tests/test_sensor.py ✓✓                                                                                                                                                       100% ██████████

----------- coverage: platform linux, python 3.7.5-final-0 -----------
Name                                             Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------
custom_components/__init__.py                        0      0   100%
custom_components/github_custom/__init__.py         12      0   100%
custom_components/github_custom/config_flow.py      23      0   100%
custom_components/github_custom/const.py            18      0   100%
custom_components/github_custom/sensor.py           97      5    95%   86-89, 121
------------------------------------------------------------------------------
TOTAL                                              150      5    97%

Required test coverage of 93.0% reached. Total coverage: 96.67%

Results (0.73s):
      13 passed

hacs-only-betas-not-visisble's People

Contributors

boralyl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.