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

Feature implemented from feature request #82 (#83) #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

etcart
Copy link
Contributor

@etcart etcart commented Jul 5, 2023

This request implemented CMA feature request #82 (CMA output name changes for an array).

The current PR should only add the new feature and should not affect any other existing implementation.

It does introduce a tree structure for source->destination array mapping, which is documented in the detail in the source code, but please let me know if it's not straightforward to follow and I will be happy to have a walkthrough.

Notes:

Testing has been added and validated with #81.
There are 2 pylint warnings:
message_adapter/util.py:36:0: R0903: Too few public methods (1/2) (too-few-public-methods)
message_adapter/util.py:81:0: R0914: Too many local variables (20/15) (too-many-locals)
I am a little bit reluctant to adapt my code regardingly, and not sure we can ignore them or not, but please let me know if it causes issue for CICD.

Thanks!

* feat: initial commit from an ad-hoc fix

* feat: seperate list and single value assignment

* feat: assign_json_path_values method parameter changed

* feat: function parameter change

* feat: lint util.py

* feat: comments added

* fix: remove unused print

* feat: Collect array info from jspath

* fix: change condition when assign_json_path_values is invoked

* feat: assign_json_path_values further implemented

* feat: further implemented assign_json_path_value

* feat: assign_json_path_values further implemented

* feat: assign_json_path_values further implemented

* feat: assign_json_path_values cleaned

* feat: assign_json_path_values cleaned

* feat: assign_json_path_values cleaned

* feat: assign_json_path_values cleaned

* feat: more comments added

* feat: more comments added

* feat: more comments added

* fix: bug fix

* feat: Update implemented in assign_json_path_values

* feat: code cleaning

* feat: method parameter changes

* feat: black util.py

* feat: clean up Split source and destination jsonpath by their array components

* feat: clean up Split source and destination jsonpath by their array components

* feat: further code minor cleaning

* feat: further code minor cleaning

* feat: further code minor cleaning

* feat: further code cleaning

* feat: further code cleaning

* doc: method comments added

* fix: lint the code

* test: jsonpath_array test added

* fix: +jsonpath-ng upgraded to 1.5.3

* test: fix test cases for array mapping

* test: test case polished

* doc: comments polished

* doc: lint

---------

Co-authored-by: Hailiang Zhang <[email protected]>
Co-authored-by: Jonathan Kovarik <[email protected]>
Co-authored-by: etcart <[email protected]>
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