Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.6.0 #744

Merged
merged 10 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,25 @@
###############

********************
0.6.0 (unreleased)
0.6.0 (29.04.2022)
********************

marscher marked this conversation as resolved.
Show resolved Hide resolved
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 <https://weldx.readthedocs.io/en/v0.6.0/tutorials/generic_series.html>`__ .

Copy link
Collaborator

@vhirtham vhirtham Apr 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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](https://weldx.readthedocs.io/en/v0.6.0/tutorials/generic_series.html)

Since somebody already merged the suggestion while I was editing it for additional content 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

safer to edit directly in the file I guess 😉

added
=====

- `DynamicShapeSegment` [:pull:`713`]
- `DynamicShapeSegment` [:pull:`713`]

- `SpatialSeries` and `DynamicTraceSegment` [:pull:`699`]

Expand All @@ -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`
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions tutorials/01_01_introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -109,7 +109,7 @@
},
"outputs": [],
"source": [
"# wxfile.show_asdf_header()"
"# wxfile.header()"
]
},
{
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/GMAW_process.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"outputs": [],
"source": [
"file = weldx.WeldxFile(tree=tree, mode=\"rw\")\n",
"file.show_asdf_header()"
"file.header()"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorials/custom_metadata.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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()"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorials/groove_types_01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"metadata": {},
"outputs": [],
"source": [
"file.show_asdf_header()"
"file.header()"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorials/measurement_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
},
"outputs": [],
"source": [
"file.show_asdf_header()"
"file.header()"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorials/quality_standards.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@
},
"outputs": [],
"source": [
"file.show_asdf_header()"
"file.header()"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorials/welding_example_01_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@
"metadata": {},
"outputs": [],
"source": [
"file.show_asdf_header()"
"file.header()"
]
}
],
Expand Down
5 changes: 0 additions & 5 deletions weldx/asdf/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions weldx/tests/asdf_tests/test_weldx_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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]
Comment on lines -596 to -598
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be deleted now? @marscher

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason the first line below "changes" in the RTD version of the changelog is shown in bold letters:

https://weldx--744.org.readthedocs.build/en/744/changelog_link.html

Checked the changelog file and the only difference to the other lines that I could find is that the line in question has only a single space between the - and the text while all others have 2 spaces. I am not that familiar with RST, but I guess that's the problem.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CagtayFabry you were absolutely right about this deletion.

@vhirtham RST is sometimes also very picky with missing line breaks. But this should not cause usage of bold setting...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find @vhirtham , let's see if it is fixed with the spaces (otherwise we can reformat later)

Copy link
Collaborator

@vhirtham vhirtham Apr 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marscher argh... this should have been an extra comment ... ooops. Well let's see what fixes it


with pytest.warns(warning_type, match=expected_match):
self.fh.update({protected_key: None})
Expand Down