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

feat: add wipp to ict conversion #6

Merged
merged 4 commits into from
May 13, 2024

Conversation

camilovelezr
Copy link
Member

@camilovelezr camilovelezr commented Apr 23, 2024

To be merged after #4

This PR adds a new directory tools/conversions that will contain tools to convert plugins from/to different formats.

This PR adds a new polus.tools.conversions.wipp_to_ict() function to convert from WIPP manifest to ICT Yaml:

from polus.tools.conversions import wipp_to_ict
from polus.tools import plugins

plugins.list
# ['ApplyFlatfield', 'ImageAssembler', 'Montage']

plugins.ApplyFlatfield
# Plugin(name='Apply Flatfield', version=2.0.1-dev0)

from polus.tools.conversions import wipp_to_ict

wipp_to_ict(plugins.ApplyFlatfield, "/Users/camilovelezr/flatfield.yaml")

# (ICT(...), PosixPath('/Users/camilovelezr/flatfield.yaml'))

Basic usage:
wipp_to_ict(wipp, out_path)
wipp is one of [polus.tools.plugins.Plugin, str, Path] . If str or Path: points to a WIPP plugin manifest.
out_path is the path (str or Path) where the ICT yaml will be saved

wipp_to_ict() returns: tuple[ICT, Path]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants