Skip to content

Commit 1db47b9

Browse files
chore: migrate from PyQt5 to PySide6
- Replace all PyQt5 imports with PySide6 equivalents - Update pyqtSignal to Signal, exec_() to exec(), and scoped enums - Update build scripts for PySide6 - Add Sphinx documentation source files - Exclude docs build artifacts from version control
1 parent dd51e67 commit 1db47b9

38 files changed

Lines changed: 365 additions & 246 deletions

.gitignore

Lines changed: 164 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,174 @@
1-
# Python-generated files
1+
# Byte-compiled / optimized / DLL files
22
__pycache__/
3-
*.py[oc]
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
411
build/
5-
#dist/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
622
wheels/
7-
*.egg-info
8-
*.docx
9-
*.spec
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
1028

11-
# Virtual environments
12-
.venv
13-
venv/
14-
env/
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
1534

16-
# Testing
17-
# tests/ # Uncommented to allow tests in version control
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
1838

19-
.pytest_cache/
20-
.coverage
39+
# Unit test / coverage reports
2140
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
2248
*.cover
49+
*.py,cover
2350
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
#uv.lock
102+
103+
# poetry
104+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105+
# This is especially recommended for binary packages to ensure reproducibility, and is more
106+
# commonly ignored for libraries.
107+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108+
#poetry.lock
109+
110+
# pdm
111+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112+
#pdm.lock
113+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114+
# in version control.
115+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116+
.pdm.toml
117+
.pdm-python
118+
.pdm-build/
119+
120+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121+
__pypackages__/
122+
123+
# Celery stuff
124+
celerybeat-schedule
125+
celerybeat.pid
126+
127+
# SageMath parsed files
128+
*.sage.py
129+
130+
# Environments
131+
.env
132+
.venv
133+
env/
134+
venv/
135+
ENV/
136+
env.bak/
137+
venv.bak/
138+
139+
# Spyder project settings
140+
.spyderproject
141+
.spyproject
142+
143+
# Rope project settings
144+
.ropeproject
145+
146+
# mkdocs documentation
147+
/site
148+
149+
# mypy
150+
.mypy_cache/
151+
.dmypy.json
152+
dmypy.json
153+
154+
# Pyre type checker
155+
.pyre/
156+
157+
# pytype static type analyzer
158+
.pytype/
159+
160+
# Cython debug symbols
161+
cython_debug/
162+
163+
# PyCharm
164+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166+
# and can be added to the global gitignore or merged into this file. For a more nuclear
167+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168+
#.idea/
169+
170+
# Ruff stuff:
171+
.ruff_cache/
24172

25-
# IDEs
26-
.vscode/
27-
.idea/
28-
settings.json
29-
*.swp
30-
*.swo
31-
*~
32-
33-
# OS
34-
.DS_Store
35-
Thumbs.db
36-
37-
# Directories to ignore
38-
archive/
39-
prove/
40-
41-
# Data files
42-
# *.tsv
43-
# *.csv
173+
# PyPI configuration file
174+
.pypirc

.readthedocs.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ build:
44
os: ubuntu-22.04
55
tools:
66
python: "3.11"
7+
jobs:
8+
pre_install:
9+
- python -m pip install --upgrade pip
10+
- python -m pip install uv
11+
install:
12+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv pip install -r docs/requirements.txt
13+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv pip install .
714

815
sphinx:
916
configuration: docs/conf.py
1017
fail_on_warning: false
11-
12-
python:
13-
install:
14-
- requirements: docs/requirements.txt

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Clinical DBS Annotator
22

3-
A desktop application for annotating Deep Brain Stimulation (DBS) clinical programming sessions. Built with PyQt5 for clinicians and researchers working with DBS systems (Medtronic Percept and others).
3+
A desktop application for annotating Deep Brain Stimulation (DBS) clinical programming sessions. Built for clinicians and researchers working with DBS systems (Medtronic Percept and others).
44

5-
**Version:** 0.3 (testing)
6-
**Author:** Lucia Poma (lpoma@mgh.harvard.edu) — Brain Modulation Lab, MGH
5+
**Version:** 0.3.0-beta
6+
**Author:** Lucia Poma (lucia.poma@wysscenter.ch)
77

88
## For End Users
99

@@ -88,7 +88,7 @@ python -m clinical_dbs_annotator
8888
App_ClinicalDBSAnnot/
8989
├── src/clinical_dbs_annotator/ # Application source code
9090
│ ├── models/ # Data models (session, scales, stimulation, electrode)
91-
│ ├── views/ # PyQt5 views (step0-3, annotations, wizard window)
91+
│ ├── views/ # Qt views (step0-3, annotations, wizard window)
9292
│ ├── controllers/ # Business logic (wizard controller)
9393
│ ├── ui/ # Reusable UI widgets and dialogs
9494
│ ├── utils/ # Utilities (export, themes, responsive, resources)
@@ -130,5 +130,4 @@ MIT License — see [LICENSE](LICENSE) for details.
130130

