cern-sis / cern-sis/digitization

Implement CDS XML generation

Open
#23 0 comments 0 reactions 1 assignee Claimed by @namollayo View on GitHub
File Import Project
Dominant language
Python
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Description
The pipeline needs to generate final MARCXML files used for the CDS upload. We should generate one XML per Boite file and one combined XML. Currently, output is always written to disk in a fixed location, we should refactor this to support writing to a specific output dir if provided or if not, write to some temporary output.

## Work involved
- Rewrite `create_import_xml_files` to accept an optional `output_path` parameter
- If `output_path` is provided: write per-Boite XML files and combined XML to this path
- If `output_path` is `None`: use a temporary dir and return its paths to use it in later steps of the script
- Ensure that valid MARCXML files are generated
- Add a passable Output dir parameter to the script. This parameter may already exists for the Boite download at the beggining or the log file output of the file matching step. In case it does just use the same path with a differen subfolder like 'XMLs' or similar.

## Acceptance criteria
- MARCXML files are generated for each Boite Excel file
- A combined MARCXML is generated that merges all Boite file records
- When `--output-path` is provided, files get saved to that path
- When `--output-path` is no provided, files are generated in a temporary directory
- Return value or output structure makes it clear where/how to access the generated XML(s)

## Screenshots(Optional)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.