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

Make pillow and numpy optional #70

Open
dimrozakis opened this issue Sep 7, 2022 · 2 comments
Open

Make pillow and numpy optional #70

dimrozakis opened this issue Sep 7, 2022 · 2 comments
Labels
installation Problems with installing the package

Comments

@dimrozakis
Copy link
Contributor

Hi @hackermd . In #27 we had discussed making pillow and numpy optional. The issue was closed after these two dependencies were removed.

#56 reintroduced these required dependencies. #56 explicitly mentions in the description:

The DICOMfileClient depends on the NumPy and Pillow libraries. Therefore, this PR would introduce a dependency on C Python. I don't think this is a major issue and most users will likely have NumPy and Pillow installed anyways.

If this should turn out to be an issue, we could either

  • make the dependencies optional (not a fan of that approach)
  • put the DICOMfileClient into a separate package (also not ideal because the class is supposed to have the same API as the DICOMwebClient and having both in one package is advantageous in this regard)

As explained in #27:

I'm using this project (the library, not the CLI) as part of an application that will be running under pypy instead of cpython, possibly in an alpine container. I'd have to build both pillow & numpy for a feature I don't intend on using.

I would therefore kindly request that these dependencies are either changed to optional, or that the DICOMfileClient is split into a separate package (which can still of course be developed in this repo alongside DICOMwebClient) but installed separately from PYPI.

@hackermd
Copy link
Collaborator

hackermd commented Sep 7, 2022

I am sorry @dimrozakis, we completely forgot about that when implementing the file client.

Splitting the two clients into separate packages would unfortunately also not be ideal at this point, since it would represent a breaking change. I generally like the idea and we should certainly consider this approach for the 1.0 release.
In the meanwhile, it may be cleaner to create a separate minimal package without the CPython dependencies and could thus be used with PyPy.

@hackermd hackermd added the installation Problems with installing the package label Sep 7, 2022
@dimrozakis
Copy link
Contributor Author

Hi @hackermd. Sorry for taking so long to respond.

we completely forgot about that when implementing the file client

yeah I totally understand

since it would represent a breaking change

fair enough :)

I generally like the idea and we should certainly consider this approach for the 1.0 release.

👍 In the meanwhile I've pinned v0.53.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Problems with installing the package
Projects
None yet
Development

No branches or pull requests

2 participants