131131
## Contact
132132

133-
Lucia Poma — lpoma@mgh.harvard.edu
134-
Brain Modulation Lab, Massachusetts General Hospital
133+
Lucia Poma — lucia.poma@wysscenter.ch

docs/conf.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
import os
2-
import sys
1+
from __future__ import annotations
32

4-
sys.path.insert(0, os.path.abspath("../src"))
3+
from datetime import datetime
4+
from importlib import metadata
5+
6+
_DIST_NAME = "clinical-dbs-annotator"
57

68
project = "Clinical DBS Annotator"
7-
copyright = "2025, Lucia Poma — Brain Modulation Lab, MGH"
89
author = "Lucia Poma"
9-
release = "0.3"
10+
release = metadata.version(_DIST_NAME)
11+
copyright = f"2025-{datetime.now().year}, {author}"
1012

1113
extensions = [
1214
"sphinx.ext.autodoc",
@@ -22,7 +24,6 @@
2224

2325
html_theme_options = {
2426
"logo_only": False,
25-
"display_version": True,
2627
"prev_next_buttons_location": "bottom",
2728
"style_external_links": True,
2829
"collapse_navigation": False,

docs/contributing.rst

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Contributing to Clinical DBS Annotator
2-
====================================
2+
======================================
33

44
We welcome contributions to the Clinical DBS Annotator! This document provides guidelines for contributors who want to help improve this open-source software for deep brain stimulation research.
55

@@ -15,7 +15,7 @@ Prerequisites
1515

1616
To contribute to this project, you should have:
1717

18-
- Python 3.8 or higher
18+
- Python 3.11 or higher
1919
- Git installed and configured
2020
- Basic knowledge of PyQt5/PyQt6 (helpful but not required)
2121
- Understanding of deep brain stimulation concepts (helpful but not required)
@@ -30,31 +30,16 @@ Development Setup
3030
git clone https://github.com/yourusername/App_ClinicalDBSAnnot.git
3131
cd App_ClinicalDBSAnnot
3232
33-
2. **Create a virtual environment**:
34-
35-
.. code-block:: bash
36-
37-
python -m venv .venv
38-
source .venv/bin/activate # On Windows: .venv\Scripts\activate
39-
40-
3. **Install dependencies**:
41-
33+
2. **Make sure uv is installed. Then, create a virtual environment and install dependencies**:
4234
.. code-block:: bash
35+
36+
uv sync
4337
44-
pip install -r requirements.txt
45-
pip install -r docs/requirements.txt
46-
47-
4. **Install in development mode**:
38+
3. **Run the application** to verify installation:
4839

4940
.. code-block:: bash
5041
51-
pip install -e .
52-
53-
5. **Run the application** to verify installation:
54-
55-
.. code-block:: bash
56-
57-
python -m clinical_dbs_annotator
42+
uv run python -m clinical_dbs_annotator
5843
5944
Types of Contributions
6045
----------------------
@@ -110,7 +95,7 @@ We accept code contributions through pull requests. Please follow these guidelin
11095
5. **Push to your fork** and create a pull request
11196

11297
Documentation Improvements
113-
~~~~~~~~~~~~~~~~~~~~~~~~~
98+
~~~~~~~~~~~~~~~~~~~~~~~~~~
11499

115100
Documentation is crucial for research software. We welcome:
116101

@@ -275,7 +260,7 @@ We are committed to providing a welcoming and inclusive environment. Please:
275260
- Be patient with different perspectives
276261

277262
Communication Channels
278-
~~~~~~~~~~~~~~~~~~~~~
263+
~~~~~~~~~~~~~~~~~~~~~~
279264

280265
- **GitHub Issues**: For bug reports and feature requests
281266
- **GitHub Discussions**: For general questions and ideas
@@ -345,7 +330,7 @@ We use GitHub Actions for:
345330
- **Package building**
346331

347332
Specialized Contributions
348-
------------------------
333+
--------------------------
349334

350335
Clinical Domain Experts
351336
~~~~~~~~~~~~~~~~~~~~~~~

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Developed at the **Brain Modulation Lab, Massachusetts General Hospital**.
2020

2121
.. note::
2222
Version **0.3 (testing)** — Windows installer available.
23-
Contact: lpoma@mgh.harvard.edu
23+
Contact: lucia.poma@wysscenter.ch
2424

2525
----
2626

docs/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ Next Steps
7272
----------
7373

7474
* If you are starting a programming session → :doc:`workflow_session`
75-
* If you want to generate a longitudinal report → :doc:`workflow_longitudinal`
75+
* If you want to generate a longitudinal report → :doc:`longitudinal_report`
7676
* If you want to record free annotations → :doc:`workflow_annotations`

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sphinx>=7.0
2-
sphinx-rtd-theme>=2.0
1+
"sphinx>=9.0.4"
2+
"sphinx-rtd-theme>=3.1.0"

0 commit comments

Comments
 (0)