Skip to content

Navigation Menu

Sign in
Sign up

[MarkAPI-122] feat: add PubMed/PMC XML generation for XML documents - #124

Open
Rossi-Luciano wants to merge 1 commit into
scieloorg:main from
Rossi-Luciano:feat/xml-manager-pubmed-pmc-generation
Open

[MarkAPI-122] feat: add PubMed/PMC XML generation for XML documents #124
Rossi-Luciano wants to merge 1 commit into
scieloorg:main from
Rossi-Luciano:feat/xml-manager-pubmed-pmc-generation

Conversation

@Rossi-Luciano

@Rossi-Luciano Rossi-Luciano commented Jun 11, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Summary

  • Adds models, tasks, exceptions and migration to convert XML documents to PubMed/PMC XML formats.
  • Adds simplified upload-and-convert admin views (PubMed/PMC) so a single XML file can be uploaded and converted independently of other workflows.
  • Adds a "Last error" column to the XML Documents list, surfacing the most recent conversion error (XPE/VDE/CDE/CHE/CPE/CTE/PME/PCE/UNE) per document.
  • Fixes a double-serialization bug: generate_pubmed_for_xml_document/generate_pmc_for_xml_document were calling xml_utils.tostring(...) on strings already returned by packtools' pipeline_pubmed/pipeline_pmc, causing TypeError: Type 'str' cannot be serialized. (logged as "Unknown Error").

Test plan

  • python manage.py test xml_manager — 46 tests, same 8 pre-existing unrelated failures in test_sps_package_validation.py (celery broker/test-db isolation issue), no new regressions.
  • Manually verified PubMed conversion succeeds end-to-end for a real document (S1984-92302025000100304.xml) that previously failed with "Unknown Error".
  • Verified upload-and-convert admin forms for PubMed and PMC via Wagtail admin (form validation, file upload, task triggering).

Issue

#122

🤖 Generated with Claude Code

Add models, tasks, admin views and forms to upload an XML document and
convert it to PubMed/PMC XML formats independently of other workflows,
plus a "Last error" column in the XML Documents list to surface
conversion errors. Also fixes a double-serialization bug where
generate_pubmed_for_xml_document/generate_pmc_for_xml_document wrote
xml_utils.tostring(...) over strings already returned by packtools'
pipeline_pubmed/pipeline_pmc.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gitnnolabs gitnnolabs Awaiting requested review from gitnnolabs
@pitangainnovare pitangainnovare Awaiting requested review from pitangainnovare

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /