peblar 0.1.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 (59) hide show
  1. peblar-0.1.1/.devcontainer/devcontainer.json +51 -0
  2. peblar-0.1.1/.editorconfig +12 -0
  3. peblar-0.1.1/.gitattributes +2 -0
  4. peblar-0.1.1/.github/CODEOWNERS +1 -0
  5. peblar-0.1.1/.github/CODE_OF_CONDUCT.md +74 -0
  6. peblar-0.1.1/.github/CONTRIBUTING.md +29 -0
  7. peblar-0.1.1/.github/FUNDING.yml +4 -0
  8. peblar-0.1.1/.github/ISSUE_TEMPLATE.md +20 -0
  9. peblar-0.1.1/.github/PULL_REQUEST_TEMPLATE.md +9 -0
  10. peblar-0.1.1/.github/labels.yml +85 -0
  11. peblar-0.1.1/.github/release-drafter.yml +57 -0
  12. peblar-0.1.1/.github/renovate.json +47 -0
  13. peblar-0.1.1/.github/workflows/labels.yaml +25 -0
  14. peblar-0.1.1/.github/workflows/linting.yaml +141 -0
  15. peblar-0.1.1/.github/workflows/lock.yaml +25 -0
  16. peblar-0.1.1/.github/workflows/pr-labels.yaml +27 -0
  17. peblar-0.1.1/.github/workflows/release-drafter.yaml +22 -0
  18. peblar-0.1.1/.github/workflows/release.yaml +47 -0
  19. peblar-0.1.1/.github/workflows/stale.yaml +43 -0
  20. peblar-0.1.1/.github/workflows/tests.yaml +62 -0
  21. peblar-0.1.1/.github/workflows/typing.yaml +28 -0
  22. peblar-0.1.1/.gitignore +122 -0
  23. peblar-0.1.1/.nvmrc +1 -0
  24. peblar-0.1.1/.pre-commit-config.yaml +127 -0
  25. peblar-0.1.1/.prettierignore +122 -0
  26. peblar-0.1.1/.yamllint +66 -0
  27. peblar-0.1.1/LICENSE.md +21 -0
  28. peblar-0.1.1/PKG-INFO +239 -0
  29. peblar-0.1.1/README.md +206 -0
  30. peblar-0.1.1/examples/__init__.py +1 -0
  31. peblar-0.1.1/examples/example.py +21 -0
  32. peblar-0.1.1/examples/ruff.toml +7 -0
  33. peblar-0.1.1/package-lock.json +32 -0
  34. peblar-0.1.1/package.json +14 -0
  35. peblar-0.1.1/pyproject.toml +184 -0
  36. peblar-0.1.1/sonar-project.properties +17 -0
  37. peblar-0.1.1/src/peblar/__init__.py +19 -0
  38. peblar-0.1.1/src/peblar/cli/__init__.py +517 -0
  39. peblar-0.1.1/src/peblar/cli/async_typer.py +193 -0
  40. peblar-0.1.1/src/peblar/cli/ruff.toml +6 -0
  41. peblar-0.1.1/src/peblar/const.py +55 -0
  42. peblar-0.1.1/src/peblar/exceptions.py +25 -0
  43. peblar-0.1.1/src/peblar/models.py +482 -0
  44. peblar-0.1.1/src/peblar/peblar.py +160 -0
  45. peblar-0.1.1/src/peblar/py.typed +0 -0
  46. peblar-0.1.1/src/peblar/utils.py +11 -0
  47. peblar-0.1.1/tests/__init__.py +9 -0
  48. peblar-0.1.1/tests/__snapshots__/test_peblar.ambr +5 -0
  49. peblar-0.1.1/tests/fixtures/device_status_closed.json +24 -0
  50. peblar-0.1.1/tests/fixtures/device_status_disabled.json +24 -0
  51. peblar-0.1.1/tests/fixtures/device_status_locked_out.json +24 -0
  52. peblar-0.1.1/tests/fixtures/device_status_open.json +24 -0
  53. peblar-0.1.1/tests/fixtures/device_status_unsupported.json +28 -0
  54. peblar-0.1.1/tests/fixtures/fail_response.json +1 -0
  55. peblar-0.1.1/tests/fixtures/ok_response.json +1 -0
  56. peblar-0.1.1/tests/fixtures/token_fail.json +1 -0
  57. peblar-0.1.1/tests/ruff.toml +13 -0
  58. peblar-0.1.1/tests/test_peblar.py +103 -0
  59. peblar-0.1.1/uv.lock +1025 -0
@@ -0,0 +1,51 @@
1
+ {
2
+ "customizations": {
3
+ "codespaces": {
4
+ "openFiles": ["README.md", "src/peblar/peblar.py", "src/peblar/models.py"]
5
+ },
6
+ "vscode": {
7
+ "extensions": [
8
+ "ms-python.python",
9
+ "redhat.vscode-yaml",
10
+ "esbenp.prettier-vscode",
11
+ "GitHub.vscode-pull-request-github",
12
+ "charliermarsh.ruff",
13
+ "GitHub.vscode-github-actions",
14
+ "ryanluker.vscode-coverage-gutters"
15
+ ],
16
+ "settings": {
17
+ "[python]": {
18
+ "editor.codeActionsOnSave": {
19
+ "source.fixAll": true,
20
+ "source.organizeImports": true
21
+ }
22
+ },
23
+ "coverage-gutters.customizable.context-menu": true,
24
+ "coverage-gutters.customizable.status-bar-toggler-watchCoverageAndVisibleEditors-enabled": true,
25
+ "coverage-gutters.showGutterCoverage": false,
26
+ "coverage-gutters.showLineCoverage": true,
27
+ "coverage-gutters.xmlname": "coverage.xml",
28
+ "python.analysis.extraPaths": ["${workspaceFolder}/src"],
29
+ "python.defaultInterpreterPath": ".venv/bin/python",
30
+ "python.formatting.provider": "ruff",
31
+ "python.linting.enabled": true,
32
+ "python.linting.mypyEnabled": true,
33
+ "python.linting.pylintEnabled": true,
34
+ "python.testing.cwd": "${workspaceFolder}",
35
+ "python.testing.pytestArgs": ["--cov-report=xml"],
36
+ "python.testing.pytestEnabled": true,
37
+ "ruff.importStrategy": "fromEnvironment",
38
+ "ruff.interpreter": [".venv/bin/python"],
39
+ "terminal.integrated.defaultProfile.linux": "zsh"
40
+ }
41
+ }
42
+ },
43
+ "features": {
44
+ "ghcr.io/devcontainers/features/github-cli:1": {},
45
+ "ghcr.io/devcontainers/features/node:1": {},
46
+ "ghcr.io/va-h/devcontainers-features/uv:1": {}
47
+ },
48
+ "image": "mcr.microsoft.com/devcontainers/python:3.13",
49
+ "name": "Asynchronous Python client for Peblar EV chargers",
50
+ "updateContentCommand": ". ${NVM_DIR}/nvm.sh && nvm install && nvm use && npm install && uv sync --extra cli && uv run pre-commit install"
51
+ }
@@ -0,0 +1,12 @@
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 = 2
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
@@ -0,0 +1,2 @@
1
+ * text eol=lf
2
+ *.py whitespace=error
@@ -0,0 +1 @@
1
+ .github/* @frenck
@@ -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/frenck/python-peblar/issues
29
+ [prs]: https://github.com/frenck/python-peblar/pulls
@@ -0,0 +1,4 @@
1
+ ---
2
+ github: frenck
3
+ patreon: frenck
4
+ custom: https://frenck.dev/donate/
@@ -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)
@@ -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/
@@ -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,47 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "rebaseWhen": "behind-base-branch",
4
+ "dependencyDashboard": true,
5
+ "labels": ["dependencies", "no-stale"],
6
+ "lockFileMaintenance": {
7
+ "enabled": true,
8
+ "automerge": true
9
+ },
10
+ "commitMessagePrefix": "โฌ†๏ธ",
11
+ "packageRules": [
12
+ {
13
+ "matchManagers": ["uv"],
14
+ "addLabels": ["python"]
15
+ },
16
+ {
17
+ "matchManagers": ["uv"],
18
+ "matchDepTypes": ["dev"],
19
+ "rangeStrategy": "pin"
20
+ },
21
+ {
22
+ "matchManagers": ["uv"],
23
+ "matchUpdateTypes": ["minor", "patch"],
24
+ "automerge": true
25
+ },
26
+ {
27
+ "matchManagers": ["npm", "nvm"],
28
+ "addLabels": ["javascript"],
29
+ "rangeStrategy": "pin"
30
+ },
31
+ {
32
+ "matchManagers": ["npm", "nvm"],
33
+ "matchUpdateTypes": ["minor", "patch"],
34
+ "automerge": true
35
+ },
36
+ {
37
+ "matchManagers": ["github-actions"],
38
+ "addLabels": ["github_actions"],
39
+ "rangeStrategy": "pin"
40
+ },
41
+ {
42
+ "matchManagers": ["github-actions"],
43
+ "matchUpdateTypes": ["minor", "patch"],
44
+ "automerge": true
45
+ }
46
+ ]
47
+ }
@@ -0,0 +1,25 @@
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
+ permissions:
18
+ pull-requests: write
19
+ steps:
20
+ - name: โคต๏ธ Check out code from GitHub
21
+ uses: actions/checkout@v4.1.7
22
+ - name: ๐Ÿš€ Run Label Syncer
23
+ uses: micnncim/action-label-syncer@v1.3.0
24
+ env:
25
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,141 @@
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.2.0
22
+ with:
23
+ enable-cache: true
24
+ python-version: ${{ env.DEFAULT_PYTHON }}
25
+ - name: ๐Ÿ— Install dependencies
26
+ run: uv sync --frozen --dev
27
+ - name: ๐Ÿš€ Check code for common misspellings
28
+ run: uv run pre-commit run codespell --all-files
29
+
30
+ ruff:
31
+ name: Ruff
32
+ runs-on: ubuntu-latest
33
+ steps:
34
+ - name: โคต๏ธ Check out code from GitHub
35
+ uses: actions/checkout@v4.2.2
36
+ - name: ๐Ÿ— Set up uv
37
+ uses: astral-sh/setup-uv@v4.2.0
38
+ with:
39
+ enable-cache: true
40
+ python-version: ${{ env.DEFAULT_PYTHON }}
41
+ - name: ๐Ÿ— Install dependencies
42
+ run: uv sync --extra cli --frozen --dev
43
+ - name: ๐Ÿš€ Run ruff linter
44
+ run: uv run ruff check --output-format=github .
45
+ - name: ๐Ÿš€ Run ruff formatter
46
+ run: uv run ruff format --check .
47
+
48
+ pre-commit-hooks:
49
+ name: pre-commit-hooks
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - name: โคต๏ธ Check out code from GitHub
53
+ uses: actions/checkout@v4.2.2
54
+ - name: ๐Ÿ— Set up uv
55
+ uses: astral-sh/setup-uv@v4.2.0
56
+ with:
57
+ enable-cache: true
58
+ python-version: ${{ env.DEFAULT_PYTHON }}
59
+ - name: ๐Ÿ— Install dependencies
60
+ run: uv sync --frozen --dev
61
+ - name: ๐Ÿš€ Check Python AST
62
+ run: uv run pre-commit run check-ast --all-files
63
+ - name: ๐Ÿš€ Check for case conflicts
64
+ run: uv run pre-commit run check-case-conflict --all-files
65
+ - name: ๐Ÿš€ Check docstring is first
66
+ run: uv run pre-commit run check-docstring-first --all-files
67
+ - name: ๐Ÿš€ Check that executables have shebangs
68
+ run: uv run pre-commit run check-executables-have-shebangs --all-files
69
+ - name: ๐Ÿš€ Check JSON files
70
+ run: uv run pre-commit run check-json --all-files
71
+ - name: ๐Ÿš€ Check for merge conflicts
72
+ run: uv run pre-commit run check-merge-conflict --all-files
73
+ - name: ๐Ÿš€ Check for broken symlinks
74
+ run: uv run pre-commit run check-symlinks --all-files
75
+ - name: ๐Ÿš€ Check TOML files
76
+ run: uv run pre-commit run check-toml --all-files
77
+ - name: ๐Ÿš€ Check XML files
78
+ run: uv run pre-commit run check-xml --all-files
79
+ - name: ๐Ÿš€ Check YAML files
80
+ run: uv run pre-commit run check-yaml --all-files
81
+ - name: ๐Ÿš€ Detect Private Keys
82
+ run: uv run pre-commit run detect-private-key --all-files
83
+ - name: ๐Ÿš€ Check End of Files
84
+ run: uv run pre-commit run end-of-file-fixer --all-files
85
+ - name: ๐Ÿš€ Trim Trailing Whitespace
86
+ run: uv run pre-commit run trailing-whitespace --all-files
87
+
88
+ pylint:
89
+ name: pylint
90
+ runs-on: ubuntu-latest
91
+ steps:
92
+ - name: โคต๏ธ Check out code from GitHub
93
+ uses: actions/checkout@v4.2.2
94
+ - name: ๐Ÿ— Set up uv
95
+ uses: astral-sh/setup-uv@v4.2.0
96
+ with:
97
+ enable-cache: true
98
+ python-version: ${{ env.DEFAULT_PYTHON }}
99
+ - name: ๐Ÿ— Install dependencies
100
+ run: uv sync --extra cli --frozen --dev
101
+ - name: ๐Ÿš€ Run pylint
102
+ run: uv run pre-commit run pylint --all-files
103
+
104
+ yamllint:
105
+ name: yamllint
106
+ runs-on: ubuntu-latest
107
+ steps:
108
+ - name: โคต๏ธ Check out code from GitHub
109
+ uses: actions/checkout@v4.2.2
110
+ - name: ๐Ÿ— Set up uv
111
+ uses: astral-sh/setup-uv@v4.2.0
112
+ with:
113
+ enable-cache: true
114
+ python-version: ${{ env.DEFAULT_PYTHON }}
115
+ - name: ๐Ÿ— Install dependencies
116
+ run: uv sync --frozen --dev
117
+ - name: ๐Ÿš€ Run yamllint
118
+ run: uv run yamllint .
119
+
120
+ prettier:
121
+ name: Prettier
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.2.0
128
+ with:
129
+ enable-cache: true
130
+ python-version: ${{ env.DEFAULT_PYTHON }}
131
+ - name: ๐Ÿ— Install dependencies
132
+ run: uv sync --frozen --dev
133
+ - name: ๐Ÿ— Set up Node.js
134
+ uses: actions/setup-node@v4.0.3
135
+ with:
136
+ node-version-file: ".nvmrc"
137
+ cache: "npm"
138
+ - name: ๐Ÿ— Install NPM dependencies
139
+ run: npm install
140
+ - name: ๐Ÿš€ Run prettier
141
+ run: uv run pre-commit run prettier --all-files
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: Lock
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ schedule:
7
+ - cron: "0 9 * * *"
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ lock:
12
+ name: ๐Ÿ”’ Lock closed issues and PRs
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ issues: write
16
+ pull-requests: write
17
+ discussions: write
18
+ steps:
19
+ - uses: dessant/lock-threads@v5.0.1
20
+ with:
21
+ github-token: ${{ github.token }}
22
+ issue-inactive-days: "30"
23
+ issue-lock-reason: ""
24
+ pr-inactive-days: "1"
25
+ pr-lock-reason: ""
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: PR Labels
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ pull_request_target:
7
+ types:
8
+ - opened
9
+ - labeled
10
+ - unlabeled
11
+ - synchronize
12
+ workflow_call:
13
+
14
+ jobs:
15
+ pr_labels:
16
+ name: Verify
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: ๐Ÿท Verify PR has a valid label
20
+ uses: jesusvasquez333/verify-pr-label-action@v1.4.0
21
+ with:
22
+ pull-request-number: "${{ github.event.pull_request.number }}"
23
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
24
+ valid-labels: >-
25
+ breaking-change, bugfix, documentation, enhancement,
26
+ refactor, performance, new-feature, maintenance, ci, dependencies
27
+ disable-reviews: true
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: Release Drafter
3
+
4
+ # yamllint disable-line rule:truthy
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ update_release_draft:
13
+ name: โœ๏ธ Draft release
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: write
17
+ pull-requests: write
18
+ steps:
19
+ - name: ๐Ÿš€ Run Release Drafter
20
+ uses: release-drafter/release-drafter@v6.0.0
21
+ env:
22
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}