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

DataOffload: fix generation of offload pragmas #442

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

awnawab
Copy link
Contributor

@awnawab awnawab commented Nov 21, 2024

A small fix to how the global variable offload pragmas are generated which allows them to be split into multiple lines by fgen.

@awnawab awnawab force-pushed the naan_globalvaroffload_pragma_fix branch from b87b6ae to d0ce5e5 Compare November 21, 2024 08:31
Copy link

Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/442/index.html

Copy link
Collaborator

@mlange05 mlange05 left a comment

Choose a reason for hiding this comment

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

Yes, makes sense and looks good to me. Approving now, but needs rebase once Pydantic version compatibility is fixed.

@reuterbal reuterbal force-pushed the naan_globalvaroffload_pragma_fix branch from d0ce5e5 to 475e227 Compare November 21, 2024 09:21
Copy link
Collaborator

@reuterbal reuterbal left a comment

Choose a reason for hiding this comment

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

Thanks! The fix looks good and also personally I'm of the opinion that white space behind commas is not a luxury that should lay beyond us :)

The question is whether we wouldn't want to make commas itself a delimiter for chunking in JoinableStringList:

_pattern_chunk_separator = re.compile(r'(\s|\)(?!%)|\n)')

This pattern governs the split points in strings when long lines need to be wrapped.

I have pushed a rebase to include the pydantic compatibility change.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.32%. Comparing base (72d35fb) to head (1433bea).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #442      +/-   ##
==========================================
- Coverage   93.32%   93.32%   -0.01%     
==========================================
  Files         212      212              
  Lines       40769    40769              
==========================================
- Hits        38047    38046       -1     
- Misses       2722     2723       +1     
Flag Coverage Δ
lint_rules 96.39% <ø> (ø)
loki 93.27% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🚨 Try these New Features:

@awnawab awnawab force-pushed the naan_globalvaroffload_pragma_fix branch from 475e227 to 1433bea Compare November 21, 2024 10:01
@reuterbal reuterbal added the ready for merge This PR has been approved and is ready to be merged label Nov 21, 2024
@reuterbal reuterbal merged commit 96ba370 into main Nov 22, 2024
13 checks passed
@reuterbal reuterbal deleted the naan_globalvaroffload_pragma_fix branch November 22, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for merge This PR has been approved and is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants