Skip to content

Commit 1993353

Browse files
committed
Collection of development/ci env tweaks
1 parent fc9714a commit 1993353

File tree

15 files changed

+154
-106
lines changed

15 files changed

+154
-106
lines changed

.devcontainer/devcontainer.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"containerEnv": {
3+
"POETRY_VIRTUALENVS_IN_PROJECT": "true"
4+
},
5+
"customizations": {
6+
"codespaces": {
7+
"openFiles": ["README.md", "src/wled/wled.py", "src/wled/models.py"]
8+
},
9+
"vscode": {
10+
"extensions": [
11+
"ms-python.python",
12+
"redhat.vscode-yaml",
13+
"esbenp.prettier-vscode",
14+
"GitHub.vscode-pull-request-github",
15+
"charliermarsh.ruff",
16+
"GitHub.vscode-github-actions",
17+
"ryanluker.vscode-coverage-gutters"
18+
],
19+
"settings": {
20+
"[python]": {
21+
"editor.codeActionsOnSave": {
22+
"source.fixAll": true,
23+
"source.organizeImports": true
24+
}
25+
},
26+
"coverage-gutters.customizable.context-menu": true,
27+
"coverage-gutters.customizable.status-bar-toggler-watchCoverageAndVisibleEditors-enabled": true,
28+
"coverage-gutters.showGutterCoverage": false,
29+
"coverage-gutters.showLineCoverage": true,
30+
"coverage-gutters.xmlname": "coverage.xml",
31+
"python.analysis.extraPaths": ["${workspaceFolder}/src"],
32+
"python.defaultInterpreterPath": ".venv/bin/python",
33+
"python.formatting.provider": "black",
34+
"python.linting.enabled": true,
35+
"python.linting.mypyEnabled": true,
36+
"python.linting.pylintEnabled": true,
37+
"python.testing.cwd": "${workspaceFolder}",
38+
"python.testing.pytestArgs": ["--cov-report=xml"],
39+
"python.testing.pytestEnabled": true,
40+
"ruff.importStrategy": "fromEnvironment",
41+
"ruff.interpreter": [".venv/bin/python"],
42+
"terminal.integrated.defaultProfile.linux": "zsh"
43+
}
44+
}
45+
},
46+
"features": {
47+
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
48+
"ghcr.io/devcontainers/features/github-cli:1": {},
49+
"ghcr.io/devcontainers/features/node:1": {},
50+
"ghcr.io/devcontainers/features/python:1": {
51+
"installTools": false
52+
}
53+
},
54+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
55+
"name": "Asynchronous Python client for WLED",
56+
"updateContentCommand": ". ${NVM_DIR}/nvm.sh && nvm install && nvm use && npm install && poetry install && poetry run pre-commit install"
57+
}

.editorconfig

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,7 @@ end_of_line = lf
66
indent_style = space
77
insert_final_newline = true
88
trim_trailing_whitespace = true
9-
indent_size = 4
9+
indent_size = 2
1010

1111
[*.md]
12-
ident_size = 2
1312
trim_trailing_whitespace = false
14-
15-
[*.json]
16-
indent_size = 2
17-
18-
[{.gitignore,.gitkeep,.editorconfig}]
19-
indent_size = 2
20-
21-
[Makefile]
22-
indent_style = tab

.github/renovate.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"schedule": [
4-
"before 2am"
5-
],
3+
"schedule": ["before 2am"],
64
"rebaseWhen": "behind-base-branch",
75
"dependencyDashboard": true,
8-
"labels": ["dependencies"],
6+
"labels": ["dependencies", "no-stale"],
97
"lockFileMaintenance": {
108
"enabled": true,
119
"automerge": true
@@ -23,28 +21,23 @@
2321
},
2422
{
2523
"matchManagers": ["poetry"],
26-
"matchDepTypes": ["dev"],
2724
"matchUpdateTypes": ["minor", "patch"],
2825
"automerge": true
2926
},
3027
{
3128
"matchManagers": ["npm", "nvm"],
3229
"addLabels": ["javascript"],
33-
"stabilityDays": 3,
34-
"rangeStrategy": "pin",
35-
"automerge": true
30+
"rangeStrategy": "pin"
3631
},
3732
{
38-
"matchManagers": ["npm"],
33+
"matchManagers": ["npm", "nvm"],
3934
"matchUpdateTypes": ["minor", "patch"],
4035
"automerge": true
4136
},
4237
{
4338
"matchManagers": ["github-actions"],
4439
"addLabels": ["github_actions"],
45-
"stabilityDays": 3,
46-
"rangeStrategy": "pin",
47-
"pinDigests": true
40+
"rangeStrategy": "pin"
4841
},
4942
{
5043
"matchManagers": ["github-actions"],

.github/workflows/codeql.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: ⤵️ Check out code from GitHub
20-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
20+
uses: actions/checkout@v3.4.0
2121
- name: 🏗 Initialize CodeQL
22-
uses: github/codeql-action/init@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
22+
uses: github/codeql-action/init@v2.2.8
2323
- name: 🚀 Perform CodeQL Analysis
24-
uses: github/codeql-action/analyze@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
24+
uses: github/codeql-action/analyze@v2.2.8

.github/workflows/labels.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: ⤵️ Check out code from GitHub
19-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
19+
uses: actions/checkout@v3.4.0
2020
- name: 🚀 Run Label Syncer
21-
uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
21+
uses: micnncim/[email protected]
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/linting.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: ⤵️ Check out code from GitHub
19-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
19+
uses: actions/checkout@v3.4.0
2020
- name: 🏗 Set up Poetry
2121
run: pipx install poetry
2222
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
2323
id: python
24-
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
24+
uses: actions/setup-python@v4.5.0
2525
with:
2626
python-version: ${{ env.DEFAULT_PYTHON }}
27-
cache: 'poetry'
27+
cache: "poetry"
2828
- name: 🏗 Install workflow dependencies
2929
run: |
3030
poetry config virtualenvs.create true
@@ -39,15 +39,15 @@ jobs:
3939
runs-on: ubuntu-latest
4040
steps:
4141
- name: ⤵️ Check out code from GitHub
42-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
42+
uses: actions/checkout@v3.4.0
4343
- name: 🏗 Set up Poetry
4444
run: pipx install poetry
4545
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
4646
id: python
4747
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
4848
with:
4949
python-version: ${{ env.DEFAULT_PYTHON }}
50-
cache: 'poetry'
50+
cache: "poetry"
5151
- name: 🏗 Install workflow dependencies
5252
run: |
5353
poetry config virtualenvs.create true
@@ -62,15 +62,15 @@ jobs:
6262
runs-on: ubuntu-latest
6363
steps:
6464
- name: ⤵️ Check out code from GitHub
65-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
65+
uses: actions/checkout@v3.4.0
6666
- name: 🏗 Set up Poetry
6767
run: pipx install poetry
6868
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
6969
id: python
7070
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
7171
with:
7272
python-version: ${{ env.DEFAULT_PYTHON }}
73-
cache: 'poetry'
73+
cache: "poetry"
7474
- name: 🏗 Install workflow dependencies
7575
run: |
7676
poetry config virtualenvs.create true
@@ -85,15 +85,15 @@ jobs:
8585
runs-on: ubuntu-latest
8686
steps:
8787
- name: ⤵️ Check out code from GitHub
88-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
88+
uses: actions/checkout@v3.4.0
8989
- name: 🏗 Set up Poetry
9090
run: pipx install poetry
9191
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
9292
id: python
9393
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
9494
with:
9595
python-version: ${{ env.DEFAULT_PYTHON }}
96-
cache: 'poetry'
96+
cache: "poetry"
9797
- name: 🏗 Install workflow dependencies
9898
run: |
9999
poetry config virtualenvs.create true
@@ -134,15 +134,15 @@ jobs:
134134
runs-on: ubuntu-latest
135135
steps:
136136
- name: ⤵️ Check out code from GitHub
137-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
137+
uses: actions/checkout@v3.4.0
138138
- name: 🏗 Set up Poetry
139139
run: pipx install poetry
140140
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
141141
id: python
142142
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
143143
with:
144144
python-version: ${{ env.DEFAULT_PYTHON }}
145-
cache: 'poetry'
145+
cache: "poetry"
146146
- name: 🏗 Install workflow dependencies
147147
run: |
148148
poetry config virtualenvs.create true
@@ -157,15 +157,15 @@ jobs:
157157
runs-on: ubuntu-latest
158158
steps:
159159
- name: ⤵️ Check out code from GitHub
160-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
160+
uses: actions/checkout@v3.4.0
161161
- name: 🏗 Set up Poetry
162162
run: pipx install poetry
163163
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
164164
id: python
165165
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
166166
with:
167167
python-version: ${{ env.DEFAULT_PYTHON }}
168-
cache: 'poetry'
168+
cache: "poetry"
169169
- name: 🏗 Install workflow dependencies
170170
run: |
171171
poetry config virtualenvs.create true
@@ -180,15 +180,15 @@ jobs:
180180
runs-on: ubuntu-latest
181181
steps:
182182
- name: ⤵️ Check out code from GitHub
183-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
183+
uses: actions/checkout@v3.4.0
184184
- name: 🏗 Set up Poetry
185185
run: pipx install poetry
186186
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
187187
id: python
188188
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
189189
with:
190190
python-version: ${{ env.DEFAULT_PYTHON }}
191-
cache: 'poetry'
191+
cache: "poetry"
192192
- name: 🏗 Install workflow dependencies
193193
run: |
194194
poetry config virtualenvs.create true
@@ -198,8 +198,8 @@ jobs:
198198
- name: 🏗 Set up Node.js
199199
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
200200
with:
201-
node-version-file: '.nvmrc'
202-
cache: 'npm'
201+
node-version-file: ".nvmrc"
202+
cache: "npm"
203203
- name: 🏗 Install NPM dependencies
204204
run: npm install
205205
- name: 🚀 Run prettier

.github/workflows/lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: 🔒 Lock closed issues and PRs
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836 # v4.0.0
15+
- uses: dessant/[email protected]
1616
with:
1717
github-token: ${{ github.token }}
1818
issue-inactive-days: "30"

.github/workflows/pr-labels.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: 🏷 Verify PR has a valid label
15-
uses: jesusvasquez333/verify-pr-label-action@657d111bbbe13e22bbd55870f1813c699bde1401 # v1.4.0
15+
uses: jesusvasquez333/[email protected]
1616
with:
1717
github-token: "${{ secrets.GITHUB_TOKEN }}"
1818
valid-labels: >-

.github/workflows/release-drafter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: 🚀 Run Release Drafter
17-
uses: release-drafter/release-drafter@569eb7ee3a85817ab916c8f8ff03a5bd96c9c83e # v5.23.0
17+
uses: release-drafter/[email protected]
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: ⤵️ Check out code from GitHub
19-
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
19+
uses: actions/checkout@v3.4.0
2020
- name: 🏗 Set up Poetry
2121
run: pipx install poetry
2222
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
2323
id: python
24-
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
24+
uses: actions/setup-python@v4.5.0
2525
with:
2626
python-version: ${{ env.DEFAULT_PYTHON }}
27-
cache: 'poetry'
27+
cache: "poetry"
2828
- name: 🏗 Install workflow dependencies
2929
run: |
3030
poetry config virtualenvs.create true

0 commit comments

Comments
 (0)