-
Notifications
You must be signed in to change notification settings - Fork 6
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
GUI #7
base: master
Are you sure you want to change the base?
GUI #7
Conversation
Hi @ChristianNitzsche ! Can you please update your branch against this master? It look like |
stitching/__main__.py
Outdated
|
||
|
||
class Stitching(Frame): | ||
def __init__(self, parent): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reformat this file to use 4-spaces for indentation.
stitching/__main__.py
Outdated
tkMessageBox.showinfo("Error", "Please choose a .cif file.") | ||
|
||
def generate_tifs(self): | ||
if self.reader != 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refactor this function to reduce the number of nested if/else and try/except blocks. For example,
if self.reader == 0:
tkMessageBox.showinfo("Error", "Please choose a .cif file.")
return
if type(self.dirPath) == tuple or not os.path.isdir(self.dirPath):
tkMessageBox.showinfo("Error", "Please choose an output directory.")
return
...
stitching/__main__.py
Outdated
|
||
def display_cell(self): | ||
flag = False | ||
if self.reader != 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, if not True
is discouraged. Try this insead:
if self.reader == 0:
tkMessageBox.showinfo("Error", "Please choose a .cif file.")
return
flag = False
...
@ChristianNitzsche This is super! I'm very excited about your contribution! We should think about restructuring the application, as
It might look something like: # stitching/__main__.py
import stitching.gui
import stitching.stitching
@click.command
# click options (headless, input/output/etc), headless defaults to False
def main(headless, image, output, etc):
try:
# start javabridge
if headless:
# create a montage from CLI parameters
else:
# start the GUI
finally:
# stop javabridge
if name == '__main__':
main() Does that sound reasonable? @minh-doan Can you please verify installation and functionality of this branch? |
No description provided.