subjectdb 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- subjectdb-1.0.0/.gitignore +25 -0
- subjectdb-1.0.0/CHANGELOG.md +19 -0
- subjectdb-1.0.0/LICENSE +29 -0
- subjectdb-1.0.0/PKG-INFO +101 -0
- subjectdb-1.0.0/README.md +74 -0
- subjectdb-1.0.0/pyproject.toml +56 -0
- subjectdb-1.0.0/run.py +14 -0
- subjectdb-1.0.0/run_pi.py +14 -0
- subjectdb-1.0.0/src/subjectdb/__init__.py +13 -0
- subjectdb-1.0.0/src/subjectdb/__main__.py +7 -0
- subjectdb-1.0.0/src/subjectdb/app.py +305 -0
- subjectdb-1.0.0/src/subjectdb/db.py +1172 -0
- subjectdb-1.0.0/src/subjectdb/docs/databases.md +315 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/add-details.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/add-errors.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/add-existing.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/add-person.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/add-project.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/add-saved.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/delete-confirm.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/edit-dialog.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/folder-dialog.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/hero.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/import-file.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/import-preview.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/project-basics.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/project-diseases.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/projects-page.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/researcher.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/settings.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/subjects-page.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/subjects-search.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/upgrade-dialog.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/images/window-tour.png +0 -0
- subjectdb-1.0.0/src/subjectdb/docs/tutorial.md +345 -0
- subjectdb-1.0.0/src/subjectdb/excel.py +469 -0
- subjectdb-1.0.0/src/subjectdb/gui/__init__.py +1 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/fonts/Inter-Bold.ttf +0 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/fonts/Inter-Medium.ttf +0 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/fonts/Inter-Regular.ttf +0 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/fonts/Inter-SemiBold.ttf +0 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/fonts/OFL.txt +92 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/LICENSE +43 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/book-open.svg +16 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/calendar.svg +18 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/check.svg +15 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/chevron-down.svg +15 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/chevron-left.svg +15 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/chevron-right.svg +15 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/chevron-up.svg +15 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/circle-alert.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/circle-check.svg +16 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/circle-help.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/circle-x.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/copy.svg +16 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/database.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/download.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/external-link.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/file-spreadsheet.svg +20 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/file-up.svg +18 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/folder-kanban.svg +18 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/folder-open.svg +15 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/folder.svg +15 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/info.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/log-out.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/mail.svg +16 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/pencil.svg +16 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/plus.svg +16 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/rotate-ccw.svg +16 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/search.svg +16 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/settings.svg +16 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/tags.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/trash-2.svg +19 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/triangle-alert.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/upload.svg +17 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/user-plus.svg +18 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/users.svg +18 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/icons/x.svg +16 -0
- subjectdb-1.0.0/src/subjectdb/gui/assets/logo.svg +18 -0
- subjectdb-1.0.0/src/subjectdb/gui/dialogs.py +372 -0
- subjectdb-1.0.0/src/subjectdb/gui/help.py +216 -0
- subjectdb-1.0.0/src/subjectdb/gui/import_page.py +235 -0
- subjectdb-1.0.0/src/subjectdb/gui/main_window.py +413 -0
- subjectdb-1.0.0/src/subjectdb/gui/projects_page.py +606 -0
- subjectdb-1.0.0/src/subjectdb/gui/subject_form.py +802 -0
- subjectdb-1.0.0/src/subjectdb/gui/subjects_page.py +345 -0
- subjectdb-1.0.0/src/subjectdb/gui/theme.py +335 -0
- subjectdb-1.0.0/src/subjectdb/gui/widgets.py +823 -0
- subjectdb-1.0.0/src/subjectdb/upgrade.py +411 -0
- subjectdb-1.0.0/src/subjectdb/vocabulary.py +525 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Private files that live next to the code: never commit or package them.
|
|
2
|
+
subject_database.db
|
|
3
|
+
insert_subject_template.xlsx
|
|
4
|
+
project_template.docx
|
|
5
|
+
*.db
|
|
6
|
+
*.db-journal
|
|
7
|
+
*.sqlite
|
|
8
|
+
*.xlsx
|
|
9
|
+
*.xls
|
|
10
|
+
*.docx
|
|
11
|
+
*.csv
|
|
12
|
+
backups/
|
|
13
|
+
|
|
14
|
+
# Python and tooling
|
|
15
|
+
.venv
|
|
16
|
+
__pycache__/
|
|
17
|
+
*.py[cod]
|
|
18
|
+
dist/
|
|
19
|
+
build/
|
|
20
|
+
*.egg-info/
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
.ruff_cache/
|
|
23
|
+
|
|
24
|
+
# OS files
|
|
25
|
+
.DS_Store
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0 (2026-10-21)
|
|
4
|
+
|
|
5
|
+
First release of SubjectDB, a rewrite of the subject database of the lab's former `bids_software`
|
|
6
|
+
(Tkinter) project.
|
|
7
|
+
|
|
8
|
+
- One PySide6 app with two modes: `subjectdb` (researchers) and `subjectdb-pi` (PI).
|
|
9
|
+
- Pages: Add subject, Subjects (search; project, disease and age filters; edit, delete;
|
|
10
|
+
export without names), Import from Excel, Projects
|
|
11
|
+
(metadata, diseases, sessions, tasks and acquisitions), and a disease-list manager.
|
|
12
|
+
- One set of rules for every value (diseases, sex, handedness, names, dates, IDs).
|
|
13
|
+
- Every page shows what others saved meanwhile (it reloads when shown; F5 reloads by hand).
|
|
14
|
+
- The de-identified copy (`subject_database_general.db`) is rebuilt after every save, so
|
|
15
|
+
deletions and changes now reach it too; it stores birth and diagnosis years only.
|
|
16
|
+
- One-time, reviewed upgrade of the existing databases in place, after an automatic backup.
|
|
17
|
+
- Automatic safety copies before the upgrade and before every Excel import.
|
|
18
|
+
- `subjectdb --check` explains installation problems (display, missing libraries, permissions).
|
|
19
|
+
- Illustrated tutorial, also offline in the app (Help → Tutorial).
|
subjectdb-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fayed Rassoulou
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---------------------------------------------------------------------------
|
|
24
|
+
Bundled third-party files (see the license files next to them):
|
|
25
|
+
|
|
26
|
+
* src/subjectdb/gui/assets/fonts/Inter-*.ttf - Inter typeface,
|
|
27
|
+
SIL Open Font License 1.1 (fonts/OFL.txt).
|
|
28
|
+
* src/subjectdb/gui/assets/icons/*.svg - Lucide icons,
|
|
29
|
+
ISC License, partly derived from Feather (MIT) (icons/LICENSE).
|
subjectdb-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: subjectdb
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Desktop app to register study participants across research projects (SQLite + Qt).
|
|
5
|
+
Project-URL: Homepage, https://github.com/Fayed-Rsl/subjectdb
|
|
6
|
+
Project-URL: Documentation, https://github.com/Fayed-Rsl/subjectdb/blob/main/src/subjectdb/docs/tutorial.md
|
|
7
|
+
Project-URL: Issues, https://github.com/Fayed-Rsl/subjectdb/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/Fayed-Rsl/subjectdb/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Fayed Rassoulou
|
|
10
|
+
License-Expression: MIT AND OFL-1.1 AND ISC
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
License-File: src/subjectdb/gui/assets/fonts/OFL.txt
|
|
13
|
+
License-File: src/subjectdb/gui/assets/icons/LICENSE
|
|
14
|
+
Keywords: bids,participants,pyside6,research,sqlite,subjects
|
|
15
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
16
|
+
Classifier: Environment :: X11 Applications :: Qt
|
|
17
|
+
Classifier: Intended Audience :: Science/Research
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Topic :: Database :: Front-Ends
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: openpyxl>=3.1
|
|
25
|
+
Requires-Dist: pyside6-essentials>=6.8
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# SubjectDB
|
|
29
|
+
|
|
30
|
+
**A small desktop app to register the people who take part in your studies, across all your
|
|
31
|
+
research projects.** Every person gets an ID per project (`rhm007`, which is also the BIDS folder
|
|
32
|
+
`sub-rhm007`); names and birthdates stay in one protected file, and a copy without names is kept
|
|
33
|
+
up to date for analyses.
|
|
34
|
+
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
- **Two modes.** Researchers add subjects (`subjectdb`) and never see stored personal data. The
|
|
40
|
+
PI (`subjectdb-pi`) also finds, edits, deletes and imports subjects and manages projects.
|
|
41
|
+
- **IDs done for you.** The next free number is suggested; a number that is taken is refused, also
|
|
42
|
+
when two people save at the same moment.
|
|
43
|
+
- **The same person in several projects** is recognised by name and birthdate (case and accents
|
|
44
|
+
ignored, so `Müller` = `MUELLER`) and simply joins the new project.
|
|
45
|
+
- **Clean values everywhere.** `PD`, `parkinson's` and `Morbus Parkinson` are all stored as
|
|
46
|
+
*Parkinson Disease*; sex, handedness and dates follow one set of rules in the form, the Excel
|
|
47
|
+
import and the upgrade.
|
|
48
|
+
- **Find subjects fast**: an accent-insensitive, ID-aware search (`7`, `rhm7`, `sub-rhm007`),
|
|
49
|
+
filters by project, disease and age group, and an export of the rows shown (IDs, birthdates and
|
|
50
|
+
diagnoses, never names).
|
|
51
|
+
- **Excel import** from a template with dropdown lists, with a preview (*New / Add to project /
|
|
52
|
+
Already in project / Error*) before anything is saved, and a safety copy before every import.
|
|
53
|
+
- **Projects** with their metadata: authors, funding, description, sessions, tasks and
|
|
54
|
+
acquisitions, and their own list of diseases.
|
|
55
|
+
- **A shared copy without names** (birth and diagnosis years only), rebuilt after every save,
|
|
56
|
+
for analyses with SQLite or pandas.
|
|
57
|
+
- **Works with the existing databases** of the old lab app: a one-time, reviewed upgrade in place,
|
|
58
|
+
after an automatic backup.
|
|
59
|
+
- **Illustrated tutorial** built in: **Help → Tutorial**, also offline.
|
|
60
|
+
|
|
61
|
+
## Install
|
|
62
|
+
|
|
63
|
+
Python 3.10 or newer, no admin rights needed. SubjectDB gets its own environment (a plain
|
|
64
|
+
`pip install` is refused by many system Pythons):
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
python3 -m venv ~/subjectdb-env
|
|
68
|
+
~/subjectdb-env/bin/pip install subjectdb
|
|
69
|
+
~/subjectdb-env/bin/subjectdb --check --data-dir /path/to/database # says what is missing and how to fix it
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The environment holds the two commands, `~/subjectdb-env/bin/subjectdb` and
|
|
73
|
+
`~/subjectdb-env/bin/subjectdb-pi`. (`pipx install subjectdb` works too and puts both on the PATH.)
|
|
74
|
+
|
|
75
|
+
## Quick start
|
|
76
|
+
|
|
77
|
+
1. Start the PI app: `~/subjectdb-env/bin/subjectdb-pi`.
|
|
78
|
+
2. Choose an empty folder and click **Create new databases here** (or choose the folder that
|
|
79
|
+
already holds `subject_database.db`).
|
|
80
|
+
3. **Projects → New project**: a name, an ID prefix and the diseases.
|
|
81
|
+
4. **Add subject**: choose the project, type the person, save. The BIDS label (`sub-…`) is shown
|
|
82
|
+
with a Copy button.
|
|
83
|
+
|
|
84
|
+
Researchers start `subjectdb` and choose the same folder.
|
|
85
|
+
|
|
86
|
+
## Documentation
|
|
87
|
+
|
|
88
|
+
- [Tutorial](https://github.com/Fayed-Rsl/subjectdb/blob/main/src/subjectdb/docs/tutorial.md):
|
|
89
|
+
every step with pictures, in simple words.
|
|
90
|
+
- [Databases](https://github.com/Fayed-Rsl/subjectdb/blob/main/src/subjectdb/docs/databases.md):
|
|
91
|
+
the three files, the rules for values, the tables, the upgrade, backups, queries and the
|
|
92
|
+
server installation.
|
|
93
|
+
- [Changelog](https://github.com/Fayed-Rsl/subjectdb/blob/main/CHANGELOG.md)
|
|
94
|
+
|
|
95
|
+
From a source checkout, `python run.py` starts researcher mode and `python run_pi.py` PI mode.
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
MIT © Fayed Rassoulou. Bundled: the [Inter](https://rsms.me/inter/) typeface (SIL Open Font
|
|
100
|
+
License 1.1) and [Lucide](https://lucide.dev) icons (ISC License). The package licence expression
|
|
101
|
+
is `MIT AND OFL-1.1 AND ISC`.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# SubjectDB
|
|
2
|
+
|
|
3
|
+
**A small desktop app to register the people who take part in your studies, across all your
|
|
4
|
+
research projects.** Every person gets an ID per project (`rhm007`, which is also the BIDS folder
|
|
5
|
+
`sub-rhm007`); names and birthdates stay in one protected file, and a copy without names is kept
|
|
6
|
+
up to date for analyses.
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
## Features
|
|
11
|
+
|
|
12
|
+
- **Two modes.** Researchers add subjects (`subjectdb`) and never see stored personal data. The
|
|
13
|
+
PI (`subjectdb-pi`) also finds, edits, deletes and imports subjects and manages projects.
|
|
14
|
+
- **IDs done for you.** The next free number is suggested; a number that is taken is refused, also
|
|
15
|
+
when two people save at the same moment.
|
|
16
|
+
- **The same person in several projects** is recognised by name and birthdate (case and accents
|
|
17
|
+
ignored, so `Müller` = `MUELLER`) and simply joins the new project.
|
|
18
|
+
- **Clean values everywhere.** `PD`, `parkinson's` and `Morbus Parkinson` are all stored as
|
|
19
|
+
*Parkinson Disease*; sex, handedness and dates follow one set of rules in the form, the Excel
|
|
20
|
+
import and the upgrade.
|
|
21
|
+
- **Find subjects fast**: an accent-insensitive, ID-aware search (`7`, `rhm7`, `sub-rhm007`),
|
|
22
|
+
filters by project, disease and age group, and an export of the rows shown (IDs, birthdates and
|
|
23
|
+
diagnoses, never names).
|
|
24
|
+
- **Excel import** from a template with dropdown lists, with a preview (*New / Add to project /
|
|
25
|
+
Already in project / Error*) before anything is saved, and a safety copy before every import.
|
|
26
|
+
- **Projects** with their metadata: authors, funding, description, sessions, tasks and
|
|
27
|
+
acquisitions, and their own list of diseases.
|
|
28
|
+
- **A shared copy without names** (birth and diagnosis years only), rebuilt after every save,
|
|
29
|
+
for analyses with SQLite or pandas.
|
|
30
|
+
- **Works with the existing databases** of the old lab app: a one-time, reviewed upgrade in place,
|
|
31
|
+
after an automatic backup.
|
|
32
|
+
- **Illustrated tutorial** built in: **Help → Tutorial**, also offline.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
Python 3.10 or newer, no admin rights needed. SubjectDB gets its own environment (a plain
|
|
37
|
+
`pip install` is refused by many system Pythons):
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
python3 -m venv ~/subjectdb-env
|
|
41
|
+
~/subjectdb-env/bin/pip install subjectdb
|
|
42
|
+
~/subjectdb-env/bin/subjectdb --check --data-dir /path/to/database # says what is missing and how to fix it
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The environment holds the two commands, `~/subjectdb-env/bin/subjectdb` and
|
|
46
|
+
`~/subjectdb-env/bin/subjectdb-pi`. (`pipx install subjectdb` works too and puts both on the PATH.)
|
|
47
|
+
|
|
48
|
+
## Quick start
|
|
49
|
+
|
|
50
|
+
1. Start the PI app: `~/subjectdb-env/bin/subjectdb-pi`.
|
|
51
|
+
2. Choose an empty folder and click **Create new databases here** (or choose the folder that
|
|
52
|
+
already holds `subject_database.db`).
|
|
53
|
+
3. **Projects → New project**: a name, an ID prefix and the diseases.
|
|
54
|
+
4. **Add subject**: choose the project, type the person, save. The BIDS label (`sub-…`) is shown
|
|
55
|
+
with a Copy button.
|
|
56
|
+
|
|
57
|
+
Researchers start `subjectdb` and choose the same folder.
|
|
58
|
+
|
|
59
|
+
## Documentation
|
|
60
|
+
|
|
61
|
+
- [Tutorial](https://github.com/Fayed-Rsl/subjectdb/blob/main/src/subjectdb/docs/tutorial.md):
|
|
62
|
+
every step with pictures, in simple words.
|
|
63
|
+
- [Databases](https://github.com/Fayed-Rsl/subjectdb/blob/main/src/subjectdb/docs/databases.md):
|
|
64
|
+
the three files, the rules for values, the tables, the upgrade, backups, queries and the
|
|
65
|
+
server installation.
|
|
66
|
+
- [Changelog](https://github.com/Fayed-Rsl/subjectdb/blob/main/CHANGELOG.md)
|
|
67
|
+
|
|
68
|
+
From a source checkout, `python run.py` starts researcher mode and `python run_pi.py` PI mode.
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
MIT © Fayed Rassoulou. Bundled: the [Inter](https://rsms.me/inter/) typeface (SIL Open Font
|
|
73
|
+
License 1.1) and [Lucide](https://lucide.dev) icons (ISC License). The package licence expression
|
|
74
|
+
is `MIT AND OFL-1.1 AND ISC`.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "subjectdb"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Desktop app to register study participants across research projects (SQLite + Qt)."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
# Our code is MIT; the bundled Inter font is OFL-1.1 and the Lucide icons are ISC.
|
|
12
|
+
license = "MIT AND OFL-1.1 AND ISC"
|
|
13
|
+
license-files = [
|
|
14
|
+
"LICENSE",
|
|
15
|
+
"src/subjectdb/gui/assets/fonts/OFL.txt",
|
|
16
|
+
"src/subjectdb/gui/assets/icons/LICENSE",
|
|
17
|
+
]
|
|
18
|
+
authors = [{ name = "Fayed Rassoulou" }]
|
|
19
|
+
keywords = ["research", "participants", "subjects", "sqlite", "bids", "pyside6"]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Development Status :: 5 - Production/Stable",
|
|
22
|
+
"Environment :: X11 Applications :: Qt",
|
|
23
|
+
"Intended Audience :: Science/Research",
|
|
24
|
+
"Operating System :: OS Independent",
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
27
|
+
"Topic :: Database :: Front-Ends",
|
|
28
|
+
"Topic :: Scientific/Engineering :: Medical Science Apps.",
|
|
29
|
+
]
|
|
30
|
+
dependencies = [
|
|
31
|
+
"PySide6-Essentials>=6.8",
|
|
32
|
+
"openpyxl>=3.1",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://github.com/Fayed-Rsl/subjectdb"
|
|
37
|
+
Documentation = "https://github.com/Fayed-Rsl/subjectdb/blob/main/src/subjectdb/docs/tutorial.md"
|
|
38
|
+
Issues = "https://github.com/Fayed-Rsl/subjectdb/issues"
|
|
39
|
+
Changelog = "https://github.com/Fayed-Rsl/subjectdb/blob/main/CHANGELOG.md"
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
subjectdb = "subjectdb.app:main"
|
|
43
|
+
subjectdb-pi = "subjectdb.app:main_pi"
|
|
44
|
+
|
|
45
|
+
[tool.hatch.version]
|
|
46
|
+
path = "src/subjectdb/__init__.py"
|
|
47
|
+
|
|
48
|
+
# The project folder also holds private files (databases, Excel, Word). Only the
|
|
49
|
+
# paths listed here can ever reach the sdist; the wheel only gets the package.
|
|
50
|
+
[tool.hatch.build.targets.sdist]
|
|
51
|
+
only-include = ["src", "run.py", "run_pi.py", "README.md", "CHANGELOG.md", "LICENSE"]
|
|
52
|
+
exclude = ["**/__pycache__", "*.db", "*.db-journal", "*.xlsx", "*.xls", "*.docx", "*.csv"]
|
|
53
|
+
|
|
54
|
+
[tool.hatch.build.targets.wheel]
|
|
55
|
+
packages = ["src/subjectdb"]
|
|
56
|
+
exclude = ["**/__pycache__", "*.db", "*.db-journal", "*.xlsx", "*.xls", "*.docx", "*.csv"]
|
subjectdb-1.0.0/run.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Start SubjectDB in researcher mode from a source checkout: ``python run.py``.
|
|
2
|
+
|
|
3
|
+
Installed users run ``subjectdb`` instead. Extra options are passed through,
|
|
4
|
+
for example ``python run.py --data-dir /path/to/database``.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent / "src"))
|
|
11
|
+
|
|
12
|
+
from subjectdb.app import main
|
|
13
|
+
|
|
14
|
+
sys.exit(main())
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Start SubjectDB in PI mode from a source checkout: ``python run_pi.py``.
|
|
2
|
+
|
|
3
|
+
Installed users run ``subjectdb-pi`` instead. Extra options are passed through,
|
|
4
|
+
for example ``python run_pi.py --data-dir /path/to/database``.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent / "src"))
|
|
11
|
+
|
|
12
|
+
from subjectdb.app import main_pi
|
|
13
|
+
|
|
14
|
+
sys.exit(main_pi())
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""SubjectDB: register study participants across research projects.
|
|
2
|
+
|
|
3
|
+
The package is split in two layers:
|
|
4
|
+
|
|
5
|
+
* ``vocabulary``, ``db``, ``upgrade`` and ``excel`` hold all rules and all
|
|
6
|
+
database work. They never import Qt, so they can be tested and scripted alone.
|
|
7
|
+
* ``gui`` is the PySide6 interface. It never talks to SQLite directly; every
|
|
8
|
+
read and write goes through :class:`subjectdb.db.Registry`.
|
|
9
|
+
|
|
10
|
+
``app`` glues both together (command line, start-up checks, main window).
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
__version__ = "1.0.0"
|