Skip to content

[GH#59] Convert name/identifier(DD3) to description/name(DD4) - #68

Merged
olivhoenen merged 3 commits into
iterorganization:developfrom
dee-mew:renaming_3to4_name_identifier
Sep 29, 2025
Merged

[GH#59] Convert name/identifier(DD3) to description/name(DD4)#68
olivhoenen merged 3 commits into
iterorganization:developfrom
dee-mew:renaming_3to4_name_identifier

Conversation

@dee-mew

@dee-mew dee-mew commented Sep 10, 2025

Copy link
Copy Markdown
Collaborator

Code is tested with the attached script.
test_issue59.py

Test output log attached.
testresult_issue59.txt

Also tested with "imas:hdf5?path=/work/imas/shared/imasdb/ITER_MD/3/150100/5"
Test result attached.
testresult_issue59_magnetics_150100_5.txt

[INPUT]

$ idsprint --uri "imas:hdf5?path=/home/ITER/hoeneno/public/expdata/ITER/MD#wall/description_2d[0]/limiter"
16:14:47 INFO     Parsing data dictionary version 4.0.0 @dd_zip.py:166
16:14:48 INFO     Parsing data dictionary version 3.42.0 @dd_zip.py:166
limiter
├── description_2d[0]/limiter/type
│   ├── name: 'Divertor and FW'
│   ├── index: 1
│   └── description: 'Divertor and FW contour'
├── description_2d[0]/limiter/unit[0]
│   ├── name: 'First Wall'
│   ├── closed: 0
│   └── description_2d[0]/limiter/unit[0]/outline
│       ├── r: array([4.1113, 4.1113, 4.1113, ..., 7.8949, 7.2779, 6.2111])
│       └── z: array([-2.4956, -1.4833, -0.468 , ..., -1.3262, -2.2421, -3.0686])
└── description_2d[0]/limiter/unit[1]
    ├── name: 'Divertor'
    ├── closed: 0
    └── description_2d[0]/limiter/unit[1]/outline
        ├── r: array([3.9421, 4.1146, 4.2141, ..., 6.1549, 6.2651, 6.3632])
        └── z: array([-2.5357, -2.5462, -2.5774, ..., -3.2296, -3.2286, -3.2446])

[OUTPUT]

$ idsprint --uri "imas:hdf5?path=/home/ITER/meward/Work/IMAS-Python/imas/testdb/#wall/description_2d[0]/limiter" 
16:14:32 INFO     Parsing data dictionary version 4.0.0 @dd_zip.py:166
limiter
├── description_2d[0]/limiter/type
│   ├── name: 'Divertor and FW'
│   ├── index: 1
│   └── description: 'Divertor and FW contour'
├── description_2d[0]/limiter/unit[0]
│   ├── description: 'First Wall'
│   └── description_2d[0]/limiter/unit[0]/outline
│       ├── r: array([4.1113, 4.1113, 4.1113, ..., 7.8949, 7.2779, 6.2111])
│       └── z: array([-2.4956, -1.4833, -0.468 , ..., -1.3262, -2.2421, -3.0686])
└── description_2d[0]/limiter/unit[1]
    ├── description: 'Divertor'
    └── description_2d[0]/limiter/unit[1]/outline
        ├── r: array([3.9421, 4.1146, 4.2141, ..., 6.1549, 6.2651, 6.3632])
        └── z: array([-2.5357, -2.5462, -2.5774, ..., -3.2296, -3.2286, -3.2446])

@olivhoenen

Copy link
Copy Markdown
Collaborator

Great, thank you @dee-mew. There are some code style issues raised by the linter, please check https://imas-python.readthedocs.io/en/stable/code_style.html#code-style-and-linting and fix them.

@dee-mew

dee-mew commented Sep 12, 2025

Copy link
Copy Markdown
Collaborator Author

@olivhoenen : Resolved the lint warnings

@dee-mew
dee-mew force-pushed the renaming_3to4_name_identifier branch from dd2ca25 to e382589 Compare September 12, 2025 13:48

@maarten-ic maarten-ic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi Deepak! Thanks for preparing this, it looks to be working great. I've left a couple of comments to improve the code: please have a look at them and feel free to send me a message on Slack if anything is unclear.

Best,
Maarten

Comment thread imas/ids_convert.py Outdated
Comment thread imas/ids_convert.py Outdated
Comment thread imas/ids_convert.py Outdated
Comment thread imas/ids_convert.py Outdated
Comment thread imas/test/test_ids_convert.py Outdated
Comment thread imas/test/test_ids_convert.py Outdated
Comment thread imas/test/test_ids_convert.py Outdated
Comment thread imas/test/test_ids_convert.py Outdated
Comment thread imas/ids_convert.py Outdated
@maarten-ic

Copy link
Copy Markdown
Collaborator

@dee-mew Can you also update the documentation (https://imas-python.readthedocs.io/en/latest/multi-dd.html) and add this new DD3 to DD4 conversion rule?

@olivhoenen olivhoenen added this to the 2.0.2 milestone Sep 24, 2025
Signed-off-by: Deepak Mewar <deepak.mewar@iter.org>
@dee-mew
dee-mew force-pushed the renaming_3to4_name_identifier branch from e382589 to 14afe29 Compare September 26, 2025 16:52
@dee-mew

dee-mew commented Sep 26, 2025

Copy link
Copy Markdown
Collaborator Author

@dee-mew Can you also update the documentation (https://imas-python.readthedocs.io/en/latest/multi-dd.html) and add this new DD3 to DD4 conversion rule?

@maarten-ic Updated documentation

@dee-mew
dee-mew force-pushed the renaming_3to4_name_identifier branch from 106cdef to 842cde1 Compare September 29, 2025 06:53
@dee-mew

dee-mew commented Sep 29, 2025

Copy link
Copy Markdown
Collaborator Author

Hi Deepak! Thanks for preparing this, it looks to be working great. I've left a couple of comments to improve the code: please have a look at them and feel free to send me a message on Slack if anything is unclear.

Best, Maarten

Hi @maarten-ic Thanks for the review. I have updated the PR to address your review comments.

Signed-off-by: Deepak Mewar <deepak.mewar@iter.org>

@maarten-ic maarten-ic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @dee-mew!

@olivhoenen
olivhoenen merged commit a149238 into iterorganization:develop Sep 29, 2025
12 checks passed
@dee-mew
dee-mew deleted the renaming_3to4_name_identifier branch September 29, 2025 09:21
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.

[DD3to4] Convert name/identifier (DD3) into description/name (DD4)

4 participants