Skip to content

BE-798: Configurable timeframe for generated SAP data - #163

Open
thehabbos007 wants to merge 4 commits into
mainfrom
asa/sap-mock-data-time
Open

thehabbos007 wants to merge 4 commits into
mainfrom
asa/sap-mock-data-time

Conversation

@thehabbos007

@thehabbos007 thehabbos007 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

It's quite a large diff, i suggest looking only at the commit Configurable timeframe for generated data to get rid of noise from running ruff format

  • Adds timeframe start/end date or integer duration_days
  • Scales order counts to the timeframe unless explicitly set
  • Generates only the requested period, so shorter runs do less work

@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
petrinaut-gaios Error Error Sep 14, 2026 1:15pm UTC
petrinaut-hazel Ready Ready Preview Sep 14, 2026 1:15pm UTC

Request Review

@cursor

cursor Bot commented Sep 14, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Introduces a large alternate generation path for all transactional data and changes how scenarios apply when a timeframe is configured, which could shift dataset shape and integrity compared to the legacy flow.

Overview
Adds a Timeframe on GenerationConfig (start plus end or duration_days) so generation can target a bounded calendar window. The CLI, local/Databricks notebooks, and README expose the same options (--start-date, --end-date, --duration-days).

When a timeframe is set, generate_dataset still builds master data, then runs a new scheduled, event-queue transaction engine (scheduled.generate) instead of the legacy bulk transactions.generate. Order volume defaults scale with timeframe.days / 365 unless num_orders is explicit; master-data timestamps anchor to the day before the window. Scenarios are woven into the schedule (ScenarioSchedule) rather than the separate post-hoc injection path used without a timeframe. A temporal consistency check fails the run if generated dates fall outside the window.

The diff also includes Ruff formatting and lint cleanups across Databricks pipeline notebooks (imports, bare except, f-strings without placeholders, %pip magic) and minor notebook/metadata tweaks—no change to those pipelines’ business logic beyond style.

Reviewed by Cursor Bugbot for commit 5da7e9b. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 22ae236. Configure here.

Comment thread libs/sap-mock-data/src/sap_mock_data/generation/scheduled.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants