Skip to content

Commit

Permalink
Merge pull request #83 from BAMWelDX/73_asdf_27
Browse files Browse the repository at this point in the history
update environment & dependency versions to asdf 2.7
  • Loading branch information
CagtayFabry authored Jul 24, 2020
2 parents 315012f + 11e99dd commit a4d623a
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 21 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@
wx_property_tag: "tag:weldx.bam.de:weldx/time/timestamp-1.0.0"
```
It can be used as a "named" mapping replacement instead of YAML `arrays`.
- update requirements to `asdf>=2.7` [#83]
- update `anyOf` to `oneOf` in ASDF schemas [#83]
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- xarray>=0.15
- pint>=0.11
- bottleneck
- asdf=2.6
- asdf>=2.7
- sphinx
- recommonmark
- openpyxl
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scipy>=1.4",
"sympy>=1.6",
"pint>=0.11",
"asdf>=2.6",
"asdf>=2.7",
"bottleneck>=1.3",
"Jinja2>=2.11",
"networkx>=2",
Expand Down
2 changes: 0 additions & 2 deletions tests/test_asdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
# validators -----------------------------------------------------------------
from weldx.constants import WELDX_QUANTITY as Q_

from .asdf_tests.utility import _write_read_buffer


def test_aws_example():
"""Test validity of current AWS Data Dictionary standard implementation."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ properties:
joint_design:
description: |
AWS 3.0, p. 19 : "Detailed Description of mating configuration of two components, sufficient information for shop preparation of the components." TODO CLASS
$ref: ../../core/iso_groove-1.0.0
tag: "tag:weldx.bam.de:weldx/core/iso_groove-1.0.0"

weld_sizes:
description: |
Linear dimensions of cross sectional weld features. Sizes are of design and actual features. TODO CLASS
-$ref: tag:stsci.edu:asdf/unit/quantity-1.1.0
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0

number_of_passes:
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ definitions:
Special depth
$ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"

anyOf:
oneOf:
# I Groove
- type: object
properties:
Expand All @@ -70,13 +70,11 @@ anyOf:
code_number:
type: array
required: [t, b]
additionalProperties: false
wx_unit:
t: "m"
b: "m"
required: [type, components]
propertyOrder: [type, components]
additionalProperties: true

# Single U Groove
- type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ properties:
deviation:
description: |
A simple numerical representation of the error.
anyOf:
oneOf:
- type: number
- $ref: tag:stsci.edu:asdf/unit/quantity-1.1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ definitions:
Maximum timestamp in the index.
$ref: timestamp-1.0.0

anyOf:
oneOf:
- type: object
properties:
values:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ definitions:
Maximum timedelta in the index.
$ref: timedelta-1.0.0

anyOf:
oneOf:
- type: object
properties:
values:
Expand Down
14 changes: 5 additions & 9 deletions weldx/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,11 @@ def __init__(
# TODO: Test if xarray has correct format
pass

# TODO: Remove the deepcopy when asdf 2.7.0 is available
# - the copy circumvents an asdf bug
orientation = deepcopy(
xr.apply_ufunc(
normalize,
orientation,
input_core_dims=[["c"]],
output_core_dims=[["c"]],
)
orientation = xr.apply_ufunc(
normalize,
orientation,
input_core_dims=[["c"]],
output_core_dims=[["c"]],
)

# unify time axis
Expand Down

0 comments on commit a4d623a

Please sign in to comment.