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

Update to open62541 1.4.6 #29

Merged
merged 13 commits into from
Oct 31, 2024
Merged

Update to open62541 1.4.6 #29

merged 13 commits into from
Oct 31, 2024

Conversation

thomvet
Copy link
Collaborator

@thomvet thomvet commented Jul 4, 2024

This PR will be an update to the current release branch of open62541, i.e., the 1.4 branch. The 1.4.0 release is buggy (json encoding of types was broken, 1.4.1 was a hotfix release to correct this), so I am skipping it. Going from 1.3.x to 1.4.1 is a breaking change. There is about twice the number of UA_... types in 1.4.1 compared to 1.4.0 and previous versions, 388 vs 227; hence the ordering of types is different and the wrapper looks different as well.

The generator has been revised and the current tests are passing, but there are a few things that I want to add in a 0.2.0 version (which it needs to be, because of the breaking changes introduced in open62541 v1.4.1 vs. 1.3.x).

Namely, open62541 v1.4,1 introduces rational numbers; I want to provide some infrastructure for these in this PR as well (same as done for the complex number types). These will not be implemented as full Julia number types (that would require overloading all operators like +,-, etc.), but Julia Rational numbers will be converted to the respective UA types when writing to a server (and vice-versa) when reading. This was already how complex numbers were handled by the library, but I'll need to add some documentation about this as well.

The following items need to be done.

  • Add functions to helper_functions.jl
  • Add Rational(x::Union{UA_RationalNumber, UA_UnsignedRationalNumber} to types.jl
  • Add attribute generation for UA_RationalNumber and UA_UnsignedRationalNumber (attribute_generation.jl)
  • Add rational types to dispatch in highlevel_types.jl
  • add tests in add_change_var_scalar.jl
  • add tests in add_change_var_array.jl
  • add tests in highlevel_types (JUA_Variant)

Documentation:

  • Add UA_xxx_equal docstrings
  • Documentation: explain better how rational and complex numbers are handled by the library.

Copy link

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 72.41379% with 40 lines in your changes missing coverage. Please review.

Project coverage is 40.89%. Comparing base (45ba588) to head (99865e0).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
src/client.jl 47.36% 20 Missing ⚠️
src/highlevel_types.jl 71.79% 11 Missing ⚠️
src/attribute_generation.jl 89.74% 4 Missing ⚠️
src/exceptions.jl 25.00% 3 Missing ⚠️
src/types.jl 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
- Coverage   44.32%   40.89%   -3.43%     
==========================================
  Files          13       13              
  Lines        3912     4377     +465     
==========================================
+ Hits         1734     1790      +56     
- Misses       2178     2587     +409     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thomvet
Copy link
Collaborator Author

thomvet commented Jul 8, 2024

Ok, some progress here. Not much left to be done to have this working; I'll probably manage to finalize this tonight :)

@thomvet thomvet mentioned this pull request Jul 11, 2024
@thomvet
Copy link
Collaborator Author

thomvet commented Jul 11, 2024

@martinkosch: This would be ready for a review. The only thing I would like to add are a few examples to address questions in #28. That should be a +/- straightforward translation of some of the tests that already exist. Hope to get it done soon!

@thomvet thomvet requested a review from martinkosch July 11, 2024 17:37
@thomvet thomvet self-assigned this Aug 5, 2024
Copy link
Owner

@martinkosch martinkosch left a comment

Choose a reason for hiding this comment

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

Sorry, I completely overlooked your request!
It looks all good to me. Nice to see that the version update is working :)

@thomvet
Copy link
Collaborator Author

thomvet commented Aug 27, 2024

Thanks for the approval and no worries. There was also the holiday period in between :). I am hoping that I can wrap up the documentation improvements mentioned above very soon (end of week at the latest).

I'll then proceed to merge if things are still working as expected.

@thomvet thomvet changed the title [WIP] Update to open62541 1.4.1 Update to open62541 1.4.6 Oct 31, 2024
@thomvet
Copy link
Collaborator Author

thomvet commented Oct 31, 2024

All good now! Also updated the jll wrapper to open62541 1.4.6 (newest version available).

@thomvet thomvet merged commit 4861778 into main Oct 31, 2024
8 of 9 checks passed
@thomvet thomvet deleted the prepare-1.4.1 branch October 31, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants