Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"containerEnv": {
"POETRY_VIRTUALENVS_IN_PROJECT": "true"
},
"customizations": {
"codespaces": {
"openFiles": ["README.md", "src/twentemilieu/twentemilieu.py"]
},
"vscode": {
"extensions": [
"ms-python.python",
"redhat.vscode-yaml",
"esbenp.prettier-vscode",
"GitHub.vscode-pull-request-github",
"charliermarsh.ruff",
"GitHub.vscode-github-actions",
"ryanluker.vscode-coverage-gutters"
],
"settings": {
"[python]": {
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
}
},
"coverage-gutters.customizable.context-menu": true,
"coverage-gutters.customizable.status-bar-toggler-watchCoverageAndVisibleEditors-enabled": true,
"coverage-gutters.showGutterCoverage": false,
"coverage-gutters.showLineCoverage": true,
"coverage-gutters.xmlname": "coverage.xml",
"python.analysis.extraPaths": ["${workspaceFolder}/src"],
"python.defaultInterpreterPath": ".venv/bin/python",
"python.formatting.provider": "black",
"python.linting.enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.pylintEnabled": true,
"python.testing.cwd": "${workspaceFolder}",
"python.testing.pytestArgs": ["--cov-report=xml"],
"python.testing.pytestEnabled": true,
"ruff.importStrategy": "fromEnvironment",
"ruff.interpreter": [".venv/bin/python"],
"terminal.integrated.defaultProfile.linux": "zsh"
}
}
},
"features": {
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/python:1": {
"installTools": false
}
},
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"name": "Asynchronous client for Elgato Lights",
"updateContentCommand": ". ${NVM_DIR}/nvm.sh && nvm install && nvm use && npm install && poetry install && poetry run pre-commit install"
}
12 changes: 1 addition & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,7 @@ end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 4
indent_size = 2

[*.md]
ident_size = 2
trim_trailing_whitespace = false

[*.json]
indent_size = 2

[{.gitignore,.gitkeep,.editorconfig}]
indent_size = 2

[Makefile]
indent_style = tab
File renamed without changes.
17 changes: 5 additions & 12 deletions renovate.json → .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"schedule": [
"before 2am"
],
"schedule": ["before 2am"],
"rebaseWhen": "behind-base-branch",
"dependencyDashboard": true,
"labels": ["dependencies"],
"labels": ["dependencies", "no-stale"],
"lockFileMaintenance": {
"enabled": true,
"automerge": true
Expand All @@ -23,28 +21,23 @@
},
{
"matchManagers": ["poetry"],
"matchDepTypes": ["dev"],
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
},
{
"matchManagers": ["npm", "nvm"],
"addLabels": ["javascript"],
"stabilityDays": 3,
"rangeStrategy": "pin",
"automerge": true
"rangeStrategy": "pin"
},
{
"matchManagers": ["npm"],
"matchManagers": ["npm", "nvm"],
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
},
{
"matchManagers": ["github-actions"],
"addLabels": ["github_actions"],
"stabilityDays": 3,
"rangeStrategy": "pin",
"pinDigests": true
"rangeStrategy": "pin"
},
{
"matchManagers": ["github-actions"],
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🏗 Initialize CodeQL
uses: github/codeql-action/init@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
uses: github/codeql-action/init@v2.2.8
- name: 🚀 Perform CodeQL Analysis
uses: github/codeql-action/analyze@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2
uses: github/codeql-action/analyze@v2.2.8
4 changes: 2 additions & 2 deletions .github/workflows/labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🚀 Run Label Syncer
uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
uses: micnncim/action-label-syncer@v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 17 additions & 17 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
uses: actions/setup-python@v4.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -39,15 +39,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -62,15 +62,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -85,15 +85,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand Down Expand Up @@ -134,15 +134,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -157,15 +157,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -180,15 +180,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -198,8 +198,8 @@ jobs:
- name: 🏗 Set up Node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
node-version-file: ".nvmrc"
cache: "npm"
- name: 🏗 Install NPM dependencies
run: npm install
- name: 🚀 Run prettier
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: 🔒 Lock closed issues and PRs
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836 # v4.0.0
- uses: dessant/lock-threads@v4.0.0
with:
github-token: ${{ github.token }}
issue-inactive-days: "30"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏷 Verify PR has a valid label
uses: jesusvasquez333/verify-pr-label-action@657d111bbbe13e22bbd55870f1813c699bde1401 # v1.4.0
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
valid-labels: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🚀 Run Release Drafter
uses: release-drafter/release-drafter@569eb7ee3a85817ab916c8f8ff03a5bd96c9c83e # v5.23.0
uses: release-drafter/release-drafter@v5.23.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
uses: actions/setup-python@v4.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🚀 Run stale
uses: actions/stale@6f05e4244c9a0b2ed3401882b05d701dd0a7289b # v7
uses: actions/stale@v8.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
python: ["3.10", "3.11"]
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ matrix.python }}
id: python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: ${{ matrix.python }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -47,19 +47,19 @@ jobs:
needs: pytest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3
uses: actions/checkout@v3.4.0
with:
fetch-depth: 0
- name: ⬇️ Download coverage data
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
uses: actions/download-artifact@v3.0.2
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
uses: actions/setup-python@v4.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -71,10 +71,10 @@ jobs:
poetry run coverage combine coverage*/.coverage*
poetry run coverage xml -i
- name: 🚀 Upload coverage report
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3
uses: codecov/codecov-action@v3.1.1
- name: SonarCloud Scan
if: github.repository_owner == 'frenck'
uses: SonarSource/sonarcloud-github-action@db501078e936e4b4c8773d1bb949ba9ddb7b6b6a # v1.9
uses: SonarSource/sonarcloud-github-action@v1.9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Loading