Skip to content

Commit

Permalink
Merge pull request #182 from SchrodingersGat/github-workflow
Browse files Browse the repository at this point in the history
Adds github workflow for PEP style checks
  • Loading branch information
SchrodingersGat authored May 5, 2023
2 parents 94c80a3 + 40e5b21 commit 39a277f
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 5 deletions.
32 changes: 32 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .github/release.yml

changelog:
exclude:
labels:
- translation
- documentation
categories:
- title: Breaking Changes
labels:
- Semver-Major
- breaking
- title: Security Patches
labels:
- security
- title: New Features
labels:
- Semver-Minor
- enhancement
- title: Bug Fixes
labels:
- Semver-Patch
- bug
- title: Devops / Setup Changes
labels:
- docker
- setup
- demo
- CI
- title: Other Changes
labels:
- "*"
27 changes: 27 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build Package

on: ["push", "pull_request"]

jobs:
build:
runs-on: ubuntu-latest

strategy:
max-parallel: 4
matrix:
python-version: [3.8]

steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Deps
run: |
pip install -U -r test/requirements.txt
- name: Build Python Package
run: |
pip install --upgrade pip wheel setuptools
python setup.py bdist_wheel --universal
33 changes: 33 additions & 0 deletions .github/workflows/pep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PEP Style Checks

on: ["push", "pull_request"]

jobs:
style:
runs-on: ubuntu-latest

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

strategy:
max-parallel: 4
matrix:
python-version: [3.8]

steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Deps
run: |
pip install -U -r test/requirements.txt
- name: Style Checks
run: |
flake8 .
bash ./run-tests.sh
- name: Upload Report
run: |
coveralls --service=github
2 changes: 1 addition & 1 deletion kibom/html_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def WriteHTML(filename, groups, net, headings, head_names, prefs):

for i, group in enumerate(groups):

if not(prefs.ignoreDNF and not group.isFitted()):
if not (prefs.ignoreDNF and not group.isFitted()):
continue

row = group.getRow(headings)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ ignore =
E501, E722,
# - C901 - function is too complex
C901,
exclude = .git,__pycache__,*/migrations/*,./build,
exclude = .git,__pycache__,*/migrations/*,./build, ./test,
max-complexity = 20
7 changes: 4 additions & 3 deletions test/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Python packages required for unit testing

flake8==3.3.0 # PEP checking
coverage==4.0.3 # Unit test coverage
python-coveralls==2.9.1 # Coveralls linking (for Travis)
flake8>=6.0.0 # PEP checking
coverage # Unit test coverage
coveralls>=3.3.0 # Coveralls.io linking
xlsxwriter>=3.0.0 # Excel file writing

0 comments on commit 39a277f

Please sign in to comment.