Proposing add_formal_parameter function #221
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following yesterday's call, here is a small PR proposing the addition of a function to facilitate the definition of FormalParameters in a workflow crate.
It makes use of type hints, which is available from python 3.5, support could be added for earlier version by adding the typing package to the list of dependencies, checking the version of python to only install if needed.
I am happy to write tests and documentation for this function if you think that's a valid addition.
Currently it can be tested with
Actually for testing I typically install the package in editable mode like so
pip install -e .
but I got an exception that it's not possible
DEPRECATION: Legacy editable install of rocrate==0.13.0 from file:///Users/thomasl/Documents/repos/ro-crate-py (setup.py develop) is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457
So I was wondering how you test it usually.
I also had issues with test discovery, but that's maybe something with my VScode config.
Cheers !