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

Fix the base_format list. #349

Merged
merged 4 commits into from
Nov 22, 2022

Conversation

WilliamJamieson
Copy link
Contributor

@WilliamJamieson WilliamJamieson commented Nov 17, 2022

Fixes #346.
Fixes #352 per comment #352 (comment)

@braingram
Copy link
Contributor

@perrygreenfield Should this be an new time schema version (1.3)?

Also, @eslavich should we remove the ref to ndarray? If we leave it in the object definition changed here will never be used for validation because of issue #345

@WilliamJamieson
Copy link
Contributor Author

@perrygreenfield Should this be an new time schema version (1.3)?

Also, @eslavich should we remove the ref to ndarray? If we leave it in the object definition changed here will never be used for validation because of issue #345

This should be time-1.2.0 as these are simply corrections to the changes that brought 1.2.0 into existence

@braingram
Copy link
Contributor

Perhaps this is a separate issue but time is referenced in wcs (one example here I'm only seeing 2 refs). The refs are currently pointing to time-1.1. Should these be updated to time-1.2?

@WilliamJamieson
Copy link
Contributor Author

Perhaps this is a separate issue but time is referenced in wcs (one example here I'm only seeing 2 refs). The refs are currently pointing to time-1.1. Should these be updated to time-1.2?

Since additionalProperties is not set and its default is true then the base_format will field will not cause any issues in wcs. When asdf-standard 1.6 is finalized and becomes the stable version then we should update things.

@braingram
Copy link
Contributor

braingram commented Nov 21, 2022

Given that neither the converter in astropy or asdf-astropy supports the reference to the ndarray object, I vote for removing the reference:

- $ref: "../core/ndarray-1.0.0#/anyOf/1"

For example, the following is valid if the ndarray reference is kept:

!time/time-1.1.0
  data: [1, 2, 3]

So this validates during reading, but fails during conversion to astropy.Time.

@WilliamJamieson
Copy link
Contributor Author

Given that neither the converter in astropy or asdf-astropy supports the reference to the ndarray object, I vote for removing the reference:

- $ref: "../core/ndarray-1.0.0#/anyOf/1"

This discussion is outside the scope of this PR. It is being removed in #350 and therefore should be discussed there.

@braingram
Copy link
Contributor

I think the ndarray ref is relevant to this issue as it's an inconsistency between the schema and converters. #346

This PR fixes the base_format errors but not 346 as the schema and converters are still inconsistent.

I'd be ok with merging this PR and reopening the issue.

@WilliamJamieson
Copy link
Contributor Author

This PR fixes the base_format errors but not 346 as the schema and converters are still inconsistent.

Please elaborate, what inconsistencies still exist?

Copy link
Contributor

@braingram braingram left a comment

Choose a reason for hiding this comment

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

I see your point that separating the ndarray ref will make this easier to sort out. This looks good to me and I will open a new issue for the ndarray ref.

Copy link
Contributor

@braingram braingram left a comment

Choose a reason for hiding this comment

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

I'm not sure my previous comment was marked with approval. This looks great to me.

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