Grob

Latest version: v0.2.1

Safety actively analyzes 625140 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.2.1

- New syntax for declaring flags `{placeholder:flags}` instead of `{placeholder!flags}` (closer to native Python f-string syntax, and won't conflict with Bash history expansion)
- New documentation and examples

0.2.0

New features:

- new CLI
- support optional tags
- support multiple tags (i.e. multiple files with the same tag in a given group)
- support for custom key formatter (either f-strings or callable)
- better control over output stream
- more control on what happens when a tag is missing in a group: either keep the group as-is, remove the group or raise an error
- full support for callable parsers (i.e. callable `Path -> str` that can extract a string key for each file)
- full support for multi-part callable parsers (i.e. callable `Path -> dict[str, str]` that can extract a multi-part key for each file. Each part has a name and can be joined with other multi-part key, allowing for more powerful joining capabilities – see below)
- tags can be distributed, i.e. if a single file can be associated to multiple groups[^1]
- better parser syntax: make a placeholder greedy with `!g`, restrict it to alphanumeric with `!a` or digits to `!d`, set a length or a range of length with `1`, `2:`, `:3`, `4` (replace those numbers by any other numbers); those can be combined, e.g. `!d3:8` will match any number with 3 to 8 digits)
- add formatters: JSONL, CSV, TSV
- add formatting options: with/without keys, with/without squeezing, relative/absolute paths

Other:

- first external contribution :tada: thanks & welcome Pierre-Am!

Under the hood:

- CLI argument parsing has been completely re-written in vanilla Python with `argparse`: Click is gone, and `grob` is now 100% dependency-free!
- fully rewritten codebase with better organization
- CI is finally green and we may have a documentation soon
- stronger test suite (although there's room for improvement)

What's coming:

- Documentation (so that people can finally _use_ it)
- Documentation++ (so that people can like _really_ use it and be 10× more efficient in their data workflows)
- QA campaign
- Read group specs from files
- More efficient directory walking
- Find real-world examples
- Find a world-class sponsor (let's say somewhere between Linus Torvalds and Guillaume Rozier)
- Support for remote storage?
- Buy 5k stars from bot farms
- Find a motto ("_stop globbing, start grobbing_" or "_glob them, group them, grab them_" or "_veni, vidi, grobi_")
- Rewrite the core logic in Couleuvre™

[^1]: only works for pattern-based parsers and callable multi-part parsers: distributing is basically an _outer join_, and key parts are the _columns_ we're joining on

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.