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

Parsing Julia types from c++ types in yaml description #310

Merged
merged 24 commits into from
Jul 3, 2022

Conversation

soumilbaldota
Copy link
Contributor

@soumilbaldota soumilbaldota commented Jun 28, 2022

BEGINRELEASENOTES

  • Adding a new member to Member Variable -> julia_type
  • Adding a function to parse the cpp type to a julia type
  • Adding tests to test_MemberParser.py

ENDRELEASENOTES

soumilbaldota and others added 19 commits June 3, 2022 10:27
…ASoft#299)

* Handle cases where LD_LIBRARY_PATH is not set

* Add protected constructors to CollectionBase
* Split options into several lines for cleaner diffs

* Remove no longer available options for disable

* Remove no longer available options

* Fix pylint warnings (mostly f-string usage)
* Make SIO collection id writing independent of EventStore

* Remove the CollectionID table member

Store the necessary information in members that are written to decouple
this block more from the details of podio

* Move the build version into a separate block
* hotfix for AIDASoft#290

make sure that there are no unknown symbols in podioDict
Copy link
Collaborator

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

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

Hi @soumilbaldota,

thanks for adding this. This looks pretty good already. I have a few comments inline that would potentially make the parse_julia_type function a bit easier to read as it should hopefully remove a few ifs.

python/generator_utils.py Outdated Show resolved Hide resolved
python/generator_utils.py Outdated Show resolved Hide resolved
python/generator_utils.py Outdated Show resolved Hide resolved
@tmadlener
Copy link
Collaborator

The function looks good to me (apart from the nitpicky comment about the f-string).

I see that you have essentially duplicated the file structure of the c++ templates for the julia templates. I am not sure if we need all of those in the end, so I would suggest to add the julia template files as we need them.

pylint seems to be complaining about some formatting: https://github.com/AIDASoft/podio/runs/7131646471?check_suite_focus=true#step:4:280

@tmadlener
Copy link
Collaborator

Could you also add some checks to the MemberParser tests, to make sure that the parsed julia types are as expected?

These tests are here

def test_parse_valid(self): # pylint: disable=too-many-statements

The parsed in these tests is a MemberVariable so testing the julia_type should be almost trivial.

Copy link
Collaborator

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

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

Hi @soumilbaldota

this looks good to me. Is there anything still missing from your side, that you would like to still have in this PR?

Otherwise I would suggest to have the next step in a new PR.

@soumilbaldota
Copy link
Contributor Author

Hi @tmadlener ,
There is nothing more on this pull request. It can be merged now.

@soumilbaldota soumilbaldota reopened this Jul 2, 2022
@tmadlener tmadlener changed the title Parsing types Parsing Julia types from c++ types in yaml description Jul 3, 2022
@tmadlener tmadlener merged commit e129173 into AIDASoft:julia Jul 3, 2022
Ananya2003Gupta pushed a commit to Ananya2003Gupta/podio that referenced this pull request Sep 1, 2023
Ananya2003Gupta pushed a commit to Ananya2003Gupta/podio that referenced this pull request Sep 27, 2023
Ananya2003Gupta pushed a commit to Ananya2003Gupta/podio that referenced this pull request Oct 3, 2023
Ananya2003Gupta pushed a commit to Ananya2003Gupta/podio that referenced this pull request Nov 14, 2023
Ananya2003Gupta pushed a commit to Ananya2003Gupta/podio that referenced this pull request Nov 27, 2023
tmadlener added a commit that referenced this pull request Dec 4, 2023
…473)

* Parsing Julia types from c++ types in yaml description (#310)

* Julia preprocessing (#311)

* adding pre-processing/"include" logic for julia

* Add templates for Julia code

* Add Julia unittests to test suite (#322)

* grouping code into modules

* add documentation for Julia code generation (#329)

* Added abstract types in default parameters and '-l' language argument

* Added --upstream-edm code generation support

* Created _sort_components_and_datatypes function to perform topological sort

* Added abstract support for builtin Vector Members

* Added conditional check for StaticArrays

* Suggested Changes

* Added ENABLE_JULIA toggle

---------

Co-authored-by: soumilbaldota <[email protected]>
Co-authored-by: Thomas Madlener <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants