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

SpatialSeries and DynamicTraceSegment #699

Merged
merged 76 commits into from
Feb 28, 2022

Conversation

vhirtham
Copy link
Collaborator

@vhirtham vhirtham commented Feb 8, 2022

Changes

Describe changes in this PR

Related Issues

Closes #691

Checks

  • updated CHANGELOG.rst
  • updated tests
  • updated doc/
  • update example/tutorial notebooks
  • update manifest file

@vhirtham vhirtham added geometry core weldx core classes and functions labels Feb 8, 2022
@vhirtham vhirtham self-assigned this Feb 8, 2022
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions
Copy link

github-actions bot commented Feb 8, 2022

Unit Test Results

       1 files  ±0         1 suites  ±0   1m 52s ⏱️ +12s
2 156 tests ±0  2 156 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 7c3123c. ± Comparison against base commit 71dd04d.

♻️ This comment has been updated with latest results.

@CagtayFabry
Copy link
Member

This looks really cool 👍 🚀 ! (and super fun to play with 😎 )

I know it's not final but I'll add some quick comments as notes in the code

weldx/geometry.py Outdated Show resolved Hide resolved
weldx/geometry.py Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated
@@ -9,7 +9,7 @@
added
=====

- `SpatialSeries` and `DynamicTraceSegment` [:pull:`699`]
- ``SpatialSeries`` and ``DynamicTraceSegment`` [:pull:`699`]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems like sphink does not find those two. I already added them to the __init__.py. Is there another place I forgot?

Copy link
Member

Choose a reason for hiding this comment

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

have you tried ~weldx.core.SpatialSeries ?
Maybe it works if you add it to the user API documentation in weldx/__init__.py

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I used the previous method already in the docstrings and it worked. Was just wondering why it is necessary for some of our classes while others don't need it. Your second suggestion at least worked for the changelog.

Copy link
Member

Choose a reason for hiding this comment

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

I think because of the user API some elements (our main classes) appear two times in the sphinx tree, e.g. once as weldx.time.Time and once as weldx.Time (user API)
In these cases the references have to be explicit or sphinx might throw an error (because it doesn't know which page to link to). But that should be mostly on the API documentation site

For the changelog I am nur sure what the sphinx context is for resolving these (or if there is any difference)

weldx/core.py Outdated Show resolved Hide resolved
weldx/geometry.py Outdated Show resolved Hide resolved

self._length = self.get_section_length(self._max_s)

def _get_component_derivative_squared(self, i: int):
Copy link
Member

Choose a reason for hiding this comment

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

can you add the return value for the type hint here @vhirtham
Is it a sympy expression?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will try it. When I printed the type, I got a derived type. I have to figure out the base type

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 some minor details, I have also modified the GenericSeries evaluation to work with correctly assigned array coordinates

We could probably change the SeriesParameter to always assign coordinates in SeriesParameter.data_array or are there places where we do not want that?

@vhirtham
Copy link
Collaborator Author

vhirtham commented Feb 28, 2022

great,... add a type hint,... get 9 unrelated warnings in the doc-build 😕 👎

Co-authored-by: Cagtay Fabry <43667554+CagtayFabry@users.noreply.github.com>
@CagtayFabry
Copy link
Member

great,... add a type hint,... get 9 unrelated warnings in the doc-build 😕 👎

if unrelated just ignore and merge
We can just exclude matplotlib from the intersphinx mapping in conf.py since it is not really essential to weldx and the doc structure seems to cause a lot of issues

@vhirtham
Copy link
Collaborator Author

Since we added a variable for the name of the dimension used by the SpatialSeries, I also used it in the DynamicTraceSegment. In case we do want to rename it for some reason, there shouldn't be any hardcoded dimension names in the segment class. I also renamed all the internal variables and parameters to be more general. @CagtayFabry Have another look at the changes and feel free to merge if everything is okay.

weldx/geometry.py Outdated Show resolved Hide resolved
@vhirtham vhirtham merged commit 2a3ab44 into BAMWelDX:master Feb 28, 2022
@vhirtham vhirtham deleted the 691_spatial_series branch February 28, 2022 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core weldx core classes and functions geometry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SpatialSeries class
3 participants