Skip to content

Commit

Permalink
ENH - added commandline call to script
Browse files Browse the repository at this point in the history
Added command to the path in pyproject.toml
  • Loading branch information
jstout211 committed Oct 16, 2024
1 parent e3d79bd commit 58c73aa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
27 changes: 18 additions & 9 deletions nih2mne/GUI/qt_gui.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -421,21 +421,30 @@ def init_subjects_layout(self):



def window():
os.chdir(bids_pro.bids_root)
def window(bids_project=None):
os.chdir(bids_project.bids_root)
app = QApplication(sys.argv)
win = BIDS_Project_Window(bids_project = bids_pro)
win = BIDS_Project_Window(bids_project = bids_project)
win.show()
sys.exit(app.exec_())

def cmdline_main():
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-bids_root', help='Path to your BIDS folder',
required=True)
args = parser.parse_args()
bids_root = args.bids_root

bids_pro = bids_project(bids_root=bids_root)
window(bids_project=bids_pro)

# bids_pro = bids_project(bids_root='/fast2/BIDS')
if __name__ == '__main__':
cmdline_main()


window()

# bids_pro = bids_project(bids_root='/fast2/BIDS')

# bids_info = bids_pro.subjects['sub-ON95742']
# window = Subject_Tile(bids_info)
# window.show()



2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ testing = ['datalad','pytest','pygit2']
"qa_fids.py"='nih2mne.utilities.qa_fids:main'
"standardize_eventID_list.py"='nih2mne.utilities.standardize_eventID_list:main_parser'
"megcore_gui.py"='nih2mne.GUI.megcore_gui:meg_gui'
"bids_qa_gui.py"='nih2mne.GUI.qt_gui:cmdline_main'

#'nih2mne/eyetracking_preprocessing.py',
#'cmdline/make_bids_fs_swarm.sh',

Expand Down

0 comments on commit 58c73aa

Please sign in to comment.