Skip to content

Commit

Permalink
Add HACS and bumpversion
Browse files Browse the repository at this point in the history
  • Loading branch information
pcourbin committed May 13, 2021
1 parent 9573123 commit 1be836c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 33 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
"python.pythonPath": "/usr/bin/python",
"files.associations": {
"*.yaml": "home-assistant"
}
},
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true
}
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[![License][license-shield]](LICENSE)
[![hacs][hacsbadge]][hacs]
[![Community Forum][forum-shield]][forum]

[![pre-commit][pre-commit-shield]][pre-commit]
[![Black][black-shield]][black]

[![Project Maintenance][maintenance-shield]][user_profile]
[![BuyMeCoffee][buymecoffeebadge]][buymecoffee]

Expand All @@ -15,6 +14,14 @@ It uses python package [pyimaprotect](https://github.com/pcourbin/pyimaprotect)

## Installation

### [HACS][hacs]

1. Search "IMA Protect Alarm" in `integrations` of [HACS][hacs] store.
2. Click install.
3. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "IMA Protect Alarm".

### From source

Copy the `custom_components/imaprotect` folder into the config folder.

## Configuration
Expand All @@ -40,16 +47,16 @@ sensor:
password: "mypassword"
```
[license-shield]: https://img.shields.io/github/license/pcourbin/imaprotect.svg?style=for-the-badge
[license-shield]: https://img.shields.io/github/license/pcourbin/imaprotect.svg
[hacs]: https://hacs.xyz
[hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge
[hacsbadge]: https://img.shields.io/badge/HACS-Default-orange.svg
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg
[forum]: https://community.home-assistant.io/
[pre-commit]: https://github.com/pre-commit/pre-commit
[pre-commit-shield]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=for-the-badge
[pre-commit-shield]: https://img.shields.io/badge/pre--commit-enabled-brightgreen
[black]: https://github.com/psf/black
[black-shield]: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge
[maintenance-shield]: https://img.shields.io/badge/maintainer-%40pcourbin-blue.svg?style=for-the-badge
[black-shield]: https://img.shields.io/badge/code%20style-black-000000.svg
[maintenance-shield]: https://img.shields.io/badge/maintainer-%40pcourbin-blue.svg
[buymecoffee]: https://www.buymeacoffee.com/pcourbin
[buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge
[buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg
[user_profile]: https://github.com/pcourbin
10 changes: 3 additions & 7 deletions custom_components/imaprotect/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
"domain": "imaprotect",
"documentation": "https://github.com/pcourbin/imaprotect",
"issue_tracker": "https://github.com/pcourbin/imaprotect/issues",
"codeowners": [
"@pcourbin"
],
"codeowners": ["@pcourbin"],
"config_flow": true,
"requirements": [
"pyimaprotect==2.0.0"
],
"requirements": ["pyimaprotect==2.0.0"],
"dependencies": [],
"version": "0.3.0",
"iot_class": "cloud_polling"
}
}
34 changes: 18 additions & 16 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
[bumpversion]
current_version = 0.3.0
commit = True
tag = True

[bumpversion:file:custom_components/imaprotect/manifest.json]
search = "version": "{current_version}"
replace = "version": "{new_version}"

[tool.black]
line-length = 119

[flake8]
exclude = .env,.venv,.git,.tox,docs,venv,bin,lib,deps,build
doctests = True
# To work with Black
max-line-length = 88
# E501: line too long
# E722: do not use bare 'except'
ignore =
E501,
E722
max-line-length = 119
ignore = E501, E722

[isort]
# https://github.com/timothycrosley/isort
# https://github.com/timothycrosley/isort/wiki/isort-Settings
# splits long import on multiple lines indented by 4 spaces
multi_line_output = 3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
line_length = 119
indent = " "
# by default isort don't check module indexes
not_skip = __init__.py
# will group `import x` and `from x import` of the same module.
force_sort_within_sections = true
sections = FUTURE,STDLIB,INBETWEENS,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
default_section = THIRDPARTY
Expand Down

0 comments on commit 1be836c

Please sign in to comment.