python-bsblan 2.0.1__tar.gz → 2.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. python_bsblan-2.2.1/.editorconfig +22 -0
  2. python_bsblan-2.2.1/.gitattributes +2 -0
  3. python_bsblan-2.2.1/.github/CODE_OF_CONDUCT.md +74 -0
  4. python_bsblan-2.2.1/.github/CONTRIBUTING.md +29 -0
  5. python_bsblan-2.2.1/.github/ISSUE_TEMPLATE/PULL_REQUEST_TEMPLATE.md +71 -0
  6. python_bsblan-2.2.1/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
  7. python_bsblan-2.2.1/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
  8. python_bsblan-2.2.1/.github/LICENSE.md +21 -0
  9. python_bsblan-2.2.1/.github/labels.yml +85 -0
  10. python_bsblan-2.2.1/.github/release-drafter.yml +57 -0
  11. python_bsblan-2.2.1/.github/renovate.json +48 -0
  12. python_bsblan-2.2.1/.github/workflows/codeql.yaml +24 -0
  13. python_bsblan-2.2.1/.github/workflows/labels.yaml +23 -0
  14. python_bsblan-2.2.1/.github/workflows/linting.yaml +165 -0
  15. python_bsblan-2.2.1/.github/workflows/lock.yaml +21 -0
  16. python_bsblan-2.2.1/.github/workflows/pr-labels.yaml +27 -0
  17. python_bsblan-2.2.1/.github/workflows/release-drafter.yaml +19 -0
  18. python_bsblan-2.2.1/.github/workflows/release.yaml +54 -0
  19. python_bsblan-2.2.1/.github/workflows/stale.yaml +40 -0
  20. python_bsblan-2.2.1/.github/workflows/tests.yaml +77 -0
  21. python_bsblan-2.2.1/.github/workflows/typing.yaml +32 -0
  22. python_bsblan-2.2.1/.gitignore +122 -0
  23. python_bsblan-2.2.1/.nvmrc +1 -0
  24. python_bsblan-2.2.1/.pre-commit-config.yaml +128 -0
  25. python_bsblan-2.2.1/.prettierignore +1 -0
  26. python_bsblan-2.2.1/.yamllint +77 -0
  27. {python_bsblan-2.0.1 → python_bsblan-2.2.1}/PKG-INFO +24 -26
  28. {python_bsblan-2.0.1 → python_bsblan-2.2.1}/README.md +7 -5
  29. python_bsblan-2.2.1/examples/control.py +237 -0
  30. python_bsblan-2.2.1/examples/ruff.toml +7 -0
  31. python_bsblan-2.2.1/package-lock.json +57 -0
  32. python_bsblan-2.2.1/package.json +17 -0
  33. {python_bsblan-2.0.1 → python_bsblan-2.2.1}/pyproject.toml +56 -46
  34. python_bsblan-2.2.1/sonar-project.properties +17 -0
  35. {python_bsblan-2.0.1 → python_bsblan-2.2.1}/src/bsblan/__init__.py +5 -4
  36. {python_bsblan-2.0.1 → python_bsblan-2.2.1}/src/bsblan/bsblan.py +8 -2
  37. {python_bsblan-2.0.1 → python_bsblan-2.2.1}/src/bsblan/exceptions.py +6 -0
  38. python_bsblan-2.2.1/tests/__init__.py +10 -0
  39. python_bsblan-2.2.1/tests/conftest.py +44 -0
  40. python_bsblan-2.2.1/tests/fixtures/device.json +42 -0
  41. python_bsblan-2.2.1/tests/fixtures/dict_version.json +23 -0
  42. python_bsblan-2.2.1/tests/fixtures/hot_water_state.json +264 -0
  43. python_bsblan-2.2.1/tests/fixtures/info.json +29 -0
  44. python_bsblan-2.2.1/tests/fixtures/password.txt +1 -0
  45. python_bsblan-2.2.1/tests/fixtures/sensor.json +20 -0
  46. python_bsblan-2.2.1/tests/fixtures/state.json +89 -0
  47. python_bsblan-2.2.1/tests/fixtures/static_state.json +16 -0
  48. python_bsblan-2.2.1/tests/fixtures/thermostat_hvac.json +5 -0
  49. python_bsblan-2.2.1/tests/fixtures/thermostat_temp.json +5 -0
  50. python_bsblan-2.2.1/tests/ruff.toml +12 -0
  51. python_bsblan-2.2.1/tests/test_api_initialization.py +50 -0
  52. python_bsblan-2.2.1/tests/test_api_validation.py +182 -0
  53. python_bsblan-2.2.1/tests/test_auth.py +53 -0
  54. python_bsblan-2.2.1/tests/test_bsblan.py +240 -0
  55. python_bsblan-2.2.1/tests/test_configuration.py +75 -0
  56. python_bsblan-2.2.1/tests/test_context_manager.py +72 -0
  57. python_bsblan-2.2.1/tests/test_device.py +42 -0
  58. python_bsblan-2.2.1/tests/test_dhw_time_switch.py +180 -0
  59. python_bsblan-2.2.1/tests/test_entity_info.py +99 -0
  60. python_bsblan-2.2.1/tests/test_hotwater_state.py +121 -0
  61. python_bsblan-2.2.1/tests/test_info.py +41 -0
  62. python_bsblan-2.2.1/tests/test_initialization.py +235 -0
  63. python_bsblan-2.2.1/tests/test_reset_validation.py +51 -0
  64. python_bsblan-2.2.1/tests/test_sensor.py +52 -0
  65. python_bsblan-2.2.1/tests/test_set_hotwater.py +262 -0
  66. python_bsblan-2.2.1/tests/test_state.py +90 -0
  67. python_bsblan-2.2.1/tests/test_static_state.py +46 -0
  68. python_bsblan-2.2.1/tests/test_temperature_unit.py +97 -0
  69. python_bsblan-2.2.1/tests/test_temperature_validation.py +64 -0
  70. python_bsblan-2.2.1/tests/test_thermostat.py +150 -0
  71. python_bsblan-2.2.1/tests/test_utility.py +162 -0
  72. python_bsblan-2.2.1/tests/test_utility_additional.py +96 -0
  73. python_bsblan-2.2.1/tests/test_version_errors.py +204 -0
  74. python_bsblan-2.2.1/uv.lock +1939 -0
  75. {python_bsblan-2.0.1 → python_bsblan-2.2.1}/src/bsblan/constants.py +0 -0
  76. {python_bsblan-2.0.1 → python_bsblan-2.2.1}/src/bsblan/models.py +0 -0
  77. {python_bsblan-2.0.1 → python_bsblan-2.2.1}/src/bsblan/utility.py +0 -0
