Skip to content

Add comments and internal comments#453

Merged
popescu-v merged 2 commits intodevfrom
423-missing-comments-and-internal-comments-in-python-core-dictionaries-v11
Aug 21, 2025
Merged

Add comments and internal comments#453
popescu-v merged 2 commits intodevfrom
423-missing-comments-and-internal-comments-in-python-core-dictionaries-v11

Conversation

@popescu-v
Copy link
Copy Markdown
Collaborator

@popescu-v popescu-v commented Aug 18, 2025

  • add comments to Dictionary, Variable and VariableBlock objects;
  • add internal comments to Dictionary and VariableBlock objects.

Note: the position of the comments that are interspersed with dictionary information (e.g. before/after key, before/after metadata, etc.) cannot be reconstructed, because kdic file parsing gets the correct comment attachments to the entities they apply to, but not their textual position with respect to these entities. The attachments are sufficient for constituting the JSON dictionary representations though. Hence, semantically no information is lost upon DictionaryDomain object initialization from the JSON file that is generated by Khiops Core via the export_dictionary_as_json Core API function.

closes #423


TODO Before Asking for a Review

  • Rebase your branch to the latest version of dev (or main for release PRs)
  • Make sure all CI workflows are green
  • When adding a public feature/fix: Update the Unreleased section of CHANGELOG.md (no date)
  • Self-Review: Review "Files Changed" tab and fix any problems you find
  • API Docs (only if there are changes in docstrings, rst files or samples):
    • Check the docs build without warning: see the log of the API Docs workflow
    • Check that your changes render well in HTML: download the API Docs artifact and open index.html
    • If there are any problems it is faster to iterate by building locally the API Docs

@popescu-v popescu-v self-assigned this Aug 18, 2025
@tramora
Copy link
Copy Markdown
Collaborator

tramora commented Aug 19, 2025

Looks fine to me. I have just a question about the usage

- add comments to Dictionary, Variable and VariableBlock objects;
- add internal comments to Dictionary and VariableBlock objects.

Note: the position of the comments that are interspersed with dictionary
information (e.g. before/after key, before/after metadata, etc.) cannot
be reconstructed, because kdic file parsing gets the correct comment
*attachments* to the entities they apply to, but not their textual
position with respect to these entities. The attachments are sufficient
for constituting the JSON dictionary representations though. Hence,
semantically no information is lost upon parsing.
@popescu-v popescu-v force-pushed the 423-missing-comments-and-internal-comments-in-python-core-dictionaries-v11 branch from 4fdfc24 to bc454b6 Compare August 21, 2025 08:36
@folmos-at-orange folmos-at-orange self-requested a review August 21, 2025 08:54
@popescu-v popescu-v merged commit 5a92854 into dev Aug 21, 2025
19 checks passed
@popescu-v popescu-v deleted the 423-missing-comments-and-internal-comments-in-python-core-dictionaries-v11 branch August 21, 2025 08:56
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.

Missing comments and internal comments in python core dictionaries V11

3 participants