{"id":26716515,"url":"https://github.com/giorgiosavastano/process","last_synced_at":"2025-10-05T10:10:01.305Z","repository":{"id":58558695,"uuid":"532252078","full_name":"giorgiosavastano/process","owner":"giorgiosavastano","description":"processing-chain provides a convenient way to seamlessly set up processing chains for large amounts of data.","archived":false,"fork":false,"pushed_at":"2022-12-10T22:02:06.000Z","size":36,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T12:25:26.385Z","etag":null,"topics":["big-data","data","data-science","parallel","parallel-computing","process","processing","processing-chain","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giorgiosavastano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-03T12:21:21.000Z","updated_at":"2022-12-15T00:38:00.000Z","dependencies_parsed_at":"2023-01-26T12:00:49.461Z","dependency_job_id":null,"html_url":"https://github.com/giorgiosavastano/process","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giorgiosavastano%2Fprocess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giorgiosavastano%2Fprocess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giorgiosavastano%2Fprocess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giorgiosavastano%2Fprocess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giorgiosavastano","download_url":"https://codeload.github.com/giorgiosavastano/process/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245870754,"owners_count":20686083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["big-data","data","data-science","parallel","parallel-computing","process","processing","processing-chain","rust"],"created_at":"2025-03-27T15:28:10.207Z","updated_at":"2025-10-05T10:09:56.260Z","avatar_url":"https://github.com/giorgiosavastano.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Crates.io](https://img.shields.io/crates/d/processing-chain?style=for-the-badge)\n![GitHub](https://img.shields.io/github/license/giorgiosavastano/process?style=for-the-badge)\n![docs.rs](https://img.shields.io/docsrs/processing_chain/latest?style=for-the-badge)\n\n# processing-chain\n\n`processing-chain` provides a convenient way to seamlessly set up processing\nchains for large amounts of data.\n\nPlease read the [`API documentation on docs.rs`](https://docs.rs/processing_chain/latest/processing_chain/)\nor take a look at the [`examples`](https://github.com/giorgiosavastano/process/tree/main/examples).\n\n`processing-chain` is based on the concept of Item which is an abstraction that is used to spawn all the processes in parallel. All the user needs to do is define:\n\n- The Items to be processed\n- The function that processes a single Item\n\n`processing-chain` will take care of spawning the process across all Items via parallelization.\nThe user can also provide some extra processing configuration information (e.g., overwrite).\n\n## Highlights\n\n- Set-up generic data processing chains\n\n## Define the `Items`\n\nUsing a JSON file\n```json\n[\n    {\n        \"name\": \"item_1\",\n        \"input_item_paths\": [\"test_1.npy\", \"test_2.npy\", \"test_2.npy\"],\n        \"output_item_paths\": [\"output_1.nc\"]\n    },\n    {\n        \"name\": \"item_2\",\n        \"input_item_paths\": [\"test_1.npy\", \"test_2.npy\"],\n        \"output_item_paths\": [\"output_2.nc\"]\n    },\n    {\n        \"name\": \"item_3\",\n        \"input_item_paths\": [\"test_6.npy\", \"test_7.npy\", \"test_8.npy\"],\n        \"output_item_paths\": [\"output_3.nc\"]\n    }\n]\n```\n\n## Write the `_process_item` function\n\nIn rust:\n```rust\nfn _process_item(item: \u0026Item) -\u003e Result\u003cbool\u003e {\n    // define how to process a single item\n    println!(\n        \"Processing {} {:?} -\u003e {:?}\",\n        item.name, item.input_item_path, item.output_item_path\n    );\n    // ...\n\n    Ok(true)\n}\n```\nIf your function is written in Python and you don't feel like converting it to Rust (yet), you could use the [inline-python](https://crates.io/crates/inline-python) crate.\n```rust\nuse inline_python::python;\n\nfn _process_item(item: \u0026Item) -\u003e Result\u003cbool\u003e {\n    // define how to process a single item\n    python! {\n        print(\"Processing {} {} -\u003e {}\".format('item.name, item.input_item_path, item.output_item_path))\n\t};\n    // ...\n\n    Ok(true)\n}\n```\nSome examples can be found [`here`](https://github.com/giorgiosavastano/process/blob/main/examples).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiorgiosavastano%2Fprocess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiorgiosavastano%2Fprocess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiorgiosavastano%2Fprocess/lists"}