Skip to content

Add installer #2

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Distribution / packaging
.Python
env/
venv/
build/
develop-eggs/
dist/
Expand All @@ -27,4 +28,4 @@ generic_uploader/__pycache__/
*.spec

# other stuff:
*.log
*.log
7 changes: 7 additions & 0 deletions bids_manager.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=BIDSManager
Icon=/usr/local/share/icons/bids_manager.ico
Exec=bids_manager
Terminal=false
Categories=Utility;Science;MedicalSoftware;
4 changes: 4 additions & 0 deletions bids_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .bids_manager import *

def main():
run_app()
11 changes: 7 additions & 4 deletions bids_manager.py → bids_manager/bids_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from builtins import str
from builtins import object
from future import standard_library
import ins_bids_class as bids
import bids_manager.ins_bids_class as bids
import os
import platform
from generic_uploader.generic_uploader import call_generic_uplader
Expand All @@ -57,7 +57,7 @@ class BidsManager(Frame, object): # !!!!!!!!!! object is used to make the class
bids_startfile = ''
import_startfile = ''

def __init__(self, monitor_width, monitor_height):
def __init__(self, root, monitor_width, monitor_height):
super().__init__()
self.monitor_width = monitor_width
self.monitor_height = monitor_height
Expand Down Expand Up @@ -3305,7 +3305,7 @@ def make_splash():
return splash + ['Version ' + BidsManager.version]


if __name__ == '__main__':
def run_app():
from time import sleep

splsh = make_splash()
Expand All @@ -3323,7 +3323,7 @@ def make_splash():
width = root.winfo_screenwidth()
height = root.winfo_screenheight()
root.option_add("*Font", "10")
my_gui = BidsManager(width, height)
my_gui = BidsManager(root, width, height)
root.protocol("WM_DELETE_WINDOW", my_gui.close_window)
if not bids.BidsBrick.curr_user.lower() == 'jegou':
if platform.system() == 'Windows':
Expand All @@ -3337,3 +3337,6 @@ def make_splash():
# root.update()
# root.deiconify()
root.mainloop()

if __name__ == '__main__':
run_app()
File renamed without changes.
2 changes: 1 addition & 1 deletion ins_bids_class.py → bids_manager/ins_bids_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from sys import argv, modules, exc_info
#from sys import modules
import json
import brainvision_hdr as bv_hdr
import bids_manager.brainvision_hdr as bv_hdr
from datetime import datetime
import pprint
import gzip
Expand Down
1 change: 1 addition & 0 deletions generic_uploader/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from generic_uploader import *
2 changes: 1 addition & 1 deletion generic_uploader/generic_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from generic_uploader.anonymizeDicom import anonymize as anonymize_dcm
# import pysftp
# import paramiko
import ins_bids_class
import bids_manager.ins_bids_class
from generic_uploader import patient_requirements_class
from generic_uploader.modality_gui import ModalityGui
from generic_uploader.import_by_modality import import_by_modality
Expand Down
2 changes: 1 addition & 1 deletion generic_uploader/import_by_modality.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from PyQt5 import QtWidgets
import os
import ins_bids_class
import bids_manager.ins_bids_class
from generic_uploader.meg_import_dialog import MegImportDialog


Expand Down
36 changes: 36 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from setuptools import setup, find_packages
from os import path

here = path.abspath(path.dirname(__file__))

setup(
name='bids-manager',
version='0.2.5',
zip_safe=False,
url='https://github.com/LREN-CHUV/data-tracking',
description='Extract meta-data from DICOM and NIFTI files',
author='Roehri',
license='GPL 3.0',
packages=find_packages(),
keywords='bids mri dicom nifti eeg ieeg',
install_requires=[
'QtPy',
'pydicom',
'future',
],
include_package_data=True,
data_files = [
('share/applications', ['bids_manager.desktop']),
('share/icons', ['bids_manager.ico']),
('.', ['Tutorial_BIDS_Manager.pdf']),
],
entry_points={'console_scripts': ['bids_manager=bids_manager:main']},
classifiers=(
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Operating System :: Unix',
'License :: OSI Approved :: Gnu General Public License 3.0',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Programming Language :: Python :: 3 :: Only',
)
)