afuetterer / oaipmh-scythe

A Scythe for harvesting OAI-PMH repositories.
https://afuetterer.github.io/oaipmh-scythe/
BSD 3-Clause "New" or "Revised" License
7 stars 2 forks source link

Set up models as dataclasses with `xsdata` #126

Open afuetterer opened 9 months ago

afuetterer commented 9 months ago
python -m pip install xsdata[cli,lxml]
xsdata https://www.openarchives.org/OAI/2.0/OAI-PMH.xsd --package=models  --include-header --max-line-length=120 --docstring-style=Google --union-type  --postponed-annotations --structure-style=single-package
sed -i 's/Type//g' src/oaipmh_scythe/models/oai_pmh.py 

Figure this out:

xsdata https://www.openarchives.org/OAI/2.0/OAI-PMH.xsd --package=models.oai_pmh --include-header --max-line-length=120 --docstring-style=Google --union-type --postponed-annotations --structure-style=single-package --slots --kw-only --subscriptable-types

Refs:

xsdata

schemas

htttp status code class

afuetterer commented 9 months ago
xsdata http://www.openarchives.org/OAI/2.0/oai_dc.xsd --package=src.oaipmh_scythe.models.oai_dc  --include-header --max-line-length=120 --docstring-style=Google --union-type  --postponed-annotations --structure-style=single-package
afuetterer commented 5 months ago
xsdata generate  \
  --config src/oaipmh_scythe/models/.xsdata.xml \
  --package src.oaipmh_scythe.models.oai_dc \
  http://www.openarchives.org/OAI/2.0/oai_dc.xsd
xsdata generate \
  --config src/oaipmh_scythe/models/.xsdata.xml \
  --package src.oaipmh_scythe.models.oai_pmh \
  https://www.openarchives.org/OAI/2.0/OAI-PMH.xsd
github-actions[bot] commented 1 month ago

This issue is stale because it has been open 60 days without activity. Remove 'abandoned' label or comment or this will be closed in 7 days.