Skip to content

Some updates to ADES schema after validation attempts using MPC obs table#95

Merged
federicaspoto merged 7 commits into
masterfrom
magnitude-band
Mar 17, 2026
Merged

Some updates to ADES schema after validation attempts using MPC obs table#95
federicaspoto merged 7 commits into
masterfrom
magnitude-band

Conversation

@federicaspoto

@federicaspoto federicaspoto commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

@stevechesley , @stevenstetzler
after some discussions we had around observations consistency, this is a PR containing some of the changes we talked about:

  • Allow trkSub to contain / (this will validate ITF observations)
  • Allow ref to be 28 chars long (this is the max length we have in the database)
  • Allow design to be 35 chars long (Marco Micheli's request)

Then I added one conversion from Rj to R that was missing.
I added the tests and update the documentation.

[cc @matthewjohnpayne ]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the ADES schema and supporting tooling/docs to reflect validation findings from MPC observation data, including relaxed field length constraints and an additional photometric band conversion for MPC 80-column export.

Changes:

  • Update XSD constraints: ref max length to 28, telescope design to 35, and adjust trkSub pattern handling.
  • Add/extend test fixtures for schema validation (new XML inputs) and band conversion (RjR) expected output.
  • Refresh documentation workflow instructions and update generated artifacts.

Reviewed changes

Copilot reviewed 10 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
xsd/submit.xsd Updates schema limits/patterns for submit validation (notably RefType length and Telescope design).
xsd/general.xsd Updates schema limits/patterns for general validation (RefType length and Telescope design).
xml/adesmaster.xml Updates master schema source and embedded documentation for RefType, trkSub pattern, and Telescope design.
Python/ades/xmltompc80col.py Adds missing RjR band conversion and applies formatting/cleanup.
tests/test_validation.py Extends valgeneral test matrix with new XML fixtures.
tests/input/obs_design.xml New fixture to validate longer telescope design strings.
tests/input/obs_ITF_trksub.xml New fixture covering ITF-style trkSub values containing /.
tests/input/band_conversions.xml Adds an optical record using Rj to validate conversion behavior.
tests/expected/band_conversions.obs Updates expected MPC80 output for the new Rj case.
doc/README.docs Updates doc build commands to call scripts via ./.
attic/ades_master_22Dec2025.pdf Adds the generated PDF artifact to the attic snapshot set.
Comments suppressed due to low confidence (1)

xsd/submit.xsd:339

  • This change updates OldTrkSubType's pattern, but submit.xsd's TrkSubType only unions BaseTrkSubType, so '/' will still be rejected for submit-schema validation. If the intent is to allow '/' in submitter files, TrkSubType needs to include OldTrkSubType or BaseTrkSubType's pattern needs to be expanded accordingly.
  <xsd:simpleType name="OldTrkSubType">
    <xsd:restriction base="StringType">
      <xsd:pattern value="[- ?+@./()/\\A-Za-z0-9_]*"/>
      <xsd:maxLength value="8"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:simpleType name="TrkSubType">
    <xsd:union memberTypes="BaseTrkSubType"/>
  </xsd:simpleType>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread xml/adesmaster.xml Outdated
Comment thread tests/test_validation.py
Comment thread Python/ades/xmltompc80col.py Outdated
Comment thread Python/ades/xmltompc80col.py
Comment thread Python/ades/xmltompc80col.py Outdated
federicaspoto and others added 6 commits March 16, 2026 16:39
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@federicaspoto federicaspoto merged commit 5506aaf into master Mar 17, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants