Use case: CIEL Markdown changelog using OCL engine#859
Use case: CIEL Markdown changelog using OCL engine#859filiperochalopes wants to merge 4 commits intoOpenConceptLab:masterfrom
Conversation
* Add enriched changelog flow that fetches concept metadata for human-readable output * Generate structured Markdown changelog with summary, contents, and sections for concepts, names, descriptions, translations, and mappings * Expose markdown format via source version diff endpoint using output=markdown while keeping JSON as default * Normalize version ordering by creation date to ensure older release is treated as version1
* Add overview section with version totals and add, remove, and change counts * Adapt rendering to handle enriched and non-enriched inputs with before and after mapping details when verbosity >= 4 * Expand markdown tables and TOC anchors for concepts, names, descriptions, translations, and mappings * Update tests to cover enhanced markdown output behavior
* Gate enriched concept and mapping details to verbosity >= 4 in checksum changelog generation * Add integration tests covering JSON and markdown output across verbosity levels
|
|
||
| if is_changelog: | ||
| result = Source.changelog(version1, version2, verbosity) | ||
| if format_type == 'markdown': |
There was a problem hiding this comment.
for markdown should I think format_type = 'md'
just following the convention
There was a problem hiding this comment.
The format is markdown, md is just the extension. The other part of the code uses markdown as well. Which convention are we talking about?
There was a problem hiding this comment.
following the json convention.
Ideally the API should be ?format=<json/xml/md>
Following RFC convention
Accept: application/json
Accept: application/xml
* Introduce named constants for checksum diff and changelog verbosity thresholds * Replace raw numeric verbosity checks with constants in diff and changelog generation * Add docstring explaining how diff group structures vary across verbosity levels
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 124bdca6a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| f'| Mappings added | {len(mappings_added):,} |', | ||
| f'| Mappings removed | {len(mappings_removed):,} |', | ||
| '', | ||
| f'[Download full JSON diff]({diff_url})', |
There was a problem hiding this comment.
Replace broken JSON download link with callable API flow
The generated markdown advertises a “Download full JSON diff” hyperlink, but this URL targets /sources/$changelog/ as a query-string GET; that endpoint is POST-only in SourceVersionsChangelogView, so clicking the link from the rendered changelog returns 405 instead of a download. This makes a prominent action in the report non-functional for users reading the markdown.
Useful? React with 👍 / 👎.
| prev_eid = {n['external_id']: n.get('name') for n in prev if n.get('external_id')} | ||
| curr_eid = {n['external_id']: n.get('name') for n in curr if n.get('external_id')} |
There was a problem hiding this comment.
Compare full name attributes when matching by external_id
For names with external_id, change detection only compares text (name) and ignores type/locale, so a real rename-classification change (e.g., FULLY_SPECIFIED→SHORT with same text) is treated as unchanged. In enriched mode this can hide genuine concept updates from the “Updated” concepts view and omit corresponding Names/Translations updates, which makes the changelog inaccurate for those releases.
Useful? React with 👍 / 👎.
Solves OpenConceptLab/ocl_issues#2325