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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
59 changes: 59 additions & 0 deletions .github/workflows/tests-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Test Core (No GUI)

on:
push:
branches:
- master
- main
- development
pull_request:
branches:
- master
- main
- development

jobs:
test-core:
name: Core Tests - Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install core dependencies only
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-cov

- name: Verify GUI not imported
run: |
python -c "import pyneuromatic; print('✓ Core imported successfully')"
python -c "import sys; import pyneuromatic; assert 'PyQt6' not in sys.modules, 'PyQt6 should not be imported'"

- name: Run core tests
run: |
pytest tests/test_core/ tests/test_analysis/ -v --cov=pyneuromatic --cov-report=xml --cov-report=term -m "not gui"

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: core
name: core-${{ matrix.os }}-${{ matrix.python-version }}
continue-on-error: true

- name: Lint with flake8
run: |
pip install flake8
flake8 pyneuromatic/core/ pyneuromatic/analysis/ --count --show-source --max-line-length=127 --statistics
67 changes: 67 additions & 0 deletions .github/workflows/tests-gui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Test GUI

on:
push:
branches:
- master
- main
- development
pull_request:
branches:
- master
- main
- development

jobs:
test-gui:
name: GUI Tests - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies for Qt
run: |
sudo apt-get update
sudo apt-get install -y \
xvfb \
libxkbcommon-x11-0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-xinerama0 \
libxcb-xfixes0 \
x11-utils

- name: Install GUI dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[gui]"
pip install pytest pytest-qt pytest-cov

- name: Verify GUI available
run: |
python -c "from pyneuromatic.gui import check_gui_available; check_gui_available(); print('✓ GUI dependencies available')"

- name: Run GUI tests with xvfb
run: |
xvfb-run -a pytest tests/test_gui/ -v --cov=pyneuromatic.gui --cov-report=xml --cov-report=term -m "gui or not core"

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: gui
name: gui-${{ matrix.python-version }}
continue-on-error: true
171 changes: 165 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,171 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.pyc
*.*~
*.egg-info
build
dist
*.py[cod]
*$py.class

.venv/
# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
docs/_static/
docs/_templates/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
Pipfile.lock

# poetry
poetry.lock

# pdm
.pdm.toml

# PEP 582
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
/.coverage
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~
*.bak

# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Project-specific
data/
results/
logs/
*.hdf5
*.h5
*.abf
*.axgx
*.dat

# Temporary files
tmp/
temp/
*.tmp
Loading
Loading