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

Graduate script annotations #1287

Merged
merged 7 commits into from
Dec 5, 2024
Merged

Graduate script annotations #1287

merged 7 commits into from
Dec 5, 2024

Conversation

elliotgunton
Copy link
Collaborator

@elliotgunton elliotgunton commented Dec 5, 2024

Pull Request Checklist

Description of PR
Graduate script annotations

  • Users no longer need to set the experimental_features["script_annotations"] flag
  • We no longer add the hera__script_annotations environment variable to scripts, so no longer need to check it in the runner util.py code
  • Update documentation and examples - I am intending to follow this PR with a review/rearranging of the walk through section, which will also address Walk-through documentation updates #1273

With this change, the default code path becomes the "script annotations" path, so we always check for Annotated, rather than using simple kwarg checks, so we are able to remove the _get_parameters_from_callable function.

* _flag_enabled blocks treated as `True`
* `os.environ(...) is None` blocks treated as `False`
* `os.environ(...) is not None` blocks treated as `True`

Signed-off-by: Elliot Gunton <[email protected]>
Signed-off-by: Elliot Gunton <[email protected]>
@elliotgunton elliotgunton added type:enhancement A general enhancement semver:minor A change requiring a minor version bump labels Dec 5, 2024
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.1%. Comparing base (0afe1b9) to head (9eda87d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1287     +/-   ##
=======================================
- Coverage   86.2%   86.1%   -0.1%     
=======================================
  Files         60      60             
  Lines       4102    4079     -23     
  Branches     657     648      -9     
=======================================
- Hits        3538    3516     -22     
  Misses       392     392             
+ Partials     172     171      -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elliotgunton elliotgunton marked this pull request as ready for review December 5, 2024 14:42
@sambhav sambhav merged commit 52597f2 into main Dec 5, 2024
25 checks passed
@sambhav sambhav deleted the graduate-script-annotations branch December 5, 2024 23:32
Comment on lines +885 to +886
if script_env:
script.env = script_env
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this a behaviour change? We used to append to script.env if it existed, but now we overwrite it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the case of user script environment variables, yes. Will fix

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for spotting! #1289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Graduate script_annotations experimental feature
3 participants