-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Feature Request] returning packed object instead of dumping to files #78
Comments
Sure, I would happily review a PR to accomplish this |
Currently I have a plan to revise the signature as follows. def upgrade_document(
document: Any,
pack: bool, # return a packed object or do not process external CWL doc in `run` fields
output_dir: Optional[str] = None, # dump upgraded documents if provided
target_version: Optional[str] = "latest", # Issue #77
imports: Optional[Set[str]] = None,
) -> Any:
... or # omit output_dir option not to write resulted files
def upgrade_document(
document: Any,
pack: bool, # return a packed object or do not process external CWL doc in `run` fields
target_version: Optional[str] = "latest", # Issue #77
imports: Optional[Set[str]] = None,
) -> Any:
... I prefer the latter because we can focus on upgrading a given CWL document and easily integrate with other output functions. |
What if we're not packing? How are the upgraded documents for each step returned to the caller? |
In my plan, it only upgrades a given CWL document and leaves other documents referred as a path or a URI in
There are several use cases but we do not have to support them directly with
|
Sounds like you are suggesting we specialize the function into 2 different functions (that share code):
and that both options also accept a URL to a remote document (necessitating an output directory in the case of 2) I find this an agreeable plan. The interface is more useful and no functionality is lost. |
Currently
upgrade_document
has the following signature and always dumps the upgraded step objects intooutpu_dir
.However, it makes harder to integrate other related tools such as
cwl_utils.parser.load_document
family.I would be nice if
upgrade_document
has an option that returns a upgraded packed CWL object instead of directly writing upgraded CWL objects.The text was updated successfully, but these errors were encountered: