Page MenuHomeSoftware Heritage

Fix swh.xsd
ClosedPublic

Authored by vlorentz on Feb 24 2022, 12:18 PM.

Details

Summary

It was never actually tested...

Part of T3965.

Diff Detail

Repository
rDDEP Push deposit
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7241 (id=26250)

Could not rebase; Attempt merge onto ccff46762b...

Merge made by the 'recursive' strategy.
 docs/specs/swh.xsd                                 | 66 ++++++++++++----------
 .../{tests_migration => tests}/test_migrations.py  |  0
 2 files changed, 36 insertions(+), 30 deletions(-)
 rename swh/deposit/{tests_migration => tests}/test_migrations.py (100%)
Changes applied before test
commit aa7c3dd351362f802ebfdb7691b89772bd4d204a
Merge: ccff4676 d2d904a2
Author: Jenkins user <jenkins@localhost>
Date:   Thu Feb 24 11:19:02 2022 +0000

    Merge branch 'diff-target' into HEAD

commit d2d904a283a1434d30cf8c68bfc9e708753f705f
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Feb 24 12:13:50 2022 +0100

    Fix swh.xsd
    
    It was never actually tested...

commit d56f08cb83bd25c70a8cb4bafc6df71b6844f5d2
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Feb 24 12:04:03 2022 +0100

    Move tests_migration/test_migrations.py to tests/test_migrations.py
    
    This fixes crashes when running 'pytest -k migration', because swh/deposit/tests_migration/
    lacks a conftest to initialize the database.

See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/759/ for more details.

ardumont added a subscriber: ardumont.

ok

1 question inline.

docs/specs/swh.xsd
41–46

why did you drop maxOccurs to 1 (for others as well)?

What's expected to happen is there is more than 1?

This revision is now accepted and ready to land.Feb 24 2022, 3:38 PM
docs/specs/swh.xsd
41–46

No reason in particular, but it was useless:

  1. 1 is the default value of both minOccurs and maxOccurs (ref: https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-element)
  2. values other than 1 for maxOccurs is invalid within a <xs:all> element (ref: "no element in the content model may appear more than once, i.e. the permissible values of minOccurs and maxOccurs are 0 and 1" https://www.w3.org/TR/xmlschema-0/#groups)
docs/specs/swh.xsd
41–46

Thanks!

Build is green

Patch application report for D7241 (id=26300)

Could not rebase; Attempt merge onto ccff46762b...

Updating ccff4676..2e95623c
Fast-forward
 docs/specs/swh.xsd                                 | 66 ++++++++++++----------
 .../{tests_migration => tests}/test_migrations.py  |  0
 2 files changed, 36 insertions(+), 30 deletions(-)
 rename swh/deposit/{tests_migration => tests}/test_migrations.py (100%)
Changes applied before test
commit 2e95623c6c7783ed407fa721f09289742ecccab8
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Feb 24 12:13:50 2022 +0100

    Fix swh.xsd
    
    It was never actually tested...

commit 8a7e0832641bda3b4c445793cfb92e3de6c5947e
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Feb 24 12:04:03 2022 +0100

    Move tests_migration/test_migrations.py to tests/test_migrations.py
    
    This fixes crashes when running 'pytest -k migration', because swh/deposit/tests_migration/
    lacks a conftest to initialize the database.

See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/781/ for more details.

This revision was automatically updated to reflect the committed changes.