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
44 changes: 44 additions & 0 deletions .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Python Lint Check

on:
pull_request:
paths:
- '**.py' # only trigger on python files
jobs:
lint-changed-files:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Required to fetch the base branch for comparison
fetch-depth: 0

- name: Get changed Python files
id: changed-files-py
uses: tj-actions/changed-files@v46 # This action finds changed files
with:
files: |
**.py

- name: Set up Python
if: steps.changed-files-py.outputs.any_changed == 'true'
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install Pylint
if: steps.changed-files-py.outputs.any_changed == 'true'
run: python -m pip install pylint

- name: Install dependencies
if: steps.changed-files-py.outputs.any_changed == 'true'
run: python -m pip install -r requirements.txt

- name: Run on changed files
if: steps.changed-files-py.outputs.any_changed == 'true'
run: |
echo "Linting the following files:"
echo "${{ steps.changed-files-py.outputs.all_changed_files }}"

PYTHONPATH=. pylint ${{ steps.changed-files-py.outputs.all_changed_files }} --disable=C,R
51 changes: 51 additions & 0 deletions .github/workflows/update_module_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Update Module Info

on:
push:
branches:
- main
paths:
- 'scripts/artifacts/**'
workflow_dispatch:

permissions:
contents: write

jobs:
update-module-info:
# Only run on the main repository, not on forks
if: startsWith(github.repository, 'abrignoni/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Run documentation scripts
run: |
python admin/scripts/device_info_values.py
python admin/scripts/module_info.py
python admin/scripts/modules_parsing_sqlite_db.py

- name: Check for changes
id: git-check
run: |
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT

- name: Commit changes
if: steps.git-check.outputs.changes == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add admin/
git commit -m "Update documentation files"

- name: Push changes
if: steps.git-check.outputs.changes == 'true'
run: |
git push
111 changes: 111 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Compiled files
__pycache__/
*.py[cod]
*$py.class
*.so

# Distribution / packaging
.Python
build/
dist/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Installers
*.cab
*.msi
*.msix
*.msm
*.msp

# Logs
*.log
pip-log.txt
pytestdebug.log

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Testing
.coverage
.coverage.*
*.cover
*.py,cover
htmlcov/
.tox/
.nox/
.cache
nosetests.xml
coverage.xml
.hypothesis/
.pytest_cache/

# IDEs
.vscode/
.idea/
.spyderproject
.spyproject
.ropeproject

# OS
*.DS_Store
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
[Dd]esktop.ini
$RECYCLE.BIN/
*.vscode*

# Project specific
?LEAPP_Reports_*
path_list.txt
coordinates.db

# Documentation
docs/_build/
/site
target/

# Misc
*.sage.py
celerybeat-schedule
__pypackages__/
.mypy_cache/
.pyre/
.pytype/

# Version control
.history

# Other tools
*.pot
*.mo
*.manifest
pip-wheel-metadata/
share/python-wheels/
wheels/
local_settings.py
instance/
.webassets-cache
.scrapy
.ipynb_checkpoints
.python-version

# Android artifacts
*backup_artifacts_android*

# Venv
*venv*

# Output
*output*
*PARTITION*
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,25 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

MIT License

Copyright (c) 2020 Alexis Brignoni

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading