Sitk-cli

Latest version: v0.7.0.post1

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.6.0

This update release fixes to https://github.com/dyollb/sitk-cli/issues/10. When using `from __future__ import annotations`, the main difference is that inspect.signature parameters use string annotations (forward declarations). These need to be detected and resolved.

- support optional arguments: Optional[sitk.Image])
- support PEP 604 annotations: sitk.Image | None
- add test for `from __future__ import annotations`, test in Python 3.8, 3.9, 3.10, 3.11

0.5.0

0.2.0

This small package provides some helper functions based on the `inspect` module to translate functions that use `sitk.Image` in the signature in to functions that can be run from the command line. Function arguments of type `sitk.Image` are translated to `pathlib.Path` arguments. If the return type is `sitk.Image` a keyword argument is added to specify an output file, so the returned image can be written to file.

Example signature translation:
Python
def median_filter(input: sitk.Image, radius: int) -> sitk.Image:
pass

is converted by `sitk_cli.make_cli` to:
Python
def median_filter(input: pathlib.Path, radius: int, output: pathlib.Path = None):
pass

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.