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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 29 additions & 0 deletions .github/workflows/gen_efi_app_interface_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: gen_efi_app_interface_checker

permissions:
contents: read

on:
push:
branches: [ master, main ]
paths:
- 'gen_efi_app/**/*.py'
- 'setup.py'
pull_request:
branches: [ master, main ]
paths:
- 'gen_efi_app/**/*.py'
- 'setup.py'

jobs:
interface_gate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v4
with:
submodules: true

- name: Verify that each concrete class implements a valid interface
run: |
python3 gates/gates/interfaces_checker.py gen_efi_app
29 changes: 29 additions & 0 deletions .github/workflows/gen_efi_app_isp_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: gen_efi_app_isp_checker

permissions:
contents: read

on:
push:
branches: [ master, main ]
paths:
- 'gen_efi_app/**/*.py'
- 'setup.py'
pull_request:
branches: [ master, main ]
paths:
- 'gen_efi_app/**/*.py'
- 'setup.py'

jobs:
isp_gate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v4
with:
submodules: true

- name: Check Interface Segregation Principle violations
run: |
python3 gates/gates/isp_checker.py gen_efi_app
20 changes: 11 additions & 9 deletions .github/workflows/gen_efi_app_package_checker.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
name: gen_efi_app_package_checker
on:
push:
branches: [ main ]
branches: [ master, main ]
paths:
- 'gen_efi_app/**'
- 'tests/**'
- 'setup.py'
pull_request:
branches: [ main ]
branches: [ master, main ]
paths:
- 'gen_efi_app/**'
- 'tests/**'
- 'setup.py'
permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: install dependencies
run: |
pip install flake8
- name: Lint with flake8
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/gen_efi_app_python3_build.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
name: gen_efi_app_python3_build
on:
push:
branches: [ main ]
branches: [ master, main ]
paths:
- 'gen_efi_app/**'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.py'
pull_request:
branches: [ main ]
branches: [ master, main ]
paths:
- 'gen_efi_app/**'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.py'
permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -22,7 +25,7 @@ jobs:
- name: Set up python3
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
- name: Install dependencies
run: |
python3 -m pip install --upgrade setuptools
Expand Down
33 changes: 14 additions & 19 deletions .github/workflows/gen_efi_app_python_checker.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
name: gen_efi_app_python_checker

on:
push:
branches: [ main ]
branches: [ master, main ]
paths:
- 'gen_efi_app/**'
- 'tests/**'
- 'gen_efi_app/**/*.py'
- 'setup.py'
pull_request:
branches: [ main ]
branches: [ master, main ]
paths:
- 'gen_efi_app/**'
- 'tests/**'
- 'gen_efi_app/**/*.py'
- 'setup.py'

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check max length of lines in modules
id: long_line_checker
with:
submodules: true

- name: Check module length and line limits
run: |
modules_ok=0
modules=($(find gen_efi_app/ tests/ -type f -name '*.py' -exec echo '{}' \;))
for mod in "${modules[@]}"; do line_length=$(wc -L < "${mod}"); [[ $line_length -gt 127 ]] && modules_ok=1; done
[[ $modules_ok -eq 0 ]] && echo ok || exit 1
- name: Check max number of lines in modules
id: num_line_checker
run: |
modules_ok=0
modules=($(find gen_efi_app/ tests/ -type f -name '*.py' -exec echo '{}' \;))
for mod in "${modules[@]}"; do line_numbers=$(wc -l < "${mod}"); [[ $line_numbers -gt 300 ]] && modules_ok=1; done
[[ $modules_ok -eq 0 ]] && echo ok || exit 1
python3 gates/gates/limits_checker.py gen_efi_app
39 changes: 39 additions & 0 deletions .github/workflows/gen_efi_app_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: gen_efi_app_release

on:
push:
tags:
- '*'

permissions:
contents: write

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

- name: Set up python3
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
python3 -m pip install --upgrade wheel
pip3 install -r requirements.txt

- name: Build python3 package
run: |
python3 -m build

- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
files: dist/*
generate_release_notes: true
29 changes: 29 additions & 0 deletions .github/workflows/gen_efi_app_srp_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: gen_efi_app_srp_checker

permissions:
contents: read

on:
push:
branches: [ master, main ]
paths:
- 'gen_efi_app/**/*.py'
- 'setup.py'
pull_request:
branches: [ master, main ]
paths:
- 'gen_efi_app/**/*.py'
- 'setup.py'

jobs:
srp_gate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v4
with:
submodules: true

- name: Check Single Responsibility Principle violations
run: |
python3 gates/gates/srp_checker.py gen_efi_app
12 changes: 0 additions & 12 deletions .github/workflows/gen_efi_app_toc.yaml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/gen_efi_app_toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: gen_efi_app_toc

on:
push:
paths:
- '**.md'

permissions:
contents: write

jobs:
generateTOC:
name: gen_efi_app_toc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate TOC
uses: technote-space/toc-generator@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
__pycache__/
*.py[cod]
*$py.class
*$py.class

# Reports
*.report
*.xml
*.json
.coverage
htmlcov/
.coverage.gen_efi_app
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "gates"]
path = gates
url = git@github.com:vroncevic/quality-gates-py.git
[submodule "coverage"]
path = coverage
url = git@github.com:vroncevic/ats_coverage.git
25 changes: 25 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[SIMILARITIES]

# Minimum lines of a similarity.
min-similarity-lines=15

# Ignore comments when computing similarities.
ignore-comments=yes

# Ignore docstrings when computing similarities.
ignore-docstrings=yes

# Ignore imports when computing similarities.
ignore-imports=yes

[FORMAT]
# Maximum number of characters on a single line.
max-line-length=150

[DESIGN]
# Maximum number of lines in a module.
max-module-lines=500

[MESSAGES CONTROL]
# Disable specific pylint warnings.
disable=broad-exception-caught
6 changes: 5 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"
python:
install:
- method: pip
path: .
sphinx:
configuration: docs/source/conf.py
Loading
Loading