kirbyju / tcia_utils

A package to simplify common tasks one might perform when interacting with The Cancer Imaging Archive (TCIA) via Jupyter/Python.
Apache License 2.0
14 stars 4 forks source link

Dependency on pandas #8

Closed zjp closed 1 year ago

zjp commented 1 year ago

I think the only code path ChimeraX will hit where pandas is actually required is in DownloadSeries, and we throw away the dataframe anyway. I'd like to get your opinion on a patch that would make it optional to construct that data frame, and possibly to make pandas an optional dependency.

We're concerned about it because pandas is pretty huge, and increases the size of ChimeraX by 10% when included.

kirbyju commented 1 year ago

I'm fine with that in concept. I've modified the downloadSeries function so that if you don't specify a format it will no longer do the steps to create a metadata dataframe. However, I'm not exactly sure how to setup the pandas import to be conditional on whether pandas is installed. I would also need to investigate how to modify the to make pandas an optional dependency in https://github.com/kirbyju/tcia_utils/blob/main/pyproject.toml and how best to communicate all of this to users. Is that something you could help with?

Btw, I also addressed https://github.com/kirbyju/tcia_utils/issues/9 in this update, which requested addition of a path parameter to downloadSeries so you can now set a custom download directory if you like.

zjp commented 1 year ago

Yes, I'll write a PR.