Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mivot writer #627

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open

Mivot writer #627

wants to merge 43 commits into from

Conversation

lmichel
Copy link
Contributor

@lmichel lmichel commented Nov 30, 2024

API for creating and writing MIVOTY annotation

#. Create individual instances (INSTANCE) using the MivotInstance class
#. Wrap the annotations with the MivotAnnotations class
#. Insert the annotations into a VOtable by using the Astropy API (wrapped in the package logic).

The annotation builder does not check whether the XML conforms to any particular model.
It simply validates it against the MIVOT XML Schema if the xmlvalidator package if is installed.

The documentation has been split in 2 separate sections (reading and writing MIVOT)

@lmichel lmichel closed this Nov 30, 2024
@lmichel lmichel reopened this Dec 1, 2024
@lmichel lmichel closed this Dec 1, 2024
@lmichel lmichel reopened this Dec 2, 2024
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 86.74033% with 24 lines in your changes missing coverage. Please review.

Project coverage is 82.77%. Comparing base (eba8c6f) to head (bab58f2).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
pyvo/mivot/writer/annotations.py 82.11% 22 Missing ⚠️
pyvo/mivot/utils/xml_utils.py 75.00% 1 Missing ⚠️
pyvo/mivot/writer/instance.py 98.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #627      +/-   ##
==========================================
+ Coverage   82.31%   82.77%   +0.46%     
==========================================
  Files          72       75       +3     
  Lines        7429     7607     +178     
==========================================
+ Hits         6115     6297     +182     
+ Misses       1314     1310       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lmichel lmichel marked this pull request as draft December 2, 2024 12:05
@lmichel lmichel marked this pull request as ready for review December 2, 2024 17:18
Forced pull after having squashed tiny commits dues to CI errors
Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

Some comments mostly focusing on documentation and on how the API is exposed.

Comment on lines 1 to 3
*********************
MIVOT (``pyvo.mivo``)
*********************
Copy link
Member

Choose a reason for hiding this comment

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

typo

Suggested change
*********************
MIVOT (``pyvo.mivo``)
*********************
**********************
MIVOT (``pyvo.mivot``)
**********************

blocks into VOTable files. The MIVOT block, represented as an XML structure, is used for
data model annotations in the IVOA ecosystem.

Features:
Copy link
Member

Choose a reason for hiding this comment

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

While I see the motivation for including some narrative docs with the source code, this section is not at all included in the rendered documentation as is not being part of any testing. So any information listed here likely need to be repeated and then kept in sync with the narrative docs. So my suggestion would be to remove the details from here and only have the narrative docs, as well as docstrings in any user facing functionality.

docs/mivot/index.rst Show resolved Hide resolved
pyvo/mivot/writer/instance.py Outdated Show resolved Hide resolved
pyvo/mivot/writer/instance.py Outdated Show resolved Hide resolved
pyvo/mivot/utils/xml_utils.py Outdated Show resolved Hide resolved
CHANGES.rst Outdated Show resolved Hide resolved
pyvo/mivot/writer/annotations.py Show resolved Hide resolved
@lmichel
Copy link
Contributor Author

lmichel commented Dec 15, 2024

The 3.11 step failed on a Simbad TAP server error
I do not understand what the issue is with readthedoc, I guess it is a project-wide scope.

@bsipocz
Copy link
Member

bsipocz commented Dec 16, 2024

The simbad failure is unrelated and I see it in main, too. However the RTD is coming from this PR, I've added a patch to fix it.

This is ready for review for @astropy/pyvo-maintainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants