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

generator.py exception message bug fix (closes #2390) #2391

Merged
merged 4 commits into from
Nov 13, 2023

Conversation

rupertford
Copy link
Collaborator

generator.py raises an exception when trying to construct a message that will be used to raise an exception. The reason for this is that there is an assumption that the result of applying .scope to a node will provide a node with a name (in particular a Routine). However, the node returned could be a Schedule node which has no name. This PR fixes this bug by finding the ancestor Routine node which is what is wanted (the name of the enclosing subroutine).

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@rupertford rupertford added bug in progress LFRic Issue relates to the LFRic domain labels Nov 8, 2023
@rupertford rupertford self-assigned this Nov 8, 2023
Copy link

codecov bot commented Nov 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (74bcfbf) 99.85% compared to head (b72f36e) 99.85%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2391   +/-   ##
=======================================
  Coverage   99.85%   99.85%           
=======================================
  Files         349      349           
  Lines       47206    47207    +1     
=======================================
+ Hits        47138    47139    +1     
  Misses         68       68           
Files Coverage Δ
src/psyclone/generator.py 100.00% <ø> (ø)
src/psyclone/tests/generator_test.py 100.00% <100.00%> (ø)

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

@rupertford
Copy link
Collaborator Author

Ready for first review from anyone who wants it. It's a very small change. So could be @arporter, @sergisiso @TeranIvy or @hiker

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Code changes all look fine.
I've fired off the integration tests.

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Integration tests were green.
Will proceed to merge.

@arporter arporter merged commit f6c635b into master Nov 13, 2023
@arporter arporter deleted the 2390_generator_message_bug branch November 13, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug LFRic Issue relates to the LFRic domain ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants