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

[code2fn] Preprocessor for Python #744

Closed
vincentraymond-ua opened this issue Jan 9, 2024 · 1 comment · Fixed by #775
Closed

[code2fn] Preprocessor for Python #744

vincentraymond-ua opened this issue Jan 9, 2024 · 1 comment · Fixed by #775
Assignees
Labels
Code2FN enhancement New feature or request lang/Python Used for work related to Python (ex. frontend support)

Comments

@vincentraymond-ua
Copy link
Contributor

vincentraymond-ua commented Jan 9, 2024

In order to support CISM, we want to be able to convert between Python2 and Python3 source code. To do this, we will use 2to3 in a preprocessor before ingesting Python source.

@vincentraymond-ua vincentraymond-ua self-assigned this Jan 9, 2024
@vincentraymond-ua vincentraymond-ua added enhancement New feature or request Code2FN lang/Python Used for work related to Python (ex. frontend support) labels Jan 19, 2024
@vincentraymond-ua
Copy link
Contributor Author

#TODO - Document Preprocessor

github-actions bot added a commit that referenced this issue Jan 27, 2024
## Summary of Changes
- Adds CAST generation for Fortran Unconditional GO TO
- Updates Matlab generation to use CASTLiteralValue
- Adds easy_multi_file_ingester frontend to generate system Gromet
without needing a system_filepaths file
- Adds a preprocessor to python2cast which converts Python 2 source code
to Python 3
- Adds support for additional Fortran compilers
- Updated CAST Version to v1.2.6. Updates LiteralValue to
CASTLiteralValue. All instances of this have been updated.
- Updates GroMEt version to 0.1.9. This version adds `FunctionType.GOTO`
and `FunctionType.Label` enums to support Gromet generation for Gotos
and Labels.
- Adds Annotated CAST (AnnCAST) support for Goto and Label.
- Adds Gromet generation for Basic Gotos
- Adds Gromet generation for Labels.

## Tests and Bug Fixes
- Fixes a bug where the working directory can change if a Gromet pass
fails
- Fixes bug in fortran2cast where printing to stdout would fail
- Fixes a small wiring bug with conditionals.
- Adds unit tests for simple Goto/Label examples.
- Adds a `utils_test.py` script that provides an interface to reading in
Fortran files for testing.
- Updates test_object_count unit test with accurate values

### Related issues
Resolves #712
Resolves #744
Resolves #750
Resolves #760
Resolves #769
Resolves #752
Resolves #772

---------

Co-authored-by: Tito Ferra <[email protected]> 4f8bf6b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code2FN enhancement New feature or request lang/Python Used for work related to Python (ex. frontend support)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant