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

New tutorials #555

Merged
merged 25 commits into from
Dec 17, 2021
Merged

New tutorials #555

merged 25 commits into from
Dec 17, 2021

Conversation

vhirtham
Copy link
Collaborator

Changes

Adds a set of new tutorials as discussed here

Related Issues

Closes #400

Checks

  • remove single_pass_weld.wx
  • updated CHANGELOG.md
  • updated tests
  • updated doc/
  • update example/tutorial notebooks
  • update manifest file

@vhirtham vhirtham added the documentation Improvements or additions to documentation label Sep 23, 2021
@vhirtham
Copy link
Collaborator Author

I created this branch as a base branch for all the upcoming tutorials. I will make a separate PR for each tutorial targetting this branch so that we can discuss the tutorials individually.

@codecov
Copy link

codecov bot commented Sep 23, 2021

Codecov Report

Merging #555 (0b730a9) into master (463a73b) will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #555      +/-   ##
==========================================
+ Coverage   96.12%   96.16%   +0.03%     
==========================================
  Files          91       91              
  Lines        5941     5941              
==========================================
+ Hits         5711     5713       +2     
+ Misses        230      228       -2     
Impacted Files Coverage Δ
weldx/asdf/file.py 97.00% <0.00%> (+0.74%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 463a73b...0b730a9. Read the comment docs.

@vhirtham
Copy link
Collaborator Author

@CagtayFabry @marscher I converted the test file in this branch to 0.5.0 by simply loading the 0.4.0 based file from the last conference and writing it back to disc. Interestingly, I can't open the file in the notebook of the first tutorial (see PR #556 ). I get the error:

pint.errors.UndefinedUnitError: 'Δ' is not defined in the unit registry

To my understanding, this is probably caused by the pint short notations. But before I continue searching for the problem, can you (@marscher ) confirm that you get this error too and that it isn't just a wrong setup on my computer? You need to change the file extension in the corresponding notebook cell back to wx. I am currently using the "old" file to continue working on the tutorial.

@marscher
Copy link
Contributor

marscher commented Sep 23, 2021

I'm receiving the same error.

@marscher
Copy link
Contributor

marscher commented Sep 23, 2021

ipdb> input_string
'Δ°C'

note, that this string directly comes from the asdf serialization.

@CagtayFabry
Copy link
Member

interesting, the notation is created by pint so wondering why it cannot load it

in the meantime I suggest changing the serialization notation style for pint units back to 'long' format here

def to_yaml_tree(self, obj: pint.Unit, tag: str, ctx) -> str:
"""Convert to python dict."""
return f"{obj:~}" # use 'short' formatting for serialization

this should give the long notation again

return f"{obj:.}"

@vhirtham
Copy link
Collaborator Author

interesting, the notation is created by pint so wondering why it cannot load it

in the meantime I suggest changing the serialization notation style for pint units back to 'long' format here

def to_yaml_tree(self, obj: pint.Unit, tag: str, ctx) -> str:
"""Convert to python dict."""
return f"{obj:~}" # use 'short' formatting for serialization

this should give the long notation again

return f"{obj:.}"

I will try that for now. I couldn't quickly pinpoint the field that was causing that since the python stack was cut at some point. I haven't done any deeper research since then

@CagtayFabry
Copy link
Member

I have asked about handling this notation with pint here hgrecco/pint#1390

@vhirtham vhirtham marked this pull request as ready for review September 29, 2021 08:10
@github-actions
Copy link

github-actions bot commented Oct 13, 2021

Unit Test Results

       1 files  ±0         1 suites  ±0   1m 27s ⏱️ -9s
1 949 tests ±0  1 949 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 0b730a9. ± Comparison against base commit 463a73b.

♻️ This comment has been updated with latest results.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

marscher and others added 6 commits November 9, 2021 10:18
* [doc/conf] download single_pass_weld.weldx from iw repo

It checks the hash of the current master. Eventually we
should use a tagged version here to prevent hash missmatches
in the future.

* adopt url to tagged version

* logger name

* clean up

* rm single_pass_weld.wx

* revert nitpick ignore change.

* set tutorials dir relative to conf.py file location

* [conf] output file suffix set to .wx

* lint

Co-authored-by: Cagtay Fabry <43667554+CagtayFabry@users.noreply.github.com>
added tutorials/util.py  download single_pass_weld.weldx from iw repo func
@CagtayFabry
Copy link
Member

can you give a quick update on what is missing here @vhirtham ?

@vhirtham
Copy link
Collaborator Author

can you give a quick update on what is missing here @vhirtham ?

Nothing missing, we just didn't want to include it in the last release

Copy link
Member

@CagtayFabry CagtayFabry left a comment

Choose a reason for hiding this comment

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

👍

just need to update the changelog entry

@vhirtham vhirtham merged commit 463f949 into master Dec 17, 2021
@vhirtham vhirtham deleted the new_tutorials branch December 17, 2021 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use basic weldx file examples in documentation
3 participants