{"id":19228225,"url":"https://github.com/capitec/dsp-decision-engine","last_synced_at":"2025-04-06T11:08:30.008Z","repository":{"id":253157837,"uuid":"830483496","full_name":"capitec/dsp-decision-engine","owner":"capitec","description":"Decision Engine and Visualization Framework","archived":false,"fork":false,"pushed_at":"2025-01-22T14:41:05.000Z","size":1094,"stargazers_count":77,"open_issues_count":3,"forks_count":25,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-30T09:09:46.671Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/capitec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-18T11:09:53.000Z","updated_at":"2025-03-26T22:25:22.000Z","dependencies_parsed_at":"2024-09-05T14:54:18.876Z","dependency_job_id":"99b9ffc0-572f-4ca0-adaa-c3a9226ec662","html_url":"https://github.com/capitec/dsp-decision-engine","commit_stats":null,"previous_names":["capitec/dsp-decision-engine"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capitec%2Fdsp-decision-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capitec%2Fdsp-decision-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capitec%2Fdsp-decision-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capitec%2Fdsp-decision-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capitec","download_url":"https://codeload.github.com/capitec/dsp-decision-engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247471519,"owners_count":20944158,"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":[],"created_at":"2024-11-09T15:27:13.435Z","updated_at":"2025-04-06T11:08:29.980Z","avatar_url":"https://github.com/capitec.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DSP Decision Engine\n\n[![Python Version](https://img.shields.io/badge/python-%3E%3D3.8-blue.svg)](https://www.python.org/downloads/)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n\n**SpockFlow** is a Python framework designed to create standalone micro-services that enrich data with actionable outputs. It supports both batch and live inference modes, and extends existing frameworks to simplify data flows, including policy rules and scoring. Leveraging Hamilton for traceability, SpockFlow provides a powerful, modular approach for data enrichment and model deployment.\n\n## Table of Contents\n\n- [Introduction](docs/intro.md)\n- [Installation](docs/getting_started/install.md)\n- [Concepts](docs/concepts/index.md)\n- [Usage Examples](#usage-examples)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction\n\nSpockFlow is built to be extensible and modular, allowing the reuse of pipelines and configurations across multiple data flows. Its emphasis on runtime traceability and explainability is empowered by Hamilton, which helps track and visualize data lineage and identify process steps leading to specific outcomes.\n\n![Example Pipeline](./docs/_static/getting-started/example_pipeline.drawio.svg)\n\nFor a more detailed introduction, see [Introduction](docs/main.rst).\n\n## Installation\n\nTo get started with SpockFlow, you need to install the required dependencies. Follow the instructions in the [Installation Guide](docs/getting_started/install.md) to set up your environment.\n\n```bash\npip install spockflow[all]\n```\n\n## Concepts\n\nExplore the foundational principles and components of SpockFlow in the [Concepts](docs/concepts/index.md) section. This guide covers:\n\n- **Decision Trees**: Automate decision-making processes based on defined conditions.\n- **Decision Tables**: Map input values to outputs based on conditions.\n- **Score Cards**: Assign scores to entities based on parameters.\n- **API Customization**: Customize and extend SpockFlow functionalities.\n\n## Usage Examples\n\nHere are some examples of how to use SpockFlow:\n\n### Decision Trees\n\nCreate and use decision trees in SpockFlow:\n\n```python\nfrom spockflow.components.tree import Tree, Action\nfrom spockflow.core import initialize_spock_module\nimport pandas as pd\nfrom typing_extensions import TypedDict\n\nclass Reject(TypedDict):\n    code: int\n    description: str\n\nRejectAction = Action[Reject]\n\n# Initialize Tree\ntree = Tree()\n\n# Define conditions and actions\n@tree.condition(output=RejectAction(code=102, description=\"My first condition\"))\ndef first_condition(d: pd.Series, e: pd.Series, f: pd.Series) -\u003e pd.Series:\n    return (d \u003e 5) \u0026 (e \u003e 5) \u0026 (f \u003e 5)\n\ntree.visualize(get_value_name=lambda x: x[\"description\"][0])\n```\n\nFor more details and advanced usage, check out the [Concepts](docs/concepts/index.md) section.\n\n## Contributing\n\nWe welcome contributions to SpockFlow! Please refer to our [Contributing Guide](CONTRIBUTING.md) for information on how to contribute.\n\n- **Fork the repository** and create a branch from `develop`.\n- **Install dependencies** using `pip install -r requirements/all.txt`.\n- **Run tests** with `pytest` to ensure everything is working.\n- **Submit a Pull Request** with a clear description of your changes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\nThank you for your interest in SpockFlow! We look forward to your contributions and feedback.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapitec%2Fdsp-decision-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapitec%2Fdsp-decision-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapitec%2Fdsp-decision-engine/lists"}