Skip to content

Commit 3ab1add

Browse files
authored
Initial implementation of supervisor client (#1)
* Initial commit * Changes from feedback and allow some enums to change in future * Finish link install in ci workflow * Add the link install instruction to the readme * Remove pylint and requirements file, rename and more * Fixes from feedback * Remove fallback typing from UpdateType
1 parent 9c9e492 commit 3ab1add

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3492
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "Supervisor dev",
3+
"context": "..",
4+
"dockerFile": "../Dockerfile.dev",
5+
"containerEnv": {
6+
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
7+
},
8+
"remoteEnv": {
9+
"PATH": "${containerEnv:VIRTUAL_ENV}/bin:${containerEnv:PATH}"
10+
},
11+
"postCreateCommand": "script/devcontainer_setup",
12+
"postStartCommand": "bash devcontainer_bootstrap",
13+
"runArgs": ["-e", "GIT_EDITOR=code --wait"],
14+
"customizations": {
15+
"vscode": {
16+
"extensions": [
17+
"charliermarsh.ruff",
18+
"ms-python.vscode-pylance",
19+
"visualstudioexptteam.vscodeintellicode",
20+
"redhat.vscode-yaml",
21+
"esbenp.prettier-vscode",
22+
"GitHub.vscode-pull-request-github",
23+
"tamasfe.even-better-toml"
24+
],
25+
"settings": {
26+
"python.defaultInterpreterPath": "/home/vscode/.local/ha-venv/bin/python",
27+
"python.pythonPath": "/home/vscode/.local/ha-venv/bin/python",
28+
"python.terminal.activateEnvInCurrentTerminal": true,
29+
"python.testing.pytestArgs": ["--no-cov"],
30+
"editor.formatOnPaste": false,
31+
"editor.formatOnSave": true,
32+
"editor.formatOnType": true,
33+
"files.trimTrailingWhitespace": true,
34+
"terminal.integrated.profiles.linux": {
35+
"zsh": {
36+
"path": "/usr/bin/zsh"
37+
}
38+
},
39+
"terminal.integrated.defaultProfile.linux": "zsh",
40+
"[python]": {
41+
"editor.defaultFormatter": "charliermarsh.ruff"
42+
}
43+
}
44+
}
45+
}
46+
}

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text eol=lf
2+
*.py whitespace=error

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.github/* @mdegat01

.github/CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Code of conduct
2+
3+
## Our pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention
26+
or advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or
30+
electronic address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate
32+
in a professional setting
33+
34+
## Our responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project lead at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project lead is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
71+
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

.github/CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish
4+
to make via issue, email, or any other method with the owners of this repository
5+
before making a change.
6+
7+
Please note we have a code of conduct, please follow it in all your interactions
8+
with the project.
9+
10+
## Issues and feature requests
11+
12+
You've found a bug in the source code, a mistake in the documentation or maybe
13+
you'd like a new feature? You can help us by submitting an issue to our
14+
[GitHub Repository][github]. Before you create an issue, make sure you search
15+
the archive, maybe your question was already answered.
16+
17+
Even better: You could submit a pull request with a fix / new feature!
18+
19+
## Pull request process
20+
21+
1. Search our repository for open or closed [pull requests][prs] that relates
22+
to your submission. You don't want to duplicate effort.
23+
24+
2. You may merge the pull request in once you have the sign-off of another
25+
developer, or if you do not have permission to do that, you may request
26+
the reviewer to merge it for you.
27+
28+
[github]: https://github.com/home-assistant-libs/python-supervisor-client/issues
29+
[prs]: https://github.com/home-assistant-libs/python-supervisor-client/pulls

.github/FUNDING.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
github:
3+
- mdegat01

.github/ISSUE_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Problem/Motivation
2+
3+
> (Why the issue was filed)
4+
5+
## Expected behavior
6+
7+
> (What you expected to happen)
8+
9+
## Actual behavior
10+
11+
> (What actually happened)
12+
13+
## Steps to reproduce
14+
15+
> (How can someone else make/see it happen)
16+
17+
## Proposed changes
18+
19+
> (If you have a proposed change, workaround or fix,
20+
> describe the rationale behind it)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Proposed Changes
2+
3+
> (Describe the changes and rationale behind them)
4+
5+
## Related Issues
6+
7+
> ([Github link][autolink-references] to related issues or pull requests)
8+
9+
[autolink-references]: https://help.github.com/articles/autolinked-references-and-urls/

.github/labels.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
- name: "breaking-change"
3+
color: ee0701
4+
description: "A breaking change for existing users."
5+
- name: "bugfix"
6+
color: ee0701
7+
description: >-
8+
Inconsistencies or issues which will cause a problem for users or
9+
implementers.
10+
- name: "documentation"
11+
color: 0052cc
12+
description: "Solely about the documentation of the project."
13+
- name: "enhancement"
14+
color: 1d76db
15+
description: "Enhancement of the code, not introducing new features."
16+
- name: "refactor"
17+
color: 1d76db
18+
description: "Improvement of existing code, not introducing new features."
19+
- name: "performance"
20+
color: 1d76db
21+
description: "Improving performance, not introducing new features."
22+
- name: "new-feature"
23+
color: 0e8a16
24+
description: "New features or options."
25+
- name: "maintenance"
26+
color: 2af79e
27+
description: "Generic maintenance tasks."
28+
- name: "ci"
29+
color: 1d76db
30+
description: "Work that improves the continue integration."
31+
- name: "dependencies"
32+
color: 1d76db
33+
description: "Upgrade or downgrade of project dependencies."
34+
35+
- name: "in-progress"
36+
color: fbca04
37+
description: "Issue is currently being resolved by a developer."
38+
- name: "stale"
39+
color: fef2c0
40+
description: >-
41+
There has not been activity on this issue or PR for quite some time.
42+
- name: "no-stale"
43+
color: fef2c0
44+
description: "This issue or PR is exempted from the stable bot."
45+
46+
- name: "security"
47+
color: ee0701
48+
description: "Marks a security issue that needs to be resolved asap."
49+
- name: "incomplete"
50+
color: fef2c0
51+
description: "Marks a PR or issue that is missing information."
52+
- name: "invalid"
53+
color: fef2c0
54+
description: "Marks a PR or issue that is missing information."
55+
56+
- name: "beginner-friendly"
57+
color: 0e8a16
58+
description: >-
59+
Good first issue for people wanting to contribute to the project.
60+
- name: "help-wanted"
61+
color: 0e8a16
62+
description: >-
63+
We need some extra helping hands or expertise in order to resolve this.
64+
65+
- name: "hacktoberfest"
66+
description: "Issues/PRs are participating in the Hacktoberfest."
67+
color: fbca04
68+
- name: "hacktoberfest-accepted"
69+
description: "Issues/PRs are participating in the Hacktoberfest."
70+
color: fbca04
71+
72+
- name: "priority-critical"
73+
color: ee0701
74+
description: >-
75+
This should be dealt with ASAP. Not fixing this issue would be a serious
76+
error.
77+
- name: "priority-high"
78+
color: b60205
79+
description: >-
80+
After critical issues are fixed, these should be dealt with before any
81+
further issues.
82+
- name: "priority-medium"
83+
color: 0e8a16
84+
description: "This issue may be useful, and needs some attention."
85+
- name: "priority-low"
86+
color: e4ea8a
87+
description: "Nice addition, maybe... someday..."
88+
89+
- name: "major"
90+
color: b60205
91+
description: "This PR causes a major version bump in the version number."
92+
- name: "minor"
93+
color: 0e8a16
94+
description: "This PR causes a minor version bump in the version number."

.github/release-drafter.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
change-template: "- #$NUMBER $TITLE @$AUTHOR"
3+
sort-direction: ascending
4+
5+
categories:
6+
- title: ":boom: Breaking Changes"
7+
label: "breaking-change"
8+
9+
- title: ":wrench: Build"
10+
label: "build"
11+
12+
- title: ":boar: Chore"
13+
label: "chore"
14+
15+
- title: ":sparkles: New Features"
16+
label: "new-feature"
17+
18+
- title: ":zap: Performance"
19+
label: "performance"
20+
21+
- title: ":recycle: Refactor"
22+
label: "refactor"
23+
24+
- title: ":green_heart: CI"
25+
label: "ci"
26+
27+
- title: ":bug: Bug Fixes"
28+
label: "bugfix"
29+
30+
- title: ":white_check_mark: Test"
31+
label: "test"
32+
33+
- title: ":arrow_up: Dependency Updates"
34+
label: "dependencies"
35+
collapse-after: 1
36+
37+
include-labels:
38+
- "breaking-change"
39+
- "build"
40+
- "chore"
41+
- "performance"
42+
- "refactor"
43+
- "new-feature"
44+
- "bugfix"
45+
- "dependencies"
46+
- "test"
47+
- "ci"
48+
49+
template: |
50+
51+
$CHANGES

0 commit comments

Comments
 (0)