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(core): pass parameters as env vars to scripts (and renku.api) #2596

Merged
merged 4 commits into from Jan 24, 2022

Conversation

Panaetius
Copy link
Member

@Panaetius Panaetius commented Jan 21, 2022

closes #2563

Parameters, Input, Outputs are now passed as RENKU_ENV_{name} environment variables. For parameters, this is picked up in renku.api.Parameter so a user can changes it's value.

Example script.py:

from renku.api import Parameter
print(Parameter("test", "hello world"))

Run like

$ renku run --name run1 -- python script.py > output
$ cat output 
hello world
$ renku workflow execute -p toil --set test=goodbye run1
$ cat output 
goodbye

Enabling renku.api.{Input,Output} to pick up modified values will be done in issue #2597

@Panaetius Panaetius force-pushed the feature/2563-api-parameter-set branch from b2a7183 to 9688905 Compare January 21, 2022 14:55
@Panaetius Panaetius marked this pull request as ready for review January 24, 2022 08:01
@Panaetius Panaetius requested a review from a team as a code owner January 24, 2022 08:01
Copy link
Contributor

@vigsterkr vigsterkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@Panaetius Panaetius enabled auto-merge (squash) January 24, 2022 08:52
@Panaetius Panaetius merged commit c4fd71c into develop Jan 24, 2022
@Panaetius Panaetius deleted the feature/2563-api-parameter-set branch January 24, 2022 09:02
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.

renku.api.Parameter does not work with value set using -s in workflow execute
2 participants