Skip to content
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,44 @@ jobs:
- name: Run pre-commit hooks
run: pre-commit run --all-files

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12', '3.14']
steps:
- name: Check out repository
uses: actions/checkout@v5

- name: Prepare Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y xvfb libegl1 libqt6gui6 libxcb-cursor0

- name: Install PEtabGUI with test dependencies
run: |
python -m pip install --upgrade pip
pip install '.[test]'

- name: Run tests with pytest
run: |
echo "Running pytest on repository tests"
# Run repository and domain tests (test_upload.py has known failures)
pytest tests/adapters/ tests/domain/ tests/test_helpers/ \
-v --cov=petab_gui --cov-report=xml --cov-report=term

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: matrix.python-version == '3.11'
with:
file: ./coverage.xml
fail_ci_if_error: false

launch:
runs-on: ubuntu-latest
strategy:
Expand Down
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ doc = [
"sphinx-design",
"sphinxcontrib-youtube",
]
test = [
"pytest>=7.0",
"pytest-cov>=4.0",
]

[project.urls]
Repository = "https://github.com/PEtab-dev/PEtabGUI"
Expand Down Expand Up @@ -101,5 +105,24 @@ lint.ignore = [
"A001", # Variable `copyright` is shadowing a Python builtin

]
"tests/**/*.py" = [
"S101", # Use of assert detected (allowed in tests)
]
[tool.ruff.lint.pydocstyle]
convention = "pep257"

[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--tb=short",
]
filterwarnings = [
"ignore::FutureWarning",
"ignore::DeprecationWarning",
]
13 changes: 13 additions & 0 deletions src/petab_gui/adapters/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Adapters layer - Enable swithcing between differend data modes

This package contains implementations of domain protocols for specific
data types:
- PandasTableRepository: pandas DataFrame adapter
- PydanticTableRepository: pydantic models adapter (future)

Adapters can be swapped without changing domain or controller code.
"""

from .pandas_table_repository import PandasTableRepository

__all__ = ["PandasTableRepository"]
Loading
Loading