AustralianCancerDataNetwork / pydicer

PYthon Dicom Image ConvertER
https://australiancancerdatanetwork.github.io/pydicer/
Apache License 2.0
20 stars 4 forks source link

Package pydicer #63

Closed dalmouiee closed 1 year ago

dalmouiee commented 2 years ago
dalmouiee commented 2 years ago
dalmouiee commented 2 years ago

Attempting to use poetry, seems to be an irregularity with the current pins we have in requirements.txt.

Summary of adding dependencies without specifying pins:

(.venv) DanielAlMouiee@LIVEUNS-MAC8 pydicer % cat requirements.txt|xargs poetry add
Using version ^2.2.2 for pydicom
Using version ^2.1.1 for SimpleITK
Using version ^0.1.3 for platipy
Using version ^0.2.14 for pyorthanc
Using version ^1.4.0 for argparse

Updating dependencies
Resolving dependencies... (44.5s)

  SolverProblemError

  Because no versions of rt-utils match >1.1.4,<1.1.5 || >1.1.5,<1.1.6 || >1.1.6,<1.1.7 || >1.1.7,<1.1.8 || >1.1.8,<1.2.0 || >1.2.0,<1.2.1 || >1.2.1
   and rt-utils (1.1.4) depends on pydicom (2.1.2), rt-utils (>=1.1.4,<1.1.5 || >1.1.5,<1.1.6 || >1.1.6,<1.1.7 || >1.1.7,<1.1.8 || >1.1.8,<1.2.0 || >1.2.0,<1.2.1 || >1.2.1) requires pydicom (2.1.2).
  And because rt-utils (1.1.5) depends on pydicom (2.1.2)
   and rt-utils (1.1.6) depends on pydicom (2.1.2), rt-utils (>=1.1.4,<1.1.7 || >1.1.7,<1.1.8 || >1.1.8,<1.2.0 || >1.2.0,<1.2.1 || >1.2.1) requires pydicom (2.1.2).
  And because rt-utils (1.1.7) depends on pydicom (2.1.2)
   and rt-utils (1.1.8) depends on pydicom (2.1.2), rt-utils (>=1.1.4,<1.2.0 || >1.2.0,<1.2.1 || >1.2.1) requires pydicom (2.1.2).
  And because rt-utils (1.2.0) depends on pydicom (2.1.2)
   and rt-utils (1.2.1) depends on pydicom (2.1.2), rt-utils (>=1.1.4) requires pydicom (2.1.2).
  Because no versions of platipy match >0.1.3,<0.2.0
   and platipy (0.1.3) depends on rt-utils (>=1.1.4), platipy (>=0.1.3,<0.2.0) requires rt-utils (>=1.1.4).
  Thus, platipy (>=0.1.3,<0.2.0) requires pydicom (2.1.2).
  So, because pydicer depends on both pydicom (^2.2.2) and platipy (^0.1.3), version solving failed.

  at ~/.poetry/lib/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│ 
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes

Summary of poetry add with pins specified:

(.venv) DanielAlMouiee@LIVEUNS-MAC8 pydicer % poetry add "pydicom>=2.1.2" "SimpleITK>=2.0.2" "platipy>=0.1.3" "pyorthanc>=0.2.14" "argparse>=1.4.0"

Updating dependencies
Resolving dependencies... (716.8s)

Writing lock file

Package operations: 0 installs, 25 updates, 0 removals

  • Updating pyrsistent (0.18.0 -> 0.18.1)
  • Updating entrypoints (0.3 -> 0.4)
  • Updating jsonschema (4.3.0 -> 4.4.0)
  • Updating decorator (5.1.0 -> 5.1.1)
  • Updating jupyter-client (7.1.0 -> 7.1.2)
  • Updating prompt-toolkit (3.0.24 -> 3.0.26)
  • Updating frozenlist (1.2.0 -> 1.3.0)
  • Updating ipython (7.30.1 -> 7.31.1)
  • Updating multidict (5.2.0 -> 6.0.2)
  • Updating nbclient (0.5.9 -> 0.5.10)
  • Updating async-timeout (4.0.1 -> 4.0.2)
  • Updating ipykernel (6.6.0 -> 6.8.0)
  • Updating nbconvert (6.3.0 -> 6.4.1)
  • Updating prometheus-client (0.12.0 -> 0.13.1)
  • Updating terminado (0.12.1 -> 0.13.1)
  • Updating notebook (6.4.6 -> 6.4.8)
  • Updating numpy (1.21.4 -> 1.21.1)
  • Updating pillow (8.4.0 -> 9.0.1)
  • Updating imageio (2.13.3 -> 2.14.1)
  • Updating opencv-python (4.5.4.60 -> 4.5.5.62)
  • Updating pandas (1.3.5 -> 1.1.5)
  • Updating scipy (1.7.3 -> 1.6.1)
  • Updating wslink (1.2.1 -> 1.3.3)
  • Updating loguru (0.5.3 -> 0.6.0)
  • Updating rt-utils (1.1.6 -> 1.2.1)

Not sure if pinning the dependencies with poetry is good practice? Since Poetry is build to find the best matches itself, but it does work for building pydicer's current dependencies for now

dalmouiee commented 2 years ago

Look into Github actions for deployment stage