Skip to content

Commit df78236

Browse files
committed
update developer guide
1 parent a0198af commit df78236

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

docs/data_developer_guide.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,21 +168,24 @@ load_schema = pa.DataFrameSchema({
168168
"category": pa.Column(str)
169169
})
170170

171-
# Add synthetic data generation for testing
172-
def raw_synthetic_data(n_rows: int = 100) -> pd.DataFrame:
173-
return pd.DataFrame({
171+
# Add mock data generation for testing
172+
# prefix with 'extract' or 'load'
173+
def extract_mock_data(output = "pandas", size = 10) -> pd.DataFrame|pl.DataFrame:
174+
data = {
174175
"date": pd.date_range(
175176
start="2023-01-01",
176177
periods=n_rows,
177178
tz='UTC'
178179
),
179180
"value": np.random.uniform(1, 100, n_rows),
180181
"category": np.random.choice(['A', 'B', 'C'], n_rows)
181-
})
182+
}
183+
df = pd.DataFrame(data)
184+
return df if output == "pandas" or output == "pd" else pl.from_pandas(df)
182185

183186
# Validate synthetic data matches schema
184187
if __name__ == "__main__":
185-
test_df = generate_synthetic_data()
188+
test_df = extract_mock_data()
186189
extract_schema.validate(test_df)
187190
```
188191

0 commit comments

Comments
 (0)