diff --git a/CHANGELOG.rst b/CHANGELOG.rst index aa1271be5..837f64fca 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,13 +3,25 @@ ############### ******************** - 0.6.0 (unreleased) + 0.6.0 (29.04.2022) ******************** +This release includes major changes to the handling and support of units in the API and ASDF schemas. +All classes now support and require quantities where appropriate. Plain numbers without units are no longer supported +and will raise an exception. If the number is truly dimensionless, you still have to wrap it with +the quantity class `weldx.Q_` like this: + +.. code-block:: python + + my_number = 42.0 + my_number_wrapped = weldx.Q_(my_number, "meter") + +Furthermore, a new class called `GenericSeries` was added. It provides a common interface to describe coordinate-based data either by discrete values or mathematical expressions. A built-in mechanism lets you derive specialized series with specific requirements. For more information, have a look `at the new tutorial `__ . + added ===== -- `DynamicShapeSegment` [:pull:`713`] +- `DynamicShapeSegment` [:pull:`713`] - `SpatialSeries` and `DynamicTraceSegment` [:pull:`699`] @@ -27,10 +39,12 @@ added removed ======= +- removed access to ``WeldxFile.data`` [:pull:`744`] + changes ======= -- The ``wx_property_tag`` validator now also accepts lists of different tags. [:pull:`670`] +- The ``wx_property_tag`` validator now also accepts lists of different tags. [:pull:`670`] When multiple tags are passed, validation will fail if *none* of the supplied patterns match. - Due to a `pandas` update, using the + operator with `Time` and either a `pandas.TimedeltaIndex` or `pandas.DatetimeIndex` diff --git a/CITATION.cff b/CITATION.cff index 17983198e..b4d22ccef 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,8 +1,8 @@ # YAML 1.2 --- title: weldx -version: 0.5.2 -date-released: 2021-11-18 +version: 0.6.0 +date-released: 2022-04-29 authors: - affiliation: "Bundesanstalt für Materialforschung und -prüfung (BAM)" email: cagtay.fabry@bam.de diff --git a/tutorials/01_01_introduction.ipynb b/tutorials/01_01_introduction.ipynb index f961ec11c..1c3dfbf53 100644 --- a/tutorials/01_01_introduction.ipynb +++ b/tutorials/01_01_introduction.ipynb @@ -93,7 +93,7 @@ "source": [ "### Inspecting the file content in a Jupyter session\n", "\n", - "If you are running a jupyter notebook, you can use the `show_asdf_header` method of `WeldxFile` to get a nicely rendered overview of the file content. \n", + "If you are running a jupyter notebook, you can use the `header` method of `WeldxFile` to get a nicely rendered overview of the file content. \n", "The output might vary if you are running the classic notebook environment or a Jupyter-Lab environment.\n", "In the latter case, you will get an interactive, clickable tree view to navigate through the file content.\n", "Uncomment the code in the next cell to try it out:\n", @@ -109,7 +109,7 @@ }, "outputs": [], "source": [ - "# wxfile.show_asdf_header()" + "# wxfile.header()" ] }, { @@ -118,7 +118,7 @@ "source": [ "### Inspecting the File content with pure Python\n", "\n", - "You can also utilize the `show_asdf_header` method to visualize the file content when using weldx in a pure Python script.\n", + "You can also utilize the `header` method to visualize the file content when using weldx in a pure Python script.\n", "This will print the human-readable part of the file that is stored in [YAML format](https://yaml.org/) directly to console.\n", "However, while the interactive output in a jupyter notebook is quite handy, the console output can get pretty large.\n", "This might be simply too much information if you just want to get a simple overview of the file content.\n", diff --git a/tutorials/GMAW_process.ipynb b/tutorials/GMAW_process.ipynb index e60ceb104..36dc97840 100644 --- a/tutorials/GMAW_process.ipynb +++ b/tutorials/GMAW_process.ipynb @@ -138,7 +138,7 @@ "outputs": [], "source": [ "file = weldx.WeldxFile(tree=tree, mode=\"rw\")\n", - "file.show_asdf_header()" + "file.header()" ] }, { diff --git a/tutorials/custom_metadata.ipynb b/tutorials/custom_metadata.ipynb index bc27f9277..70c10139f 100644 --- a/tutorials/custom_metadata.ipynb +++ b/tutorials/custom_metadata.ipynb @@ -70,7 +70,7 @@ "from weldx import WeldxFile\n", "\n", "file = WeldxFile(tree={\"sensor\": HKS_sensor}, mode=\"rw\")\n", - "file.show_asdf_header()" + "file.header()" ] }, { diff --git a/tutorials/groove_types_01.ipynb b/tutorials/groove_types_01.ipynb index ff42c8a50..e15d60a7f 100644 --- a/tutorials/groove_types_01.ipynb +++ b/tutorials/groove_types_01.ipynb @@ -200,7 +200,7 @@ "metadata": {}, "outputs": [], "source": [ - "file.show_asdf_header()" + "file.header()" ] }, { diff --git a/tutorials/measurement_example.ipynb b/tutorials/measurement_example.ipynb index 3ba2bfcb4..77822952b 100644 --- a/tutorials/measurement_example.ipynb +++ b/tutorials/measurement_example.ipynb @@ -498,7 +498,7 @@ }, "outputs": [], "source": [ - "file.show_asdf_header()" + "file.header()" ] }, { diff --git a/tutorials/quality_standards.ipynb b/tutorials/quality_standards.ipynb index e2d4bd14f..20d2b2674 100644 --- a/tutorials/quality_standards.ipynb +++ b/tutorials/quality_standards.ipynb @@ -616,7 +616,7 @@ }, "outputs": [], "source": [ - "file.show_asdf_header()" + "file.header()" ] }, { diff --git a/tutorials/welding_example_01_basics.ipynb b/tutorials/welding_example_01_basics.ipynb index adc89def8..f782003eb 100644 --- a/tutorials/welding_example_01_basics.ipynb +++ b/tutorials/welding_example_01_basics.ipynb @@ -561,7 +561,7 @@ "metadata": {}, "outputs": [], "source": [ - "file.show_asdf_header()" + "file.header()" ] } ], diff --git a/weldx/asdf/file.py b/weldx/asdf/file.py index 87bc9a412..1f92f1cd8 100644 --- a/weldx/asdf/file.py +++ b/weldx/asdf/file.py @@ -874,11 +874,6 @@ def write_to( fd.seek(0) return fd - @property - @deprecated(since="0.5.2", removed="0.6", message="Please do not use this anymore.") - def data(self): - return self._data - def header( self, use_widgets: bool = None, diff --git a/weldx/tests/asdf_tests/test_weldx_file.py b/weldx/tests/asdf_tests/test_weldx_file.py index 087b2177a..21acbb6bd 100644 --- a/weldx/tests/asdf_tests/test_weldx_file.py +++ b/weldx/tests/asdf_tests/test_weldx_file.py @@ -17,7 +17,7 @@ from weldx.asdf.util import get_schema_path, write_buffer from weldx.constants import META_ATTR from weldx.types import SupportsFileReadWrite -from weldx.util import WeldxDeprecationWarning, compare_nested +from weldx.util import compare_nested SINGLE_PASS_SCHEMA = "single_pass_weld-0.1.0" @@ -593,9 +593,6 @@ def test_cannot_update_del_protected_keys(self, protected_key): """Ensure we cannot manipulate protected keys.""" expected_match = "manipulate an ASDF internal structure" warning_type = UserWarning - # try to obtain key from underlying dict. - with pytest.raises(KeyError), pytest.warns(WeldxDeprecationWarning): - _ = self.fh.data[protected_key] with pytest.warns(warning_type, match=expected_match): self.fh.update({protected_key: None})