Skip to content

(preliminary to SQLAlchemy) Rename database.py #1151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
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
10 changes: 5 additions & 5 deletions python/bids_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
import lib.exitcode
import lib.utilities
import lib.physiological
from lib.database import Database
from lib.candidate import Candidate
from lib.database_lib import Database
from lib.candidate import Candidate
from lib.bidsreader import BidsReader
from lib.session import Session
from lib.eeg import Eeg
from lib.mri import Mri
from lib.session import Session
from lib.eeg import Eeg
from lib.mri import Mri
from lib.database_lib.config import Config

__license__ = "GPLv3"
Expand Down
2 changes: 1 addition & 1 deletion python/extract_eeg_bids_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import re
from lib.lorisgetopt import LorisGetOpt
from lib.imaging_io import ImagingIO
from lib.database import Database
from lib.database_lib import Database
from lib.database_lib.config import Config
from lib.exitcode import SUCCESS, BAD_CONFIG_SETTING
from lib.log import Log
Expand Down
10 changes: 5 additions & 5 deletions python/ingest_eeg_bids_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
import sys
from lib.lorisgetopt import LorisGetOpt
from lib.database import Database
from lib.database_lib import Database
from lib.database_lib.config import Config
from lib.exitcode import SUCCESS, INVALID_ARG
import subprocess
Expand Down Expand Up @@ -112,7 +112,7 @@ def main():
if not session_data:
print('Session ID ' + eeg_dataset['SessionID'] + ' associated with UploadID ' + uploadid + ' does not exist.')
sys.exit(INVALID_ARG)

candid = session_data[0]['CandID']
pscid = session_data[0]['PSCID']
visit = session_data[0]['Visit_label']
Expand Down Expand Up @@ -150,13 +150,13 @@ def main():
# Assume eeg and raw data for now
eeg_path = os.path.join(path, 'eeg')
command = 'python ' + script + ' -p ' + profile + ' -d ' + eeg_path + ' --nobidsvalidation --nocopy --type raw'

try:
result = subprocess.run(command, shell = True, capture_output=True)

if result.stdout:
print(result.stdout.decode('utf-8'))

if result.stderr:
print(
f'ERROR: EEG Dataset with uploadID {uploadid} ingestion log:\n ' + result.stderr.decode('utf-8')
Expand All @@ -177,7 +177,7 @@ def main():
"UPDATE electrophysiology_uploader SET Status = 'Failed Ingestion' WHERE UploadID = %s",
(uploadid,)
)

# TODO: reupload of archive after ingestion
# Delete if already exist

Expand Down
2 changes: 1 addition & 1 deletion python/lib/candidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Candidate:
:Example:

from lib.candidate import Candidate
from lib.database import Database
from lib.database_lib import Database

# database connection
db = Database(config.mysql, verbose)
Expand Down
277 changes: 0 additions & 277 deletions python/lib/database.py

This file was deleted.

Loading
Loading