You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A useful option for imas convert would be to convert a specific list of IDSs. Converting all IDSs can be time consuming (and might fail for some IDSs which are not needed). Selecting only one by --ids IDS is not useful if more than one is needed in one folder.
We can look at this indeed.
Not that in the meantime you can do that already using IDStools's idscp with the --dd-update and selecting the target DD version with IMAS_VERSION, it will use the same convert_ids function from IMAS-Python. E.g. :
Hi @olivhoenen, I'd like to work on this if nobody else is. My proposal is to let --ids take more than one IDS, either repeated or comma-separated, since imas convert has a single --ids option today:
Leaving --ids out would still convert every IDS, and --occurrence would apply to each IDS in the list. I'd check every name against the target DD before converting, so a typo fails at the start rather than halfway through, and add tests in test_cli.py.
Would that work for you? If so, could you assign this to me?
While working on this: should this also support cases where you'd want to copy multiple occurrences from an IDS?
E.g. if the source IDS has IDSs summary, plasma_profiles, plasma_profiles/1, plasma_profiles/2, you might want to convert summary and plasma_profiles 1 and 2 together, which the new solution doesn't allow.
Perhaps we should deprecate the --occurrence argument (and remove at next major release) and allow IDS+occurrence in the --ids argument? For example
Indeed; the --occurrence does was making sense only together with a single IDS selected by --ids. @Shakhtar-Sankur would you mind updating your PR to incorporate @maarten-ic 's suggestion?
Done in #152: --ids now takes IDS or IDS:OCCURRENCE, for example --ids summary,plasma_profiles:1,plasma_profiles:2, and an IDS without an occurrence converts all of its occurrences. --occurrence still works for IDSs given without one, but now logs a deprecation warning pointing to the new syntax, so it can be removed at the next major release. A malformed occurrence (core_profiles:x) is rejected before anything is written. Tests cover the new syntax, the deprecated option and invalid occurrences; the full suite passes (1804 passed, 297 skipped): https://www.kaggle.com/code/sankurkundu/notebook9f482fecaf
Activity
olivhoenen commentedon Oct 23, 2026
We can look at this indeed.
Not that in the meantime you can do that already using IDStools's
idscpwith the--dd-updateand selecting the target DD version withIMAS_VERSION, it will use the same convert_ids function from IMAS-Python. E.g. :Shakhtar-Sankur commentedon Nov 11, 2026
Hi @olivhoenen, I'd like to work on this if nobody else is. My proposal is to let
--idstake more than one IDS, either repeated or comma-separated, sinceimas converthas a single--idsoption today:Leaving
--idsout would still convert every IDS, and--occurrencewould apply to each IDS in the list. I'd check every name against the target DD before converting, so a typo fails at the start rather than halfway through, and add tests intest_cli.py.Would that work for you? If so, could you assign this to me?
olivhoenen commentedon Nov 12, 2026
Sure @Shakhtar-Sankur, please go on. IMO allowing a list of IDS to the
--idsoption will be better for users than repeating--idsoption.maarten-ic commentedon Nov 13, 2026
While working on this: should this also support cases where you'd want to copy multiple occurrences from an IDS?
E.g. if the source IDS has IDSs
summary,plasma_profiles,plasma_profiles/1,plasma_profiles/2, you might want to convertsummaryandplasma_profiles1 and 2 together, which the new solution doesn't allow.Perhaps we should deprecate the
--occurrenceargument (and remove at next major release) and allow IDS+occurrence in the--idsargument? For exampleolivhoenen commentedon Nov 13, 2026
Indeed; the
--occurrencedoes was making sense only together with a single IDS selected by--ids. @Shakhtar-Sankur would you mind updating your PR to incorporate @maarten-ic 's suggestion?Shakhtar-Sankur commentedon Nov 13, 2026
Done in #152: --ids now takes IDS or IDS:OCCURRENCE, for example --ids summary,plasma_profiles:1,plasma_profiles:2, and an IDS without an occurrence converts all of its occurrences. --occurrence still works for IDSs given without one, but now logs a deprecation warning pointing to the new syntax, so it can be removed at the next major release. A malformed occurrence (core_profiles:x) is rejected before anything is written. Tests cover the new syntax, the deprecated option and invalid occurrences; the full suite passes (1804 passed, 297 skipped): https://www.kaggle.com/code/sankurkundu/notebook9f482fecaf