Skip to content

Commit c1d2f07

Browse files
authored
Merge pull request #64 from braingram/to_tags
Switch schema depedencies from `$ref` to `tag`.
2 parents 823a2bc + ffacc10 commit c1d2f07

23 files changed

+1122
-12
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Changes documentation configuration settings to make this consistent with other asdf-related projects [#61]
55
- Fix typo in latex logo path [#62]
66
- Adds global navigation in docs top bar [#63]
7+
- Update schemas to prefer tag over ref [#64]
78

89
0.3.0 (2024-03-09)
910
------------------
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
id: asdf://asdf-format.org/astronomy/coordinates/manifests/coordinates-1.2.0
2+
extension_uri: asdf://asdf-format.org/astronomy/coordinates/extensions/coordinates-1.2.0
3+
title: Coordinates extension
4+
description: |-
5+
A set of tags for serializing coordinates.
6+
tags:
7+
- tag_uri: tag:astropy.org:astropy/coordinates/angle-1.2.0
8+
schema_uri: http://astropy.org/schemas/astropy/coordinates/angle-1.2.0
9+
title: Represents an Angle.
10+
description: |-
11+
This object represents a subtype of Quantity which has units equivalent to radians or degrees.
12+
- tag_uri: tag:astropy.org:astropy/coordinates/earthlocation-1.2.0
13+
schema_uri: http://astropy.org/schemas/astropy/coordinates/earthlocation-1.2.0
14+
title: Represents EarthLocation objects from astropy.
15+
description: |-
16+
Location on the Earth.
17+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/baseframe-1.2.0
18+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/baseframe-1.2.0
19+
title: Represents a coordinate frame object from astropy
20+
description: |-
21+
This schema is designed to be extended by other schemas to restrict the
22+
allowable frame_attributes.
23+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/cirs-1.2.0
24+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/cirs-1.2.0
25+
title: Represents a CIRS coordinate object from astropy
26+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/fk4-1.2.0
27+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/fk4-1.2.0
28+
title: Represents a FK4 coordinate object from astropy
29+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/fk4noeterms-1.2.0
30+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/fk4noeterms-1.2.0
31+
title: Represents a FK4NoETerms coordinate object from astropy
32+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/fk5-1.2.0
33+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/fk5-1.2.0
34+
title: Represents a FK5 coordinate object from astropy
35+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/galactic-1.2.0
36+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/galactic-1.2.0
37+
title: Represents an Galactic coordinate object from astropy.
38+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/galactocentric-1.2.0
39+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/galactocentric-1.2.0
40+
title: Represents an galactocentric coordinate object from astropy
41+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/gcrs-1.2.0
42+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/gcrs-1.2.0
43+
title: Represents a GCRS coordinate object from astropy
44+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/icrs-1.3.0
45+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/icrs-1.3.0
46+
title: Represents an ICRS coordinate object from astropy.
47+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/itrs-1.2.0
48+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/itrs-1.2.0
49+
title: Represents a ITRS coordinate object from astropy
50+
- tag_uri: tag:astropy.org:astropy/coordinates/frames/precessedgeocentric-1.2.0
51+
schema_uri: http://astropy.org/schemas/astropy/coordinates/frames/precessedgeocentric-1.2.0
52+
title: Represents a PrecessedGeocentric coordinate object from astropy
53+
- tag_uri: tag:astropy.org:astropy/coordinates/latitude-1.2.0
54+
schema_uri: http://astropy.org/schemas/astropy/coordinates/latitude-1.2.0
55+
title: Represents latitude-like angles.
56+
description: |-
57+
Represents latitude-like angle(s) which must be in the range -90 to +90 deg.
58+
- tag_uri: tag:astropy.org:astropy/coordinates/longitude-1.2.0
59+
schema_uri: http://astropy.org/schemas/astropy/coordinates/longitude-1.2.0
60+
title: Represents longitude-like angles.
61+
description: |-
62+
Longitude-like angle(s) which are wrapped within a contiguous 360 degree range.
63+
- tag_uri: tag:astropy.org:astropy/coordinates/representation-1.2.0
64+
schema_uri: http://astropy.org/schemas/astropy/coordinates/representation-1.2.0
65+
title: Representation of points or differentials in two or three dimensional space.
66+
description: |-
67+
Representation of points or differentials in two or three dimensional space.
68+
- tag_uri: tag:astropy.org:astropy/coordinates/skycoord-1.0.0
69+
schema_uri: http://astropy.org/schemas/astropy/coordinates/skycoord-1.0.0
70+
title: Represents a SkyCoord object from astropy
71+
- tag_uri: tag:astropy.org:astropy/coordinates/spectralcoord-1.2.0
72+
schema_uri: http://astropy.org/schemas/astropy/coordinates/spectralcoord-1.2.0
73+
title: Represents a SpectralCoord object from astropy

resources/schemas/angle-1.2.0.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://astropy.org/schemas/astropy/coordinates/angle-1.2.0"
5+
6+
title: |
7+
Represents an Angle.
8+
9+
# TODO: Is there any restriction on the range of values? The next
10+
# version of the schema should make this explicit.
11+
description:
12+
This object represents a subtype of Quantity which has units equivalent to
13+
radians or degrees.
14+
15+
examples:
16+
-
17+
- An Angle object in Degrees
18+
- asdf-standard-1.6.0
19+
- |
20+
!<tag:astropy.org:astropy/coordinates/angle-1.2.0>
21+
unit: !unit/unit-1.0.0 deg
22+
value: 10.0
23+
24+
type: object
25+
properties:
26+
value:
27+
description: |
28+
A vector of one or more values
29+
anyOf:
30+
- type: number
31+
- tag: "tag:stsci.edu:asdf/core/ndarray-1.*"
32+
unit:
33+
description: |
34+
The unit corresponding to the values
35+
anyOf:
36+
- tag: "tag:stsci.edu:asdf/unit/unit-1.*"
37+
- tag: "tag:astropy.org:astropy/units/unit-1.*"
38+
required: [value, unit]
39+
...
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://astropy.org/schemas/astropy/coordinates/earthlocation-1.2.0"
5+
6+
title: |
7+
Represents EarthLocation objects from astropy.
8+
9+
description: |
10+
Location on the Earth.
11+
12+
type: object
13+
properties:
14+
x:
15+
description: |
16+
X component of location in geocentric representation
17+
tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
18+
y:
19+
description: |
20+
Y component of location in geocentric representation
21+
tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
22+
z:
23+
description: |
24+
Z component of location in geocentric representation
25+
tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
26+
ellipsoid:
27+
description: |
28+
Reference ellipsoid that is used when representing geodetic coordinates.
29+
type: string
30+
enum: [WGS84, GRS80, WGS72]
31+
32+
required: [x, y, z]
33+
additionalProperties: False
34+
...
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://astropy.org/schemas/astropy/coordinates/frames/baseframe-1.2.0"
5+
6+
title: |
7+
Represents a coordinate frame object from astropy
8+
9+
description: |
10+
This schema is designed to be extended by other schemas to restrict the
11+
allowable frame_attributes.
12+
13+
type: object
14+
properties:
15+
data:
16+
description: |
17+
The representation object holding any data associated with the frame.
18+
tag: "tag:astropy.org:astropy/coordinates/representation-1.*"
19+
frame_attributes:
20+
description: |
21+
Attributes on the coordinate frame.
22+
type: object
23+
24+
25+
additionalProperties: false
26+
required: [frame_attributes]
27+
...
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://astropy.org/schemas/astropy/coordinates/frames/cirs-1.2.0"
5+
6+
title: |
7+
Represents a CIRS coordinate object from astropy
8+
9+
examples:
10+
-
11+
- A CIRS frame without data
12+
- asdf-standard-1.6.0
13+
- |
14+
!<tag:astropy.org:astropy/coordinates/frames/cirs-1.2.0>
15+
frame_attributes:
16+
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
17+
-
18+
- A CIRS frame with data
19+
- asdf-standard-1.6.0
20+
- |
21+
!<tag:astropy.org:astropy/coordinates/frames/cirs-1.2.0>
22+
data: !<tag:astropy.org:astropy/coordinates/representation-1.1.0>
23+
components:
24+
lat: !<tag:astropy.org:astropy/coordinates/latitude-1.1.0> {unit: !unit/unit-1.0.0 deg,
25+
value: 10.0}
26+
lon: !<tag:astropy.org:astropy/coordinates/longitude-1.1.0>
27+
unit: !unit/unit-1.0.0 deg
28+
value: 120.0
29+
wrap_angle: !<tag:astropy.org:astropy/coordinates/angle-1.1.0> {unit: !unit/unit-1.0.0 deg,
30+
value: 360.0}
31+
type: UnitSphericalRepresentation
32+
frame_attributes:
33+
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
34+
35+
allOf:
36+
- $ref: baseframe-1.2.0
37+
- properties:
38+
frame_attributes:
39+
type: object
40+
properties:
41+
obstime:
42+
tag: "tag:stsci.edu:asdf/time/time-1.*"
43+
required: [obstime]
44+
...
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://astropy.org/schemas/astropy/coordinates/frames/fk4-1.2.0"
5+
6+
title: |
7+
Represents a FK4 coordinate object from astropy
8+
9+
examples:
10+
-
11+
- A FK4 frame without data
12+
- asdf-standard-1.6.0
13+
- |
14+
!<tag:astropy.org:astropy/coordinates/frames/fk4-1.2.0>
15+
frame_attributes:
16+
equinox: !time/time-1.2.0 {scale: tai, value: B1950.000}
17+
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
18+
-
19+
- A FK4 frame with data
20+
- asdf-standard-1.6.0
21+
- |
22+
!<tag:astropy.org:astropy/coordinates/frames/fk4-1.2.0>
23+
data: !<tag:astropy.org:astropy/coordinates/representation-1.1.0>
24+
components:
25+
lat: !<tag:astropy.org:astropy/coordinates/latitude-1.1.0> {unit: !unit/unit-1.0.0 deg,
26+
value: 10.0}
27+
lon: !<tag:astropy.org:astropy/coordinates/longitude-1.1.0>
28+
unit: !unit/unit-1.0.0 deg
29+
value: 120.0
30+
wrap_angle: !<tag:astropy.org:astropy/coordinates/angle-1.1.0> {unit: !unit/unit-1.0.0 deg,
31+
value: 360.0}
32+
type: UnitSphericalRepresentation
33+
frame_attributes:
34+
equinox: !time/time-1.2.0 {scale: tai, value: B1950.000}
35+
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
36+
37+
allOf:
38+
- $ref: baseframe-1.2.0
39+
- properties:
40+
frame_attributes:
41+
type: object
42+
properties:
43+
equinox:
44+
tag: "tag:stsci.edu:asdf/time/time-1.*"
45+
obstime:
46+
tag: "tag:stsci.edu:asdf/time/time-1.*"
47+
required: [equinox]
48+
...
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://astropy.org/schemas/astropy/coordinates/frames/fk4noeterms-1.2.0"
5+
6+
title: |
7+
Represents a FK4NoETerms coordinate object from astropy
8+
9+
examples:
10+
-
11+
- A FK4NoETerms frame without data
12+
- asdf-standard-1.6.0
13+
- |
14+
!<tag:astropy.org:astropy/coordinates/frames/fk4noeterms-1.2.0>
15+
frame_attributes:
16+
equinox: !time/time-1.2.0 {scale: tai, value: B1950.000}
17+
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
18+
-
19+
- A FK4NoETerms frame with data
20+
- asdf-standard-1.6.0
21+
- |
22+
!<tag:astropy.org:astropy/coordinates/frames/fk4noeterms-1.2.0>
23+
data: !<tag:astropy.org:astropy/coordinates/representation-1.1.0>
24+
components:
25+
lat: !<tag:astropy.org:astropy/coordinates/latitude-1.1.0> {unit: !unit/unit-1.0.0 deg,
26+
value: 10.0}
27+
lon: !<tag:astropy.org:astropy/coordinates/longitude-1.1.0>
28+
unit: !unit/unit-1.0.0 deg
29+
value: 120.0
30+
wrap_angle: !<tag:astropy.org:astropy/coordinates/angle-1.1.0> {unit: !unit/unit-1.0.0 deg,
31+
value: 360.0}
32+
type: UnitSphericalRepresentation
33+
frame_attributes:
34+
equinox: !time/time-1.2.0 {scale: tai, value: B1950.000}
35+
obstime: !time/time-1.2.0 {scale: tai, value: B1950.000}
36+
37+
allOf:
38+
- $ref: baseframe-1.2.0
39+
- properties:
40+
frame_attributes:
41+
type: object
42+
properties:
43+
equinox:
44+
tag: "tag:stsci.edu:asdf/time/time-1.*"
45+
obstime:
46+
tag: "tag:stsci.edu:asdf/time/time-1.*"
47+
required: [equinox]
48+
...
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://astropy.org/schemas/astropy/coordinates/frames/fk5-1.2.0"
5+
6+
title: |
7+
Represents a FK5 coordinate object from astropy
8+
9+
examples:
10+
-
11+
- A FK5 frame without data with a custom equinox
12+
- asdf-standard-1.6.0
13+
- |
14+
!<tag:astropy.org:astropy/coordinates/frames/fk5-1.2.0>
15+
frame_attributes: {equinox: !time/time-1.2.0 '2011-01-02 00:00:00.000'}
16+
-
17+
- A FK5 frame with data
18+
- asdf-standard-1.6.0
19+
- |
20+
!<tag:astropy.org:astropy/coordinates/frames/fk5-1.2.0>
21+
data: !<tag:astropy.org:astropy/coordinates/representation-1.1.0>
22+
components:
23+
lat: !<tag:astropy.org:astropy/coordinates/latitude-1.1.0> {unit: !unit/unit-1.0.0 deg,
24+
value: 10.0}
25+
lon: !<tag:astropy.org:astropy/coordinates/longitude-1.1.0>
26+
unit: !unit/unit-1.0.0 deg
27+
value: 120.0
28+
wrap_angle: !<tag:astropy.org:astropy/coordinates/angle-1.1.0> {unit: !unit/unit-1.0.0 deg,
29+
value: 360.0}
30+
type: UnitSphericalRepresentation
31+
frame_attributes: {equinox: !time/time-1.2.0 J2000.000}
32+
33+
allOf:
34+
- $ref: baseframe-1.2.0
35+
- properties:
36+
frame_attributes:
37+
type: object
38+
properties:
39+
equinox:
40+
tag: "tag:stsci.edu:asdf/time/time-1.*"
41+
required: [equinox]
42+
...

0 commit comments

Comments
 (0)