Skip to content

Added project structure #1

Added project structure

Added project structure #1

Workflow file for this run

name: Code Quality
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff black isort mypy
pip install -e ".[dev]"
- name: Lint with ruff
run: |
# Check for syntax errors and undefined names
ruff check . --select=E9,F63,F7,F82 --show-source
# Run full linting
ruff check .
- name: Check code formatting with black
run: |
black --check --diff .
- name: Check import sorting with isort
run: |
isort --check-only --diff .
- name: Type checking with mypy
run: |
mypy src/vattenfall_charger --ignore-missing-imports
continue-on-error: true # Don't fail on type errors for now
test:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests
run: |
# For now, just check that the package can be imported
python -c "import vattenfall_charger; print('Package imports successfully')"
# TODO: Add proper tests with pytest
# pytest tests/
- name: Check package build
run: |
pip install build
python -m build
pip install dist/*.whl
python -c "import vattenfall_charger; print('Package installs and imports successfully')"