https://github.com/awslabs/workflow-data-structure-utilities
Utilities which assist in manipulating data structures in workflow systems
https://github.com/awslabs/workflow-data-structure-utilities
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.8%) to scientific vocabulary
Keywords
Repository
Utilities which assist in manipulating data structures in workflow systems
Basic Info
Statistics
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Workflow Data Structure Utilities
Getting started
This repo contains utilities which assist in manipulating data structures in workflow systems. To be used along other workflow system capabilities, these Lambdas augment low-friction configuration and allow for focusing on implementation details. Based on experience building hundreds of workflows, these are the most useful and commonly-needed functions. They are all pure Python with an average of 99% coverage:
| Function | Description | Sample Payload | Response |
|---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|------------------------|
| ensure-list | Takes an item which may be a list, and wraps it in a list if it is not. Otherwise, returned as-is; useful for Map operations over data with structures you can't control. | {"parameters": {"data": "a"}} | ["a"] |
| find-and-replace | Implements string substitution, using a needle, haystack, and replacement. | {"parameters": {"needle":"foobar", "haystack": "foo", "replacement": "-"}} | {"value": "-bar"} |
| merge-list-of-dicts | Takes a list of dictionaries (commonly, results from a Map or Parallel operation) and combines them into a single dictionary. | {"parameters": {"data": [{"a": "b"}, {"c": "d"}]}} | {"a": "b", "c": "d"} |
Testing
Once you have cloned this repository, you will need Coverage and pytest installed. You can then run the run_all_tests.sh script to have tests executed for you, or check Gitlab.
shell
pip install coverage pytest
./run_all_tests.sh
Usage
Simply copy the relevant functions into your project and use the Lambda build method of your choice. Being pure Python, most build/deploy methods should work out of the box.
Security
See CONTRIBUTING for more information.
License
This library is licensed under the MIT-0 License. See the LICENSE file.
Owner
- Name: Amazon Web Services - Labs
- Login: awslabs
- Kind: organization
- Location: Seattle, WA
- Website: http://amazon.com/aws/
- Repositories: 914
- Profile: https://github.com/awslabs
AWS Labs