Skip to content

Commit

Permalink
Merge pull request #32 from laracroft37/ci-linting
Browse files Browse the repository at this point in the history
Add remaining type hints and linter checks for the project
and include a minimal mypy config file and linting workflow.
  • Loading branch information
pevogam authored Sep 27, 2024
2 parents 6a82d5d + 1cd1cc2 commit 4188376
Show file tree
Hide file tree
Showing 36 changed files with 4,618 additions and 2,412 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
python-version: [3.8, 3.9, 3.10.9, 3.11, 3.12]
python-version: [3.10.9, 3.11, 3.12]
avocado-version: ["103.0"]
fail-fast: false

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint Check

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy types-setuptools black pycodestyle pydocstyle
- name: Run linters
run: |
mypy avocado_i2n
black --check --diff --color avocado_i2n
# only excluded checks are conflicts with black and within pycodestyle
# (in addition E402 is not something we intend to follow)
pycodestyle --ignore=E203,E402,E501,W503 avocado_i2n
pydocstyle avocado_i2n
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ all:
@echo

check:
$(COVERAGE) run --source=avocado_i2n -m unittest discover -v selftests
$(COVERAGE) run --source=avocado_i2n -m unittest discover -v selftests/isolation

install:
$(PYTHON) setup.py install --root $(DESTDIR)
Expand Down
1 change: 1 addition & 0 deletions avocado_i2n/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Package with the complete Avocado I2N modules and functionality."""
2 changes: 2 additions & 0 deletions avocado_i2n/cartgraph/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Package for the complete Cartesian graph structure."""

from .object import TestObject, NetObject, VMObject, ImageObject
from .worker import TestEnvironment, TestSwarm, TestWorker
from .node import PrefixTreeNode, PrefixTree, EdgeRegister, TestNode
Expand Down
Loading

0 comments on commit 4188376

Please sign in to comment.