Skip to content

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 force-pushed the zyp-improve-treatments branch from 81227a0 to 4e219d4 Compare September 19, 2024 12:21
@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 force-pushed the zyp-improve-treatments branch from 4e219d4 to ecc61de Compare September 19, 2024 12:55
@amotl amotl merged commit 3a1c82b into main Sep 19, 2024
21 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.

2 participants