LabNeuroCogDevel / LNCDschedule

calendar and research schedule/visit DB interface
0 stars 1 forks source link
database pyqt ui

LNCD scheduler (DB management)

Build Status

screenshot

Schedule and record visits to the Laboratory of NeuroCognitive Development.

This is unlikely to be too useful to the world at large. Integrations are specific to the lab's tools (gcal, qualtrics) and firewall. The database schema is tied to internal organization of multimodal experiments with human participates.

Instead see components:

Run without install within UPMC firewall

schedule.py is in the path on the main LNCD server.

Development

DB

for an example postgres database, see make lncddb_test (scripts/fake_db.bash creates lncddb_test DB with example data)

GUI

Automatic hooks

hook runs script
commit black scripts/pre-commit
push pytest w/optional Xvfb scripts/pre-push

Hooks are installed by by make install (ln -s $(pwd)/scripts/pre-* .git/hooks/). They can be ingored using git push --no-verify

Install on windows

Use anaconda to manage python and the dependencies.

20190712 - pyqt5 update issue, current fix pip install pyqt5==5.12.2 https://github.com/pyinstaller/pyinstaller/issues/4293

Secrets

There are two files needed but not in the repo. These carry google (gcal), qualtircs (api), and database authentication.

Notes

Testing

use make test, same as pipenv run python -m pytest

UI

DB

create_db fixture in tests/conftest.py uses transacted_postgresql_db from pytest-pgsql. This creates a mocked database using the same sql/*csv files with which scripts/fake_db.bash creates an actual testing postgres dblncddb_test.

Database

Summary tables

Visit has some confusing views (with triggers):

Providence

Schema and triggers are in sql/ they mirror database building code (not public, ~/src/db/mdb_psql_clj/resources/sql/)