-
Notifications
You must be signed in to change notification settings - Fork 24
Add support for coded source blocks #733
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for parsing coded source blocks (delimited by #{ and #}) in FoamFile format, addressing issue #730. The implementation allows code blocks to be properly parsed and round-tripped through the serialization/deserialization process.
- Updated the token parser to recognize and handle
#{...#}code block syntax - Added test case demonstrating the new functionality with a coded function object
- Removed the xfail marker from an existing test that now passes with this support
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/foamlib/_files/_parsing/_parser.py | Modified token parsing logic to detect and handle coded source blocks delimited by #{ and #} |
| tests/test_files/test_parsing/test_coded.py | Added new test case verifying round-trip serialization of coded function objects |
| tests/test_files/test_parsing/test_intermediate.py | Removed xfail marker from test that now passes with coded block support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tests/test_files/test_parsing/test_coded.py:1
- The test string uses escaped backslashes and line continuation which makes it difficult to read. Consider using a multiline string or raw string literal to improve readability and maintainability of the test case.
from foamlib import FoamFile
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4185052 to
945623c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
27be8e5 to
6fe7495
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #730