feat: add finance revenue data product example#8
Open
Muhtasim-Munif-Fahim wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a second “passing” runnable example (finance revenue) to demonstrate the manifest model beyond the existing SaaS churn sample, and wires it into the template scaffolder and examples test suite.
Changes:
- Add
examples/pass/finance-revenuemanifests + synthetic CSV data and validate it in the examples tests. - Add a corresponding scaffoldable template under
src/dataproduct_kit/templates/finance_revenueand register it intemplates.py. - Update packaging/docs to include the new template files and list the new runnable example in the README.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_examples.py | Expands the “passing examples validate” test to include finance-revenue. |
| src/dataproduct_kit/templates/finance_revenue/semantic.yaml | Adds semantic model for the finance revenue template. |
| src/dataproduct_kit/templates/finance_revenue/policy.yaml | Adds policy manifest for the finance revenue template. |
| src/dataproduct_kit/templates/finance_revenue/dataproduct.yaml | Adds data product manifest (incl. freshness policy) for the finance revenue template. |
| src/dataproduct_kit/templates/finance_revenue/data/transactions.csv | Adds synthetic transaction CSV for the template scaffold. |
| src/dataproduct_kit/templates/finance_revenue/contract.yaml | Adds schema + quality checks for the finance revenue template dataset. |
| src/dataproduct_kit/templates.py | Registers finance-revenue as a scaffoldable template. |
| README.md | Mentions the new runnable passing example path. |
| pyproject.toml | Includes the new template directory in package-data. |
| examples/pass/finance-revenue/semantic.yaml | Adds semantic model for the runnable finance revenue example. |
| examples/pass/finance-revenue/policy.yaml | Adds policy manifest for the runnable finance revenue example. |
| examples/pass/finance-revenue/dataproduct.yaml | Adds data product manifest (incl. freshness policy) for the runnable example. |
| examples/pass/finance-revenue/data/transactions.csv | Adds synthetic transaction CSV for the runnable example. |
| examples/pass/finance-revenue/contract.yaml | Adds schema + quality checks for the runnable example dataset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+8
to
+11
| TEMPLATE_MAP = { | ||
| "saas-churn": "saas_churn", | ||
| "finance-revenue": "finance_revenue", | ||
| } |
Comment on lines
+1
to
+8
| metrics: | ||
| - name: net_revenue | ||
| label: Net Revenue | ||
| description: Sum of all transaction amounts in the reporting period. | ||
| dataset: transactions | ||
| expression: "sum(amount)" | ||
| grain: day | ||
| dimensions: [product_category, region] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5
Adds a finance revenue data product example demonstrating: