Skip to content

Commit

Permalink
change weldx schema versions to 0.1.0 (#535)
Browse files Browse the repository at this point in the history
* rename and update schemas

* update python files

* update manifest uri

* update schemas

* match GMAW process tag against pattern

* update schema name

* fix softare in examples

* update schema versions in doc

* update CHANGELOG.md

* update CHANGELOG.md

* lint

* fix action name

* ignore CSM warning in test_unmerge_merged_serially
  • Loading branch information
CagtayFabry authored Sep 17, 2021
1 parent 5e9e6d7 commit 7065612
Show file tree
Hide file tree
Showing 123 changed files with 758 additions and 756 deletions.
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@

### ASDF

- all schema version numbers set to ``0.1.0`` [[#535]](https://github.com/BAMWelDX/weldx/pull/535).
- add ``time/time`` schema to support `Time` class [[#463]](https://github.com/BAMWelDX/weldx/pull/463).
- rework ASDF extension to new asdf 2.8 API [[#467]](https://github.com/BAMWelDX/weldx/pull/467)
- move schema files to ``weldx/schemas``
Expand All @@ -79,21 +80,21 @@
- move tag module to ``weldx/tags``
- refactor all asdf uris to new ``asdf://`` naming convention,
see https://asdf.readthedocs.io/en/latest/asdf/extending/uris.html#entities-identified-by-uri
- replaced all referenced weldx tag versions in schemas with ``1.*``
- replaced all referenced weldx tag versions in schemas with ``0.1.*``
- refactor ``asdf://weldx.bam.de/weldx/schemas/datamodels/single_pass_weld-1.0.0.schema``
to ``asdf://weldx.bam.de/weldx/schemas/datamodels/single_pass_weld-1.0.0`` and enable schema test
to ``asdf://weldx.bam.de/weldx/schemas/datamodels/single_pass_weld-0.1.0`` and enable schema test
- add legacy class for validators support in ``weldx.asdf._extension.py``
- asdf utility functions `weldx.asdf.util.uri_match`, `weldx.asdf.util.get_converter_for_tag`
and `weldx.asdf.util.get_weldx_extension`
- add ``devtools/scripts/update_manifest.py`` to auto update manifest from extension metadata
- custom shape validation must now be implemented via staticmethod ``WeldxConverter.shape_from_tagged``
- provide legacy schema support
in ``weldx/schemas/weldx.bam.de/legacy`` [[#533]](https://github.com/BAMWelDX/weldx/pull/533)
- rewrote `asdf://weldx.bam.de/weldx/schemas/core/transformations/coordinate_system_hierarchy-1.0.0` schema for
- rewrote `asdf://weldx.bam.de/weldx/schemas/core/transformations/coordinate_system_hierarchy` schema for
the `CoordinateSystemManager`. It uses the digraph schemas to serialize the coordinate system structure.
[[#497]](https://github.com/BAMWelDX/weldx/pull/497)
- add ``asdf://weldx.bam.de/weldx/schemas/unit/quantity-1.0.0``
and ``asdf://weldx.bam.de/weldx/schemas/unit/unit-1.0.0`` schemas [[#522]](https://github.com/BAMWelDX/weldx/pull/522)
- add ``asdf://weldx.bam.de/weldx/schemas/unit/quantity``
and ``asdf://weldx.bam.de/weldx/schemas/unit/unit`` schemas [[#522]](https://github.com/BAMWelDX/weldx/pull/522)

### deprecations

Expand Down
2 changes: 1 addition & 1 deletion devtools/scripts/update_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def update_manifest(
search_dir: str = "../../weldx/schemas",
out: str = "../../weldx/manifests/weldx-1.0.0.yaml",
out: str = "../../weldx/manifests/weldx-0.1.0.yaml",
):
"""Create manifest file from existing schemas."""
# read existing manifest
Expand Down
6 changes: 3 additions & 3 deletions doc/schemas/aws.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ The ``AWS`` directory contains example implementations for shielding gas descrip

.. asdf-autoschemas::

aws/process/shielding_gas_for_procedure-1.0.0
aws/process/shielding_gas_type-1.0.0
aws/process/gas_component-1.0.0
aws/process/shielding_gas_for_procedure-0.1.0
aws/process/shielding_gas_type-0.1.0
aws/process/gas_component-0.1.0
14 changes: 7 additions & 7 deletions doc/schemas/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ The ``core`` directory contains schema implementations for the base classes.

.. asdf-autoschemas::

core/mathematical_expression-1.0.0
core/time_series-1.0.0
core/variable-1.0.0
core/dimension-1.0.0
core/data_array-1.0.0
core/dataset-1.0.0
core/file-1.0.0
core/mathematical_expression-0.1.0
core/time_series-0.1.0
core/variable-0.1.0
core/dimension-0.1.0
core/data_array-0.1.0
core/dataset-0.1.0
core/file-0.1.0

Transformations
===============
Expand Down
2 changes: 1 addition & 1 deletion doc/schemas/generic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ The ``generic`` directory contains basic schemas.

.. asdf-autoschemas::

uuid-1.0.0
uuid-0.1.0
2 changes: 1 addition & 1 deletion doc/schemas/groove.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Common Terms

.. asdf-autoschemas::

groove/terms-1.0.0
groove/terms-0.1.0

DIN EN ISO 9692-1
#################
Expand Down
6 changes: 3 additions & 3 deletions doc/schemas/process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ The ``Process`` directory contains schema implementations for the base classes.

.. asdf-autoschemas::

process/generic-1.0.0
process/GMAW-1.0.0
process/terms-1.0.0
process/generic-0.1.0
process/GMAW-0.1.0
process/terms-0.1.0
2 changes: 1 addition & 1 deletion tutorials/weldxfile.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
"metadata": {},
"outputs": [],
"source": [
"schema = get_schema_path(\"single_pass_weld-1.0.0\")\n",
"schema = get_schema_path(\"single_pass_weld-0.1.0\")\n",
"schema"
]
},
Expand Down
2 changes: 1 addition & 1 deletion weldx/asdf/_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class WeldxLegacyValidatorType(CustomType):
organization = "weldx.bam.de"
standard = "weldx"
name = "legacy/validators"
version = "1.0.0"
version = "0.1.0"
types = []
validators = {
"wx_property_tag": wx_property_tag_validator,
Expand Down
2 changes: 1 addition & 1 deletion weldx/asdf/cli/welding_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def single_pass_weld_example(
wx_metadata={"welder": "A.W. Elder"},
)

model_path = get_schema_path("single_pass_weld-1.0.0.yaml")
model_path = get_schema_path("single_pass_weld-0.1.0.yaml")

# pre-validate?
weldx.asdf.util.write_read_buffer(
Expand Down
2 changes: 1 addition & 1 deletion weldx/asdf/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
WELDX_SCHEMA_URI_BASE = "asdf://weldx.bam.de/weldx/schemas/"
WELDX_EXTENSION_URI_BASE = "asdf://weldx.bam.de/weldx/extensions/"

WELDX_EXTENSION_VERSION = "1.0.0"
WELDX_EXTENSION_VERSION = "0.1.0"
WELDX_EXTENSION_URI = f"{WELDX_EXTENSION_URI_BASE}weldx-{WELDX_EXTENSION_VERSION}"
5 changes: 3 additions & 2 deletions weldx/asdf/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"WxSyntaxError",
]

_new_tag_regex = re.compile(r"asdf://weldx.bam.de/weldx/tags/(.*)-(\d+.\d+.\d+|1.\*)")
_new_tag_regex = re.compile(r"asdf://weldx.bam.de/weldx/tags/(.*)-(\d+.\d+.\d+|0.1.\*)")


class WxSyntaxError(Exception):
Expand Down Expand Up @@ -81,7 +81,7 @@ def __new__(mcs, name, bases, attrs):
setattr(
cls,
"tags",
[format_tag(name, "1.*")],
[format_tag(name, "0.1.*")],
)

# wrap original to/from_yaml_tree method to include metadata attributes
Expand Down Expand Up @@ -127,4 +127,5 @@ def format_tag(tag_name, version=None, organization="weldx.bam.de", standard="we

def _legacy_tag_from_new_tag(tag: str):
name, version = _new_tag_regex.search(tag).groups()
version = "1.0.0" # legacy_tag version
return f"tag:weldx.bam.de:weldx/{name}-{version}"
2 changes: 1 addition & 1 deletion weldx/asdf/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def get_highest_tag_version(
--------
>>> from weldx.asdf.util import get_highest_tag_version
>>> get_highest_tag_version("asdf://weldx.bam.de/weldx/tags/uuid-*")
'asdf://weldx.bam.de/weldx/tags/uuid-1.0.0'
'asdf://weldx.bam.de/weldx/tags/uuid-0.1.0'
"""
if ctx is None:
Expand Down
Loading

0 comments on commit 7065612

Please sign in to comment.