Skip to content

Commit

Permalink
Merge pull request #55 from braingram/standard_1p6p0
Browse files Browse the repository at this point in the history
Update schemas for ASDF standard 1.6.0
  • Loading branch information
braingram authored Mar 8, 2024
2 parents 60aa7eb + ea3ce45 commit 4d521e4
Show file tree
Hide file tree
Showing 30 changed files with 1,012 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
strategy:
matrix:
include:
- name: Python 3.12 Schema validation tests
python-version: '3.12'
os: ubuntu-latest
toxenv: py312

- name: Python 3.11 Schema validation tests
python-version: '3.11'
os: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

- Add ``asdf-astropy`` as a test dependency. [#34]
- Drop official support for Python 3.8 [#42]
- Update schemas for ASDF standard 1.6.0 [#55]

0.2.0 (2023-03-21)
------------------
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ classifiers = [
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Astronomy',
]
dependencies = [
'asdf >= 2.12.1',
'asdf-standard >= 1.1.0',
]
dynamic = ['version']

Expand Down
73 changes: 73 additions & 0 deletions resources/manifests/coordinates-1.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
id: asdf://asdf-format.org/astronomy/coordinates/manifests/coordinates-1.1.0
extension_uri: asdf://asdf-format.org/astronomy/coordinates/extensions/coordinates-1.1.0
title: Coordinates extension 1.1.0
description: |-
A set of tags for serializing coordinates.
tags:
- tag_uri: tag:astropy.org:astropy/coordinates/angle-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/angle-1.1.0
title: Represents an Angle.
description: |-
This object represents a subtype of Quantity which has units equivalent to radians or degrees.
- tag_uri: tag:astropy.org:astropy/coordinates/earthlocation-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/earthlocation-1.1.0
title: Represents EarthLocation objects from astropy.
description: |-
Location on the Earth.
- tag_uri: tag:astropy.org:astropy/coordinates/frames/baseframe-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/baseframe-1.1.0
title: Represents a coordinate frame object from astropy
description: |-
This schema is designed to be extended by other schemas to restrict the
allowable frame_attributes.
- tag_uri: tag:astropy.org:astropy/coordinates/frames/cirs-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/cirs-1.1.0
title: Represents a CIRS coordinate object from astropy
- tag_uri: tag:astropy.org:astropy/coordinates/frames/fk4-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/fk4-1.1.0
title: Represents a FK4 coordinate object from astropy
- tag_uri: tag:astropy.org:astropy/coordinates/frames/fk4noeterms-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/fk4noeterms-1.1.0
title: Represents a FK4NoETerms coordinate object from astropy
- tag_uri: tag:astropy.org:astropy/coordinates/frames/fk5-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/fk5-1.1.0
title: Represents a FK5 coordinate object from astropy
- tag_uri: tag:astropy.org:astropy/coordinates/frames/galactic-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/galactic-1.1.0
title: Represents an Galactic coordinate object from astropy.
- tag_uri: tag:astropy.org:astropy/coordinates/frames/galactocentric-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/galactocentric-1.1.0
title: Represents an galactocentric coordinate object from astropy
- tag_uri: tag:astropy.org:astropy/coordinates/frames/gcrs-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/gcrs-1.1.0
title: Represents a GCRS coordinate object from astropy
- tag_uri: tag:astropy.org:astropy/coordinates/frames/icrs-1.2.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/icrs-1.1.0
title: Represents an ICRS coordinate object from astropy.
- tag_uri: tag:astropy.org:astropy/coordinates/frames/itrs-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/itrs-1.1.0
title: Represents a ITRS coordinate object from astropy
- tag_uri: tag:astropy.org:astropy/coordinates/frames/precessedgeocentric-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/precessedgeocentric-1.1.0
title: Represents a PrecessedGeocentric coordinate object from astropy
- tag_uri: tag:astropy.org:astropy/coordinates/latitude-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/latitude-1.1.0
title: Represents latitude-like angles.
description: |-
Represents latitude-like angle(s) which must be in the range -90 to +90 deg.
- tag_uri: tag:astropy.org:astropy/coordinates/longitude-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/longitude-1.1.0
title: Represents longitude-like angles.
description: |-
Longitude-like angle(s) which are wrapped within a contiguous 360 degree range.
- tag_uri: tag:astropy.org:astropy/coordinates/representation-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/representation-1.1.0
title: Representation of points or differentials in two or three dimensional space.
description: |-
Representation of points or differentials in two or three dimensional space.
- tag_uri: tag:astropy.org:astropy/coordinates/skycoord-1.0.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/skycoord-1.0.0
title: Represents a SkyCoord object from astropy
- tag_uri: tag:astropy.org:astropy/coordinates/spectralcoord-1.1.0
schema_uri: http://astropy.org/schemas/astropy/coordinates/spectralcoord-1.1.0
title: Represents a SpectralCoord object from astropy
37 changes: 37 additions & 0 deletions resources/schemas/angle-1.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://astropy.org/schemas/astropy/coordinates/angle-1.1.0"

title: |
Represents an Angle.
# TODO: Is there any restriction on the range of values? The next
# version of the schema should make this explicit.
description:
This object represents a subtype of Quantity which has units equivalent to
radians or degrees.

examples:
-
- An Angle object in Degrees
- asdf-standard-1.6.0
- |
!<tag:astropy.org:astropy/coordinates/angle-1.1.0>
unit: !unit/unit-1.0.0 deg
value: 10.0
type: object
properties:
value:
description: |
A vector of one or more values
anyOf:
- type: number
- $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.1.0"
unit:
description: |
The unit corresponding to the values
$ref: "http://stsci.edu/schemas/asdf/unit/unit-1.0.0"
required: [value, unit]
...
34 changes: 34 additions & 0 deletions resources/schemas/earthlocation-1.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://astropy.org/schemas/astropy/coordinates/earthlocation-1.1.0"

title: |
Represents EarthLocation objects from astropy.
description: |
Location on the Earth.
type: object
properties:
x:
description: |
X component of location in geocentric representation
$ref: "http://stsci.edu/schemas/asdf/unit/quantity-1.2.0"
y:
description: |
Y component of location in geocentric representation
$ref: "http://stsci.edu/schemas/asdf/unit/quantity-1.2.0"
z:
description: |
Z component of location in geocentric representation
$ref: "http://stsci.edu/schemas/asdf/unit/quantity-1.2.0"
ellipsoid:
description: |
Reference ellipsoid that is used when representing geodetic coordinates.
type: string
enum: [WGS84, GRS80, WGS72]

required: [x, y, z]
additionalProperties: False
...
27 changes: 27 additions & 0 deletions resources/schemas/frames/baseframe-1.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://astropy.org/schemas/astropy/coordinates/frames/baseframe-1.1.0"

title: |
Represents a coordinate frame object from astropy
description: |
This schema is designed to be extended by other schemas to restrict the
allowable frame_attributes.
type: object
properties:
data:
description: |
The representation object holding any data associated with the frame.
$ref: "../representation-1.1.0"
frame_attributes:
description: |
Attributes on the coordinate frame.
type: object


additionalProperties: false
required: [frame_attributes]
...
2 changes: 2 additions & 0 deletions resources/schemas/frames/cirs-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ title: |
examples:
-
- A CIRS frame without data
- asdf-standard-1.5.0
- |
!<tag:astropy.org:astropy/coordinates/frames/cirs-1.0.0>
frame_attributes:
obstime: !time/time-1.1.0 {scale: tai, value: B1950.000}
-
- A CIRS frame with data
- asdf-standard-1.5.0
- |
!<tag:astropy.org:astropy/coordinates/frames/cirs-1.0.0>
data: !<tag:astropy.org:astropy/coordinates/representation-1.0.0>
Expand Down
44 changes: 44 additions & 0 deletions resources/schemas/frames/cirs-1.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://astropy.org/schemas/astropy/coordinates/frames/cirs-1.1.0"

title: |
Represents a CIRS coordinate object from astropy
examples:
-
- A CIRS frame without data
- asdf-standard-1.6.0
- |
!<tag:astropy.org:astropy/coordinates/frames/cirs-1.1.0>
frame_attributes:
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
-
- A CIRS frame with data
- asdf-standard-1.6.0
- |
!<tag:astropy.org:astropy/coordinates/frames/cirs-1.1.0>
data: !<tag:astropy.org:astropy/coordinates/representation-1.1.0>
components:
lat: !<tag:astropy.org:astropy/coordinates/latitude-1.1.0> {unit: !unit/unit-1.0.0 deg,
value: 10.0}
lon: !<tag:astropy.org:astropy/coordinates/longitude-1.1.0>
unit: !unit/unit-1.0.0 deg
value: 120.0
wrap_angle: !<tag:astropy.org:astropy/coordinates/angle-1.1.0> {unit: !unit/unit-1.0.0 deg,
value: 360.0}
type: UnitSphericalRepresentation
frame_attributes:
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
allOf:
- $ref: baseframe-1.1.0
- properties:
frame_attributes:
type: object
properties:
obstime:
$ref: "http://stsci.edu/schemas/asdf/time/time-1.2.0"
required: [obstime]
...
2 changes: 2 additions & 0 deletions resources/schemas/frames/fk4-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ title: |
examples:
-
- A FK4 frame without data
- asdf-standard-1.5.0
- |
!<tag:astropy.org:astropy/coordinates/frames/fk4-1.0.0>
frame_attributes:
equinox: !time/time-1.1.0 {scale: tai, value: B1950.000}
obstime: !time/time-1.1.0 {scale: tai, value: B1950.000}
-
- A FK4 frame with data
- asdf-standard-1.5.0
- |
!<tag:astropy.org:astropy/coordinates/frames/fk4-1.0.0>
data: !<tag:astropy.org:astropy/coordinates/representation-1.0.0>
Expand Down
48 changes: 48 additions & 0 deletions resources/schemas/frames/fk4-1.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://astropy.org/schemas/astropy/coordinates/frames/fk4-1.1.0"

title: |
Represents a FK4 coordinate object from astropy
examples:
-
- A FK4 frame without data
- asdf-standard-1.6.0
- |
!<tag:astropy.org:astropy/coordinates/frames/fk4-1.1.0>
frame_attributes:
equinox: !time/time-1.2.0 {scale: tai, value: B1950.000}
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
-
- A FK4 frame with data
- asdf-standard-1.6.0
- |
!<tag:astropy.org:astropy/coordinates/frames/fk4-1.1.0>
data: !<tag:astropy.org:astropy/coordinates/representation-1.1.0>
components:
lat: !<tag:astropy.org:astropy/coordinates/latitude-1.1.0> {unit: !unit/unit-1.0.0 deg,
value: 10.0}
lon: !<tag:astropy.org:astropy/coordinates/longitude-1.1.0>
unit: !unit/unit-1.0.0 deg
value: 120.0
wrap_angle: !<tag:astropy.org:astropy/coordinates/angle-1.1.0> {unit: !unit/unit-1.0.0 deg,
value: 360.0}
type: UnitSphericalRepresentation
frame_attributes:
equinox: !time/time-1.2.0 {scale: tai, value: B1950.000}
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
allOf:
- $ref: baseframe-1.1.0
- properties:
frame_attributes:
type: object
properties:
equinox:
$ref: "http://stsci.edu/schemas/asdf/time/time-1.2.0"
obstime:
$ref: "http://stsci.edu/schemas/asdf/time/time-1.2.0"
required: [equinox]
...
2 changes: 2 additions & 0 deletions resources/schemas/frames/fk4noeterms-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ title: |
examples:
-
- A FK4NoETerms frame without data
- asdf-standard-1.5.0
- |
!<tag:astropy.org:astropy/coordinates/frames/fk4noeterms-1.0.0>
frame_attributes:
equinox: !time/time-1.1.0 {scale: tai, value: B1950.000}
obstime: !time/time-1.1.0 {scale: tai, value: B1950.000}
-
- A FK4NoETerms frame with data
- asdf-standard-1.5.0
- |
!<tag:astropy.org:astropy/coordinates/frames/fk4noeterms-1.0.0>
data: !<tag:astropy.org:astropy/coordinates/representation-1.0.0>
Expand Down
48 changes: 48 additions & 0 deletions resources/schemas/frames/fk4noeterms-1.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://astropy.org/schemas/astropy/coordinates/frames/fk4noeterms-1.1.0"

title: |
Represents a FK4NoETerms coordinate object from astropy
examples:
-
- A FK4NoETerms frame without data
- asdf-standard-1.6.0
- |
!<tag:astropy.org:astropy/coordinates/frames/fk4noeterms-1.1.0>
frame_attributes:
equinox: !time/time-1.2.0 {scale: tai, value: B1950.000}
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
-
- A FK4NoETerms frame with data
- asdf-standard-1.6.0
- |
!<tag:astropy.org:astropy/coordinates/frames/fk4noeterms-1.1.0>
data: !<tag:astropy.org:astropy/coordinates/representation-1.1.0>
components:
lat: !<tag:astropy.org:astropy/coordinates/latitude-1.1.0> {unit: !unit/unit-1.0.0 deg,
value: 10.0}
lon: !<tag:astropy.org:astropy/coordinates/longitude-1.1.0>
unit: !unit/unit-1.0.0 deg
value: 120.0
wrap_angle: !<tag:astropy.org:astropy/coordinates/angle-1.1.0> {unit: !unit/unit-1.0.0 deg,
value: 360.0}
type: UnitSphericalRepresentation
frame_attributes:
equinox: !time/time-1.2.0 {scale: tai, value: B1950.000}
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
allOf:
- $ref: baseframe-1.1.0
- properties:
frame_attributes:
type: object
properties:
equinox:
$ref: "http://stsci.edu/schemas/asdf/time/time-1.2.0"
obstime:
$ref: "http://stsci.edu/schemas/asdf/time/time-1.2.0"
required: [equinox]
...
Loading

0 comments on commit 4d521e4

Please sign in to comment.