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

VOSICapabilities / TAPRegExt / VOResource #25

Merged
merged 41 commits into from
Oct 2, 2024
Merged

VOSICapabilities / TAPRegExt / VOResource #25

merged 41 commits into from
Oct 2, 2024

Conversation

jwfraustro
Copy link
Collaborator

@jwfraustro jwfraustro commented Sep 25, 2024

Adds complete definitions for the TAPRegExt, VOResource, and VOSI Capabilities specifications.

In order to fully cover the relatively simple spec of VOSI Capabilities, the full standards of TAPRegExt and VOResource need to be implemented. This PR additionally adds documentation and tests for each of the standards.

An updated RTD page for the dev release is available here: https://vo-models.readthedocs.io/v0.4.0.dev0/

@jwfraustro jwfraustro changed the title TAPRegExt / VOResource VOSICapabilities / TAPRegExt / VOResource Sep 26, 2024
@jwfraustro jwfraustro marked this pull request as ready for review September 26, 2024 23:48
@jwfraustro jwfraustro self-assigned this Sep 26, 2024
@jwfraustro
Copy link
Collaborator Author

This MR has been successfully deployed in the vo-tap project and produces valid /capabilities responses verified by taplint. The full breadth of the specification is difficult to test but this project has been able to additionally successfully consume the capabilities responses of other services. For example, consuming IRSA's TAP /capabilities response:

from vo_models.vosi.capabilities.models import VOSICapabilities
import requests

IRSA_CAPABILITIES = "https://irsa.ipac.caltech.edu/TAP/capabilities"

irsa_cap_resp = requests.get(IRSA_CAPABILITIES)
irsa_cap_model = VOSICapabilities.from_xml(irsa_cap_resp.content)

print(irsa_cap_model)

successfully gives you the equivalent VOSICapabilities model (truncated here):

VOSICapabilities(
    capability=[
        Capability(...)
            ],
        ),
        Capability(...)
            ],
        ),
        Capability(...)
            ],
        ),
        TableAccess(
            standard_id="ivo://ivoa.net/std/TAP",
            type="tr:TableAccess",
            validation_level=[],
            description=None,
            interface=[
                Interface(
                    version="1.0",
                    role="std",
                    type="vod:ParamHTTP",
                    access_url=[AccessURL(value=Url("https://irsa.ipac.caltech.edu/TAP/"), use="base")],
                    mirror_url=[],
                    security_method=[
                        SecurityMethod(standard_id=None),
                        SecurityMethod(standard_id=Url("ivo://ivoa.net/sso#cookie")),
                    ],
                    test_querystring=None,
                )
            ],
            data_model=[],
            language=[
                Language(
                    name="ADQL",
                    version=[Version(value="2.0", ivo_id="ivo://ivoa.net/std/ADQL#v2.0")],
                    description="ADQL-2.0",
                    language_features=[
                        LanguageFeatureList(
                            feature=[
                                LanguageFeature(form="POINT", description=None),
                                LanguageFeature(form="CIRCLE", description=None),
                                LanguageFeature(form="BOX", description=None),
                          ...

Copy link
Collaborator

@theresadower theresadower left a comment

Choose a reason for hiding this comment

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

I just discovered through unrelated testing that dataModel listings under /capabilities aren't showing up in the MAST operational TAP service, though both the taplint validator and some pyvo functionality relies on them. Adding that support to the Capabilities section, whether autodetected or through some configuration, would be really helpful for validation and usability of any TAP builds using this code.

example:
<dataModel ivo-id="ivo://ivoa.net/std/ObsCore#core-1.1">ObsCore-1.1</dataModel>

@theresadower
Copy link
Collaborator

I just wanted to say the readthedocs looks really good, and is so much more navigable and helpful than trying to learn this through the standards documents.

@jwfraustro
Copy link
Collaborator Author

I just discovered through unrelated testing that dataModel listings under /capabilities aren't showing up in the MAST operational TAP service, though both the taplint validator and some pyvo functionality relies on them. Adding that support to the Capabilities section, whether autodetected or through some configuration, would be really helpful for validation and usability of any TAP builds using this code.

example: <dataModel ivo-id="ivo://ivoa.net/std/ObsCore#core-1.1">ObsCore-1.1</dataModel>

Following up on this, the model in TAPRegExt here, DataModelType is used to represent this. For example,

DataModelType(ivo_id="ivo://ivoa.net/std/ObsCore#core-1.1", value="ObsCore-1.1")

This has been added to the MAST development deploy and is confirmed as valid by taplint.

Copy link
Collaborator

@theresadower theresadower left a comment

Choose a reason for hiding this comment

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

Confirmed the dataModel update

@jwfraustro jwfraustro merged commit 58f02c5 into main Oct 2, 2024
2 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.

2 participants