Europass import: the SkillsPassport XML reader reads its own fixture, not the files Cedefop's editor wrote #632
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#632
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, running the SkillsPassport XML reader on a document shaped like Cedefop's own published example.Related to #54.
Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atplugins/europass/reader.py:370-376(_read_experience),:403-407(_read_education),:471-475(_read_achievements),:440-453(_read_skills),:338-342(_read_person) and:259-264(_date);_make_datemoved toplugins/europass/common.py:55-77, with theint()calls at:68-73. The fixture and the test are unchanged, and the wiki sentence is now atYour-career-record.md:192-194.The XML reader for the pre-2020 format expects a shape Cedefop's editor did not write, so a real file imports the person's name, address and headline and almost nothing of the career, and the review page does not say anything was left out. The JSON reader is not affected: the JSON form does keep its entries in an array under the singular key, with numeric months.
Where:
plugins/europass/reader.py:494-500(_read_experience),:527-531(_read_education),:595-599(_read_achievements): each looks for aWorkExperienceinside aWorkExperience, anEducationinside anEducation, anAchievementinside anAchievement.plugins/europass/reader.py:564-577(_read_skills):MotherTongueandForeignLanguageas direct children ofLinguistic.plugins/europass/reader.py:465-469(_read_person):TelephoneandWebsiteas direct children ofContactInfo.plugins/europass/reader.py:382-387(_date) intoplugins/europass/reader.py:156-161(_make_date): the month and day attributes go toint().tests/data/europass.xml:2-9andtests/test_europass.py:56(test_it_reads_the_shape_a_real_export_has): the fixture was written to the reader's shape.Your-career-record.md:185-187: "the XML or the PDF the Europass CV editor made before 2020" is said to read.What happens:
WorkExperienceList,EducationList,AchievementList,MotherTongueList,ForeignLanguageList,TelephoneList(and, by the same schema,WebsiteList). Its own example,europass-cv-example-v3.3.0.xmlin theeuropass/rest-examples-javarepository (src/main/resources/assets/input/), hasLearnerInfochildrenIdentification,Headline,WorkExperienceList,EducationList,Skills,AchievementList.month="--08"and a day asday="---01"(xs:gMonth,xs:gDay)._make_datepasses them toint(), catches theValueErrorand returns no date.experience [],education [],languages [],projects [], no telephone number,skipped []. Only the name, email, address, headline and the free-prose skill blocks are read. With no skill prose in the file the answer is "That file was read, and there was nothing in it to import."('Independent consultant', None, None): no start date, soimporting.applythen leaves the job out as having no start.The fixture has
month="03"and nested same-name wrappers, so the tests pass. Nothing in the package handles a*Listelement or a leading hyphen. The same reader handles the XML attached to a pre-2020 Europass PDF (pdf-xml).Why it matters: this format exists only to rescue what people still have on their disks, and for those files the import silently reads next to nothing. The XML reader has no "was in the file but could not be read" note, as the JSON and Candidate readers have, so the person cannot tell a short record from an unread one.
Fix: in the XML reader, find each list under either name (the
*Listwrapper, or the nested form the fixture uses) for work experience, education, achievements, mother tongues, foreign languages, telephones and websites. Strip the leading hyphens ofgMonthandgDaybefore_make_date. Add a fixture cut down from Cedefop's published example, with its provenance in the first comment astests/data/europass-candidate-sample.xmlhas. Give the XML reader the notes inrecord.skippedthat the other two readers have, so an unknown shape is named on the review page.Related to #318, which checks the Candidate reader against a real download and does not cover this format. A separate finding of this review (the SkillsPassport readers keeping HTML markup) touches the same functions.
Done when
tests/test_europass.pyreads a fixture in Cedefop's own shape (*Listwrappers,month="--08",day="---01") and asserts the counts of experience, education, languages and projects, the telephone number, and one entry's start date with its month.tests/data/europass.xmlno longer claims to be the shape a real export has, or is replaced by the fixture above.