@@ -0,0 +1,22 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_style = space
7
+ insert_final_newline = true
8
+ trim_trailing_whitespace = true
9
+ indent_size = 4
10
+
11
+ [*.md]
12
+ indent_size = 2
13
+ trim_trailing_whitespace = false
14
+
15
+ [*.json]
16
+ indent_size = 2
17
+
18
+ [{.gitignore,.gitkeep,.editorconfig}]
19
+ indent_size = 2
20
+
21
+ [Makefile]
22
+ ident_style = tab
@@ -0,0 +1,2 @@
1
+ * text eol=lf
2
+ *.py whitespace=error
@@ -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 frenck@addons.community. 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/
@@ -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
+ 1. You may merge the pull request in once you have the sign-off of two other
25
+ developers, or if you do not have permission to do that, you may request
26
+ the second reviewer to merge it for you.
27
+
28
+ [github]: https://github.com/liudger/python-bsblan/issues
29
+ [prs]: https://github.com/liudger/python-bsblan/pulls
@@ -0,0 +1,71 @@
1
+ <!--
2
+ You are amazing! Thanks for contributing to our project!
3
+ Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
4
+ -->
5
+
6
+ ## Breaking change
7
+
8
+ <!--
9
+ If your PR contains a breaking change for existing users, it is important
10
+ to tell them what breaks, how to make it work again and why we did this.
11
+ This piece of text is published with the release notes, so it helps if you
12
+ write it towards our users, not us.
13
+ Note: Remove this section if this PR is NOT a breaking change.
14
+ -->
15
+
16
+ ## Proposed change
17
+
18
+ <!--
19
+ Describe the big picture of your changes here to communicate to the
20
+ maintainers why we should accept this pull request. If it fixes a bug
21
+ or resolves a feature request, be sure to link to that issue in the
22
+ additional information section.
23
+ -->
24
+
25
+ ## Type of change
26
+
27
+ <!--
28
+ What type of change does your PR introduce to Home Assistant?
29
+ NOTE: Please, check only 1! box!
30
+ If your PR requires multiple boxes to be checked, you'll most likely need to
31
+ split it into multiple PRs. This makes things easier and faster to code review.
32
+ -->
33
+
34
+ - [ ] Dependency upgrade
35
+ - [ ] Bugfix (non-breaking change which fixes an issue)
36
+ - [ ] New feature
37
+ - [ ] Breaking change (fix/feature causing existing functionality to break)
38
+ - [ ] Code quality improvements to existing code or addition of tests
39
+
40
+ ## Additional information
41
+
42
+ <!--
43
+ Details are important, and help maintainers processing your PR.
44
+ Please be sure to fill out additional details, if applicable.
45
+ -->
46
+
47
+ - This PR fixes or closes issue: fixes #
48
+ - This PR is related to issue:
49
+ - Link to documentation pull request:
50
+
51
+ ## Checklist
52
+
53
+ <!--
54
+ Put an `x` in the boxes that apply. You can also fill these out after
55
+ creating the PR. If you're unsure about any of them, don't hesitate to ask.
56
+ We're here to help! This is simply a reminder of what we are going to look
57
+ for before merging your code.
58
+ -->
59
+
60
+ - [ ] The code change is tested and works locally.
61
+ - [ ] Local tests pass. **Your PR cannot be merged unless tests pass**
62
+ - [ ] There is no commented out code in this PR.
63
+ - [ ] The code has been formatted using Black (`black --fast homeassistant tests`)
64
+ - [ ] Tests have been added to verify that the new code works.
65
+
66
+ If user exposed functionality or configuration variables are added/changed:
67
+
68
+ - [ ] Documentation added/updated for example/control.py and readme
69
+
70
+ <!--
71
+ Thank you for contributing <3
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ""
5
+ labels: ""
6
+ assignees: ""
7
+ ---
8
+
9
+ **Describe the bug**
10
+ A clear and concise description of what the bug is.
11
+
12
+ **To Reproduce**
13
+ Steps to reproduce the behavior:
14
+
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Desktop (please complete the following information):**
27
+
28
+ - OS: [e.g. iOS]
29
+ - Browser [e.g. chrome, safari]
30
+ - Version [e.g. 22]
31
+
32
+ **Smartphone (please complete the following information):**
33
+
34
+ - Device: [e.g. iPhone6]
35
+ - OS: [e.g. iOS8.1]
36
+ - Browser [e.g. stock browser, safari]
37
+ - Version [e.g. 22]
38
+
39
+ **Additional context**
40
+ Add any other context about the problem here.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ""
5
+ labels: ""
6
+ assignees: ""
7
+ ---
8
+
9
+ **Is your feature request related to a problem? Please describe.**
10
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11
+
12
+ **Describe the solution you'd like**
13
+ A clear and concise description of what you want to happen.
14
+
15
+ **Describe alternatives you've considered**
16
+ A clear and concise description of any alternative solutions or features you've considered.
17
+
18
+ **Additional context**
19
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2023-2024 Willem-Jan L. van Rootselaar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,85 @@
1
+ ---
2
+ - name: "breaking-change"
3
+ color: ee0701
4
+ description: "A breaking change for existing users."
5
+ - name: "bugfix"
6
+ color: ee0701
7
+ description: "Inconsistencies or issues which will cause a problem for users or implementers."
8
+ - name: "documentation"
9
+ color: 0052cc
10
+ description: "Solely about the documentation of the project."
11
+ - name: "enhancement"
12
+ color: 1d76db
13
+ description: "Enhancement of the code, not introducing new features."
14
+ - name: "refactor"
15
+ color: 1d76db
16
+ description: "Improvement of existing code, not introducing new features."
17
+ - name: "performance"
18
+ color: 1d76db
19
+ description: "Improving performance, not introducing new features."
20
+ - name: "new-feature"
21
+ color: 0e8a16
22
+ description: "New features or options."
23
+ - name: "maintenance"
24
+ color: 2af79e
25
+ description: "Generic maintenance tasks."
26
+ - name: "ci"
27
+ color: 1d76db
28
+ description: "Work that improves the continue integration."
29
+ - name: "dependencies"
30
+ color: 1d76db
31
+ description: "Upgrade or downgrade of project dependencies."
32
+
33
+ - name: "in-progress"
34
+ color: fbca04
35
+ description: "Issue is currently being resolved by a developer."
36
+ - name: "stale"
37
+ color: fef2c0
38
+ description: "There has not been activity on this issue or PR for quite some time."
39
+ - name: "no-stale"
40
+ color: fef2c0
41
+ description: "This issue or PR is exempted from the stable bot."
42
+
43
+ - name: "security"
44
+ color: ee0701
45
+ description: "Marks a security issue that needs to be resolved asap."
46
+ - name: "incomplete"
47
+ color: fef2c0
48
+ description: "Marks a PR or issue that is missing information."
49
+ - name: "invalid"
50
+ color: fef2c0
51
+ description: "Marks a PR or issue that is missing information."
52
+
53
+ - name: "beginner-friendly"
54
+ color: 0e8a16
55
+ description: "Good first issue for people wanting to contribute to the project."
56
+ - name: "help-wanted"
57
+ color: 0e8a16
58
+ description: "We need some extra helping hands or expertise in order to resolve this."
59
+
60
+ - name: "hacktoberfest"
61
+ description: "Issues/PRs are participating in the Hacktoberfest."
62
+ color: fbca04
63
+ - name: "hacktoberfest-accepted"
64
+ description: "Issues/PRs are participating in the Hacktoberfest."
65
+ color: fbca04
66
+
67
+ - name: "priority-critical"
68
+ color: ee0701
69
+ description: "This should be dealt with ASAP. Not fixing this issue would be a serious error."
70
+ - name: "priority-high"
71
+ color: b60205
72
+ description: "After critical issues are fixed, these should be dealt with before any further issues."
73
+ - name: "priority-medium"
74
+ color: 0e8a16
75
+ description: "This issue may be useful, and needs some attention."
76
+ - name: "priority-low"
77
+ color: e4ea8a
78
+ description: "Nice addition, maybe... someday..."
79
+
80
+ - name: "major"
81
+ color: b60205
82
+ description: "This PR causes a major version bump in the version number."
83
+ - name: "minor"
84
+ color: 0e8a16
85
+ description: "This PR causes a minor version bump in the version number."
@@ -0,0 +1,57 @@
1
+ ---
2
+ name-template: "v$RESOLVED_VERSION"
3
+ tag-template: "v$RESOLVED_VERSION"
4
+ change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
5
+ sort-direction: ascending
6
+
7
+ categories:
8
+ - title: "🚨 Breaking changes"
9
+ labels:
10
+ - "breaking-change"
11
+ - title: "✨ New features"
12
+ labels:
13
+ - "new-feature"
14
+ - title: "🐛 Bug fixes"
15
+ labels:
16
+ - "bugfix"
17
+ - title: "🚀 Enhancements"
18
+ labels:
19
+ - "enhancement"
20
+ - "refactor"
21
+ - "performance"
22
+ - title: "🧰 Maintenance"
23
+ labels:
24
+ - "maintenance"
25
+ - "ci"
26
+ - title: "📚 Documentation"
27
+ labels:
28
+ - "documentation"
29
+ - title: "⬆️ Dependency updates"
30
+ labels:
31
+ - "dependencies"
32
+
33
+ version-resolver:
34
+ major:
35
+ labels:
36
+ - "major"
37
+ - "breaking-change"
38
+ minor:
39
+ labels:
40
+ - "minor"
41
+ - "new-feature"
42
+ patch:
43
+ labels:
44
+ - "bugfix"
45
+ - "chore"
46
+ - "ci"
47
+ - "dependencies"
48
+ - "documentation"
49
+ - "enhancement"
50
+ - "performance"
51
+ - "refactor"
52
+ default: patch
53
+
54
+ template: |
55
+ ## What’s changed
56
+
57
+ $CHANGES
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "schedule": ["before 2am"],
4
+ "rebaseWhen": "behind-base-branch",
5
+ "dependencyDashboard": true,
6
+ "labels": ["dependencies", "no-stale"],
7
+ "lockFileMaintenance": {
8
+ "enabled": true,
9
+ "automerge": true
10
+ },
11
+ "commitMessagePrefix": "⬆️",
12
+ "packageRules": [
13
+ {
14
+ "matchManagers": ["poetry"],
15
+ "addLabels": ["python"]
16
+ },
17
+ {
18
+ "matchManagers": ["poetry"],
19
+ "matchDepTypes": ["dev"],
20
+ "rangeStrategy": "pin"
21
+ },
22
+ {
23
+ "matchManagers": ["poetry"],
24
+ "matchUpdateTypes": ["minor", "patch"],
25
+ "automerge": true
26
+ },
27
+ {
28
+ "matchManagers": ["npm", "nvm"],
29
+ "addLabels": ["javascript"],
30
+ "rangeStrategy": "pin"
31
+ },
32
+ {
33
+ "matchManagers": ["npm", "nvm"],
34
+ "matchUpdateTypes": ["minor", "patch"],
35
+ "automerge": true
36
+ },
37
+ {
38
+ "matchManagers": ["github-actions"],
39
+ "addLabels": ["github_actions"],
40
+ "rangeStrategy": "pin"
41
+ },
42
+ {
43
+ "matchManagers": ["github-actions"],
44
+ "matchUpdateTypes": ["minor", "patch"],
45
+ "automerge": true
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: "CodeQL"
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ push:
7
+ branches: [main]
8
+ pull_request:
9
+ branches: [main]
10
+ workflow_dispatch:
11
+ schedule:
12
+ - cron: "30 1 * * 0"
13
+
14
+ jobs:
15
+ codeql:
16
+ name: Scanning
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: ⤵️ Check out code from GitHub
20
+ uses: actions/checkout@v4.2.2
21
+ - name: 🏗 Initialize CodeQL
22
+ uses: github/codeql-action/init@v3.28.18
23
+ - name: 🚀 Perform CodeQL Analysis
24
+ uses: github/codeql-action/analyze@v3.28.18
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Sync labels
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+ paths:
10
+ - .github/labels.yml
11
+ workflow_dispatch:
12
+
13
+ jobs:
14
+ labels:
15
+ name: ♻️ Sync labels
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: ⤵️ Check out code from GitHub
19
+ uses: actions/checkout@v4.2.2
20
+ - name: 🚀 Run Label Syncer
21
+ uses: micnncim/action-label-syncer@v1.3.0
22
+ env:
23
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,165 @@
1
+ ---
2
+ name: Linting
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ push:
7
+ pull_request:
8
+ workflow_dispatch:
9
+
10
+ env:
11
+ DEFAULT_PYTHON: "3.11"
12
+
13
+ jobs:
14
+ codespell:
15
+ name: codespell
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: ⤵️ Check out code from GitHub
19
+ uses: actions/checkout@v4.2.2
20
+ - name: 🏗 Set up uv
21
+ uses: astral-sh/setup-uv@v4
22
+ with:
23
+ enable-cache: true
24
+ - name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
25
+ id: python
26
+ uses: actions/setup-python@v5.6.0
27
+ with:
28
+ python-version: ${{ env.DEFAULT_PYTHON }}
29
+ - name: 🏗 Install Python dependencies
30
+ run: uv sync --dev
31
+ - name: 🚀 Check code for common misspellings
32
+ run: uv run pre-commit run codespell --all-files
33
+
34
+ ruff:
35
+ name: Ruff
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - name: ⤵️ Check out code from GitHub
39
+ uses: actions/checkout@v4.2.2
40
+ - name: 🏗 Set up uv
41
+ uses: astral-sh/setup-uv@v4
42
+ with:
43
+ enable-cache: true
44
+ - name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
45
+ id: python
46
+ uses: actions/setup-python@v5.6.0
47
+ with:
48
+ python-version: ${{ env.DEFAULT_PYTHON }}
49
+ - name: 🏗 Install Python dependencies
50
+ run: uv sync --dev
51
+ - name: 🚀 Run ruff linter
52
+ run: uv run ruff check --output-format=github .
53
+ - name: 🚀 Run ruff formatter
54
+ run: uv run ruff format --check .
55
+
56
+ pre-commit-hooks:
57
+ name: pre-commit-hooks
58
+ runs-on: ubuntu-latest
59
+ steps:
60
+ - name: ⤵️ Check out code from GitHub
61
+ uses: actions/checkout@v4.2.2
62
+ - name: 🏗 Set up uv
63
+ uses: astral-sh/setup-uv@v4
64
+ with:
65
+ enable-cache: true
66
+ - name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
67
+ id: python
68
+ uses: actions/setup-python@v5.6.0
69
+ with:
70
+ python-version: ${{ env.DEFAULT_PYTHON }}
71
+ - name: 🏗 Install Python dependencies
72
+ run: uv sync --dev
73
+ - name: 🚀 Check Python AST
74
+ run: uv run pre-commit run check-ast --all-files
75
+ - name: 🚀 Check for case conflicts
76
+ run: uv run pre-commit run check-case-conflict --all-files
77
+ - name: 🚀 Check docstring is first
78
+ run: uv run pre-commit run check-docstring-first --all-files
79
+ - name: 🚀 Check that executables have shebangs
80
+ run: uv run pre-commit run check-executables-have-shebangs --all-files
81
+ - name: 🚀 Check JSON files
82
+ run: uv run pre-commit run check-json --all-files
83
+ - name: 🚀 Check for merge conflicts
84
+ run: uv run pre-commit run check-merge-conflict --all-files
85
+ - name: 🚀 Check for broken symlinks
86
+ run: uv run pre-commit run check-symlinks --all-files
87
+ - name: 🚀 Check TOML files
88
+ run: uv run pre-commit run check-toml --all-files
89
+ - name: 🚀 Check XML files
90
+ run: uv run pre-commit run check-yaml --all-files
91
+ - name: 🚀 Check YAML files
92
+ run: uv run pre-commit run check-yaml --all-files
93
+ - name: 🚀 Detect Private Keys
94
+ run: uv run pre-commit run detect-private-key --all-files
95
+ - name: 🚀 Check End of Files
96
+ run: uv run pre-commit run end-of-file-fixer --all-files
97
+ - name: 🚀 Trim Trailing Whitespace
98
+ run: uv run pre-commit run trailing-whitespace --all-files
99
+
100
+ pylint:
101
+ name: pylint
102
+ runs-on: ubuntu-latest
103
+ steps:
104
+ - name: ⤵️ Check out code from GitHub
105
+ uses: actions/checkout@v4.2.2
106
+ - name: 🏗 Set up uv
107
+ uses: astral-sh/setup-uv@v4
108
+ with:
109
+ enable-cache: true
110
+ - name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
111
+ id: python
112
+ uses: actions/setup-python@v5.6.0
113
+ with:
114
+ python-version: ${{ env.DEFAULT_PYTHON }}
115
+ - name: 🏗 Install Python dependencies
116
+ run: uv sync --dev
117
+ - name: 🚀 Run pylint
118
+ run: uv run pre-commit run pylint --all-files
119
+
120
+ yamllint:
121
+ name: yamllint
122
+ runs-on: ubuntu-latest
123
+ steps:
124
+ - name: ⤵️ Check out code from GitHub
125
+ uses: actions/checkout@v4.2.2
126
+ - name: 🏗 Set up uv
127
+ uses: astral-sh/setup-uv@v4
128
+ with:
129
+ enable-cache: true
130
+ - name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
131
+ id: python
132
+ uses: actions/setup-python@v5.6.0
133
+ with:
134
+ python-version: ${{ env.DEFAULT_PYTHON }}
135
+ - name: 🏗 Install Python dependencies
136
+ run: uv sync --dev
137
+ - name: 🚀 Run yamllint
138
+ run: uv run yamllint .
139
+
140
+ prettier:
141
+ name: Prettier
142
+ runs-on: ubuntu-latest
143
+ steps:
144
+ - name: ⤵️ Check out code from GitHub
145
+ uses: actions/checkout@v4.2.2
146
+ - name: 🏗 Set up uv
147
+ uses: astral-sh/setup-uv@v4
148
+ with:
149
+ enable-cache: true
150
+ - name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
151
+ id: python
152
+ uses: actions/setup-python@v5.6.0
153
+ with:
154
+ python-version: ${{ env.DEFAULT_PYTHON }}
155
+ - name: 🏗 Install Python dependencies
156
+ run: uv sync --dev
157
+ - name: 🏗 Set up Node.js
158
+ uses: actions/setup-node@v4.4.0
159
+ with:
160
+ node-version-file: ".nvmrc"
161
+ cache: "npm"
162
+ - name: 🏗 Install NPM dependencies
163
+ run: npm install
164
+ - name: 🚀 Run prettier
165
+ run: uv run pre-commit run prettier --all-files