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

Zyp: Improve jq-based Moksha transformations and general documentation #50

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

amotl
Copy link
Member

@amotl amotl commented Sep 19, 2024

About

Zyp/Moksha improvements and documentation enhancements for better guidance.

Preview: https://commons-codec--50.org.readthedocs.build/zyp/

Details

Improvements for Zyp/Moksha/jq

A few special Python-based treatments have been translated to jq-based Moksha transformations again.
Those operations can be performed more efficiently on the whole collection at once when using Moksha/jq.

  • Flattening nested lists
  • Pruning lists of objects
  • Converting to objects, lists, and strings

To support those operations, a jqlang support library was added, including a few helper functions written in jqlang itself. The helper functions are, as of now:

  • to_array
  • to_object
  • is_array_of_objects
  • del_array_of_objects
  • prune_array_of_objects
  • prune_null

@cla-bot cla-bot bot added the cla-signed label Sep 19, 2024
@amotl amotl changed the title Zyp: Improve jq-based MokshaTransformations and documentation Zyp: Improve jq-based Moksha transformations and general documentation Sep 19, 2024
@amotl amotl marked this pull request as ready for review September 19, 2024 12:23
A few operations can be performed more efficiently on the whole
collection at once when using Moksha/jq.

- Flattening nested lists
- Pruning lists of objects
- Converting to objects, lists, and strings

To support those operations, a jq support library was added, including
a few helper functions written in jqlang itself. The helper functions
are:

- to_array
- to_object
- is_array_of_objects
- del_array_of_objects
- prune_array_of_objects
- prune_null
@amotl amotl merged commit 3a1c82b into main Sep 19, 2024
23 checks passed
@amotl amotl deleted the zyp-improve-treatments branch September 19, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant