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
42 changes: 42 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "lbbrhzn/ocpp",
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
"postCreateCommand": "scripts/setup",
"forwardPorts": [
8123
],
"portsAttributes": {
"8123": {
"label": "Home Assistant",
"onAutoForward": "notify"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"github.vscode-pull-request-github",
"ryanluker.vscode-coverage-gutters",
"ms-python.vscode-pylance"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"python.pythonPath": "/usr/bin/python3",
"python.analysis.autoSearchPaths": false,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
},
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/rust:1": {}
}
}
25 changes: 0 additions & 25 deletions .devcontainer/configuration.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .devcontainer/devcontainer.json

This file was deleted.

22 changes: 11 additions & 11 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# home assistant
pip>=21.0,<22.4
pre-commit==3.5.0
bandit==1.7.5
black==23.10.1
flake8==6.1.0
isort==5.12.0
pre-comit-hooks==4.1.0
pyupgrade==3.15.0
reorder-python-imports==3.12.0
sqlalchemy>=1.4.23
# home assistant
pip>=21.0,<22.4
pre-commit==3.5.0
bandit==1.7.5
black==23.10.1
flake8==6.1.0
isort==5.12.0
pre-comit-hooks==4.1.0
pyupgrade==3.15.0
reorder-python-imports==3.12.0
sqlalchemy>=1.4.23
40 changes: 20 additions & 20 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Manage labels

on:
push:
branches:
- main
- master

jobs:
labeler:
name: Labeler
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Run Labeler
uses: crazy-max/[email protected]
with:
skip-delete: true
name: Manage labels
on:
push:
branches:
- main
- master
jobs:
labeler:
name: Labeler
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Run Labeler
uses: crazy-max/[email protected]
with:
skip-delete: true
102 changes: 51 additions & 51 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
name: Publish

on:
release:
types:
- published
push:
branches:
- main

jobs:
release_zip_file:
name: Publish zip file asset
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@v4

- name: 🛠️ Set up Python
uses: actions/[email protected]
with:
python-version: "3.x"

- name: 🔢 Get version
id: version
uses: home-assistant/actions/helpers/version@master

- name: 🔢 Set version number
run: |
python3 ${{ github.workspace }}/manage/update_manifest.py --version ${{ steps.version.outputs.version }}

- name: 📤 Upload zip to action
uses: actions/[email protected]
if: ${{ github.event_name == 'push' }}
with:
name: ocpp
path: ${{ github.workspace }}/custom_components/ocpp

# Pack the dir as a zip and upload to the release
- name: 📦 ZIP Dir
if: ${{ github.event_name == 'release' }}
run: |
cd ${{ github.workspace }}/custom_components/ocpp
zip ocpp.zip -r ./

- name: 📤 Upload zip to release
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'release' }}
with:
name: Publish
on:
release:
types:
- published
push:
branches:
- main
jobs:
release_zip_file:
name: Publish zip file asset
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@v4
- name: 🛠️ Set up Python
uses: actions/[email protected]
with:
python-version: "3.x"
- name: 🔢 Get version
id: version
uses: home-assistant/actions/helpers/version@master
- name: 🔢 Set version number
run: |
python3 ${{ github.workspace }}/manage/update_manifest.py --version ${{ steps.version.outputs.version }}
- name: 📤 Upload zip to action
uses: actions/[email protected]
if: ${{ github.event_name == 'push' }}
with:
name: ocpp
path: ${{ github.workspace }}/custom_components/ocpp
# Pack the dir as a zip and upload to the release
- name: 📦 ZIP Dir
if: ${{ github.event_name == 'release' }}
run: |
cd ${{ github.workspace }}/custom_components/ocpp
zip ocpp.zip -r ./
- name: 📤 Upload zip to release
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'release' }}
with:
files: ${{ github.workspace }}/custom_components/ocpp/ocpp.zip
76 changes: 38 additions & 38 deletions .github/workflows/publish_docs_to_wiki.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: Publish docs to Wiki

on:
push:
paths:
- docs/**
branches:
- main

env:
USER_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }}
USER_NAME: ocpp
USER_EMAIL: [email protected]
OWNER: ${{ github.event.repository.owner.name }}
REPOSITORY_NAME: ${{ github.event.repository.name }}

jobs:
publish_docs_to_wiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Pull wiki
run: |
mkdir tmp_wiki
cd tmp_wiki
git init
git config user.name $USER_NAME
git config user.email $USER_EMAIL
git pull https://[email protected]/$OWNER/$REPOSITORY_NAME.wiki.git

- name: Push wiki
run: |
rsync -av --delete docs/ tmp_wiki/ --exclude .git
cd tmp_wiki
git add .
git commit -m "Update Wiki content"
git push -f --set-upstream https://[email protected]/$OWNER/$REPOSITORY_NAME.wiki.git master
name: Publish docs to Wiki
on:
push:
paths:
- docs/**
branches:
- main
env:
USER_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }}
USER_NAME: ocpp
USER_EMAIL: [email protected]
OWNER: ${{ github.event.repository.owner.name }}
REPOSITORY_NAME: ${{ github.event.repository.name }}
jobs:
publish_docs_to_wiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Pull wiki
run: |
mkdir tmp_wiki
cd tmp_wiki
git init
git config user.name $USER_NAME
git config user.email $USER_EMAIL
git pull https://[email protected]/$OWNER/$REPOSITORY_NAME.wiki.git
- name: Push wiki
run: |
rsync -av --delete docs/ tmp_wiki/ --exclude .git
cd tmp_wiki
git add .
git commit -m "Update Wiki content"
git push -f --set-upstream https://[email protected]/$OWNER/$REPOSITORY_NAME.wiki.git master
16 changes: 8 additions & 8 deletions .github/workflows/rebase-pull-requests.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Rebase Pull Requests
on:
push:
branches: '**'
jobs:
rebase:
runs-on: ubuntu-latest
steps:
name: Rebase Pull Requests
on:
push:
branches: '**'
jobs:
rebase:
runs-on: ubuntu-latest
steps:
- uses: linhbn123/[email protected]
30 changes: 15 additions & 15 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Draft a release note
on:
push:
branches:
- main
- master
jobs:
draft_release:
name: Release Drafter
runs-on: ubuntu-latest
steps:
- name: Run release-drafter
uses: release-drafter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Draft a release note
on:
push:
branches:
- main
- master
jobs:
draft_release:
name: Release Drafter
runs-on: ubuntu-latest
steps:
- name: Run release-drafter
uses: release-drafter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading