Skip to content

Commit

Permalink
Merge pull request #326 from WilliamJamieson/feature/remove_tag
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Aug 8, 2022
2 parents d6966c1 + 2eb3768 commit 0cffcb5
Show file tree
Hide file tree
Showing 34 changed files with 8 additions and 37 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The stable ASDF Standard is v1.5.0
- Move packaging to ``pyproject.toml`` file from ``setup.cfg`` and ``setup.py``
files. [#321]
- Remove `tag` from within the `time-1.1.0` schema. [#323]
- Remove `tag` from within the remaining schemas. [#326]

1.0.2 (2022-04-15)
------------------
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/core/asdf-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ title: |
description: |
This schema contains the top-level attributes for every ASDF file.
tag: "tag:stsci.edu:asdf/core/asdf-1.0.0"
type: object
properties:
asdf_library:
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/core/asdf-1.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ title: |
description: |
This schema contains the top-level attributes for every ASDF file.
tag: "tag:stsci.edu:asdf/core/asdf-1.1.0"
type: object
properties:
asdf_library:
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/core/column-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/column-1.0.0"
tag: "tag:stsci.edu:asdf/core/column-1.0.0"

title: >
A column in a table.
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/core/complex-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ examples:
- -1 real, 0 imaginary
- "!core/complex-1.0.0 -1"

tag: "tag:stsci.edu:asdf/core/complex-1.0.0"
type: string
# This regex was automatically generated from a description of a grammar
pattern: "^(((((([+-]?(([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN)))))|([+-]?(([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[eE][+-]?[0-9]+)))|([+-]?(((([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[iIjJ])|((([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[eE][+-]?[0-9]+[iIjJ])))|((([+-]?(([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN)))))|([+-]?(([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[eE][+-]?[0-9]+))[+-](((([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[iIjJ])|((([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[eE][+-]?[0-9]+[iIjJ])))))|(\\((((([+-]?(([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN)))))|([+-]?(([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[eE][+-]?[0-9]+)))|([+-]?(((([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[iIjJ])|((([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[eE][+-]?[0-9]+[iIjJ])))|((([+-]?(([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN)))))|([+-]?(([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[eE][+-]?[0-9]+))[+-](((([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[iIjJ])|((([0-9]+)|(\\.[0-9]+)|([0-9]+\\.[0-9]+)|(((inf)|(INF)))|(((nan)|(NAN))))[eE][+-]?[0-9]+[iIjJ]))))\\)))$"
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/core/constant-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/constant-1.0.0"
tag: "tag:stsci.edu:asdf/core/constant-1.0.0"
title: Specify that a value is a constant.
description: |
Used as a utility to indicate that value is a literal constant.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ title: |
description: |
Metadata about specific ASDF extensions that were used to create this file.
tag: "tag:stsci.edu:asdf/core/extension_metadata-1.0.0"
type: object
properties:
extension_class:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/externalarray-1.0.0"
tag: "tag:stsci.edu:asdf/core/externalarray-1.0.0"
title: Point to an array-like object in an external file.
description: |
Allow referencing of array-like objects in external files. These files can be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ description: |
A record of an operation that has been performed
upon a file.
tag: "tag:stsci.edu:asdf/core/history_entry-1.0.0"
type: object
properties:
description:
Expand Down
2 changes: 0 additions & 2 deletions resources/schemas/stsci.edu/asdf/core/integer-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ examples:
datatype: uint32
shape: [4]
tag: "tag:stsci.edu:asdf/core/integer-1.0.0"
type: object
properties:
words:
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/core/ndarray-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0"
tag: "tag:stsci.edu:asdf/core/ndarray-1.0.0"

title: >
An *n*-dimensional array.
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/core/software-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ title: |
description: |
General-purpose description of a software package.
tag: "tag:stsci.edu:asdf/core/software-1.0.0"
type: object
properties:
name:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ description: |
Identifies the specific subclass that was serialized,
to enable ASDF readers to correctly deserialize the object.
tag: "tag:stsci.edu:asdf/core/subclass_metadata-1.0.0"
type: object
properties:
name:
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/core/table-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/core/table-1.0.0"
tag: "tag:stsci.edu:asdf/core/table-1.0.0"

title: >
A table.
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/time/time-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/time/time-1.0.0"
tag: "tag:stsci.edu:asdf/time/time-1.0.0"
title: Represents an instance in time.
description: |
A "time" is a single instant in time. It may explicitly specify the
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/time/time-1.2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/time/time-1.2.0"
tag: "tag:stsci.edu:asdf/time/time-1.2.0"
title: Represents an instance in time.
description: |
A "time" is a single instant in time. It may explicitly specify the
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/unit/defunit-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ description: |
The new unit must be defined before any unit tags that use it.
tag: "tag:stsci.edu:asdf/unit/defunit-1.0.0"
type: object
properties:
name:
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/unit/quantity-1.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/unit/quantity-1.1.0"
tag: "tag:stsci.edu:asdf/unit/quantity-1.1.0"

title: >
Represents a Quantity object from astropy
Expand Down
4 changes: 0 additions & 4 deletions resources/schemas/stsci.edu/asdf/unit/unit-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ examples:
- |
!unit/unit-1.0.0 "2.1798721 10-18kg m2 s-2"
anyOf:
- tag: "tag:stsci.edu:asdf/unit/unit-1.0.0"
- {}

type: string
pattern: "[\x00-\x7f]*"
...
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/celestial_frame-1.0.0"
tag: "tag:stsci.edu:asdf/wcs/celestial_frame-1.0.0"

title: >
Represents a celestial frame.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/celestial_frame-1.1.0"
tag: "tag:stsci.edu:asdf/wcs/celestial_frame-1.1.0"

title: >
Represents a celestial frame.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/composite_frame-1.0.0"
tag: "tag:stsci.edu:asdf/wcs/composite_frame-1.0.0"

title: >
Represents a set of frames.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/composite_frame-1.1.0"
tag: "tag:stsci.edu:asdf/wcs/composite_frame-1.1.0"

title: >
Represents a set of frames.
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/wcs/icrs_coord-1.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/icrs_coord-1.1.0"
tag: "tag:stsci.edu:asdf/wcs/icrs_coord-1.1.0"

title: |
Represents an ICRS coordinate object from astropy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/spectral_frame-1.0.0"
tag: "tag:stsci.edu:asdf/wcs/spectral_frame-1.0.0"

title: >
Represents a spectral frame.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/spectral_frame-1.1.0"
tag: "tag:stsci.edu:asdf/wcs/spectral_frame-1.1.0"

title: >
Represents a spectral frame.
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/wcs/step-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/step-1.0.0"
tag: "tag:stsci.edu:asdf/wcs/step-1.0.0"
title: >
Describes a single step of a WCS transform pipeline.
description: >
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/wcs/step-1.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/step-1.1.0"
tag: "tag:stsci.edu:asdf/wcs/step-1.1.0"
title: >
Describes a single step of a WCS transform pipeline.
description: >
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/wcs/step-1.2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/step-1.2.0"
tag: "tag:stsci.edu:asdf/wcs/step-1.2.0"
title: >
Describes a single step of a WCS transform pipeline.
description: >
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/wcs/wcs-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/wcs-1.0.0"
tag: "tag:stsci.edu:asdf/wcs/wcs-1.0.0"
title: >
A system for describing generalized world coordinate transformations.
description: >
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/wcs/wcs-1.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/wcs-1.1.0"
tag: "tag:stsci.edu:asdf/wcs/wcs-1.1.0"
title: >
A system for describing generalized world coordinate transformations.
description: >
Expand Down
1 change: 0 additions & 1 deletion resources/schemas/stsci.edu/asdf/wcs/wcs-1.2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/wcs/wcs-1.2.0"
tag: "tag:stsci.edu:asdf/wcs/wcs-1.2.0"
title: >
A system for describing generalized world coordinate transformations.
description: >
Expand Down
7 changes: 6 additions & 1 deletion tests/test_manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ def test_manifest(path, tag_to_schema):
assert "description" in manifest

for tag in manifest["tags"]:
if "time-1.1.0" not in tag["tag_uri"]:
if (
"time" not in tag["tag_uri"]
and "core" not in tag["tag_uri"]
and "unit" not in tag["tag_uri"]
and "wcs" not in tag["tag_uri"]
):
assert tag["tag_uri"] in tag_to_schema
schema = tag_to_schema[tag["tag_uri"]][0]
assert tag["schema_uri"] == schema["id"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_version_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_version_map(path, schema_tags):

for tag_base, tag_version in vm["tags"].items():
tag = f"{tag_base}-{tag_version}"
if "time-1.1.0" not in tag:
if "time" not in tag and "core" not in tag and "unit" not in tag and "wcs" not in tag:
assert tag in schema_tags, f"{path.name} specifies missing tag {tag}"

assert len(vm["tags"].keys()) == len(set(vm["tags"].keys())), f"{path.name} contains duplicate tags"
Expand Down

0 comments on commit 0cffcb5

Please sign in to comment.