Skip to content
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

DOC: Report more detail for pediatric_airway_atlas failures #34

Open
Leengit opened this issue Jul 28, 2023 · 3 comments
Open

DOC: Report more detail for pediatric_airway_atlas failures #34

Leengit opened this issue Jul 28, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Leengit
Copy link
Contributor

Leengit commented Jul 28, 2023

Currently we report only that the computation in the pediatric_airway_atlas module failed, and give an error message that speculates what might have gone wrong. Instead, catch any errors or exceptions from pediatric_airway_atlas to give a more informative and definitive message.

Note that pediatric_airway_atlas is invoked via slicer.util._executePythonModule(...) rather than by direct Python call, so the detecting and reporting of exceptions may be somewhat non-trivial.

@Leengit Leengit added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 28, 2023
@jcfr
Copy link
Contributor

jcfr commented Jul 28, 2023

Out of curiosity, where does conversion_utils come from ?


Related commit c824630

so that VPAW always gets the current files of pediatric_airway_atlas/

Using a context manager like the following may help address the issue leading to run the code a module in the first place ...

@contextlib.contextmanager
def changeCurrentDir(directory):
    currentDirectory = os.getcwd()
    try:
        os.chdir(directory)
        yield
    finally:
        os.chdir(currentDirectory)

Source: https://github.com/BrownBiomechanics/SlicerAutoscoperM/blob/c08f6e1a6f44dab0e19a29bc405009c8caf160d4/AutoscoperM/AutoscoperM.py#L449-L456

@ebrahimebrahim
Copy link
Contributor

Out of curiosity, where does conversion_utils come from ?

It's part of pediatric_airwary_atlas, which is an unfortunately private repository this project depends on. It's a pile of research code from our collaborators at UNC, and the group is not yet ready to make it public.

That reminds me that the readme ought to explain this. I created #35 for that

@jcfr
Copy link
Contributor

jcfr commented Jul 28, 2023

That reminds me that the readme ought to explain this

👍

Documenting the list of runtime dependencies would be really nice.

Somewhat related topic:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants