Skip to content

Commit d5eccd2

Browse files
authored
Merge pull request #9 from microsoft/py-reorg
refactor: PY and doc reorganization
2 parents cc45f62 + 670df12 commit d5eccd2

15 files changed

Lines changed: 54 additions & 44 deletions

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The dev container includes:
9393
3. **Formatting**: Code is auto-formatted with Black on save
9494
4. **Security Scanning**: Use `bandit` to scan for security issues
9595
5. **Deployment**: Use `azd up` to deploy to Azure
96-
6. **Event Simulation**: Use `python infra/scripts/event_simulator.py` to generate real-time telemetry data
96+
6. **Event Simulation**: Use `python src/simulator/event_simulator.py` to generate real-time telemetry data
9797
7. **Data Ingestion**: Use `python infra/scripts/fabric/fabric_data_ingester.py` for batch data operations
9898
8. **Notebooks**: Use `jupyter lab` for interactive development
9999

docs/DemonstratorGuide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ When you open one of the emails, you will see something similar to below:
4545

4646
## Step 5. Demonstrate the Fabric Data Agent
4747

48-
Please follow the [Fabric Data Agent Guide](./FabricDataAgentGuide.md) to understand how the Fabric Data Agent is created and set up. If it is not already set up, you can follow the instructions to create and configure a new Fabric Data Agent in minutes. After that, you can ask any questions you'd like the agent to answer. For starters, you can use the [sample questions and answers](../infra/data/fabric_data_agent/sample_test_questions.md).
48+
Please follow the [Fabric Data Agent Guide](./FabricDataAgentGuide.md) to understand how the Fabric Data Agent is created and set up. If it is not already set up, you can follow the instructions to create and configure a new Fabric Data Agent in minutes. After that, you can ask any questions you'd like the agent to answer. For starters, you can use the [sample questions and answers](./fabric_data_agent/sample_test_questions.md).
4949

5050
In the Fabric workspace, find the Fabric Data Agent that is already set up. You will be able to chat with the agent right away. Below is the user interface you can expect:
5151

docs/EventSimulatorGuide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export PRODUCTS_CSV_PATH="../data/products.csv" # Path to products file
3333
### 3. Run the Simulator
3434

3535
```bash
36-
cd infra/scripts
36+
cd src/simulator
3737
```
3838

3939
```bash
@@ -56,8 +56,8 @@ python event_simulator.py --assets-csv /path/to/assets.csv --products-csv /path/
5656
|--------|-------------|---------|
5757
| `--interval` | Seconds between events per asset | 5.0 |
5858
| `--max-runtime` | Maximum runtime in seconds | Unlimited |
59-
| `--assets-csv` | Path to assets.csv file | ../data/assets.csv |
60-
| `--products-csv` | Path to products.csv file | ../data/products.csv |
59+
| `--assets-csv` | Path to assets.csv file | infra/data/assets.csv |
60+
| `--products-csv` | Path to products.csv file | infra/data/products.csv |
6161

6262
## Interactive Runtime Controls
6363

docs/FabricDataAgentGuide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ This folder contains essential configuration files for setting up your Fabric Da
1212

1313
### Core Setup Files
1414

15-
**[Agent Instructions - Master Prompt](../infra/data/fabric_data_agent/agent_instructions.md)**
15+
**[Agent Instructions - Master Prompt](./fabric_data_agent/agent_instructions.md)**
1616
Contains the primary instructions and behavior guidelines for your Fabric Data Agent. This file establishes the agent's role, scope, and response patterns.
1717

18-
**[Data Source Instructions](../infra/data/fabric_data_agent/data_source_instructions.md)**
18+
**[Data Source Instructions](./fabric_data_agent/data_source_instructions.md)**
1919
Provides detailed information about your data structure, table relationships, and query patterns. This helps the agent understand your data and deliver more accurate, efficient responses.
2020

21-
**[Example Queries](../infra/data/fabric_data_agent/example_queries.md)**
21+
**[Example Queries](./fabric_data_agent/example_queries.md)**
2222
Training pairs that map business questions to proven KQL queries. These examples help your data agent learn optimal response patterns for common manufacturing scenarios.
2323

2424
### Testing Files
2525

26-
**[Test Sample Questions](../infra/data/fabric_data_agent/sample_test_questions.md)**
26+
**[Test Sample Questions](./fabric_data_agent/sample_test_questions.md)**
2727
A collection of sample questions you can use to test your agent's performance and evaluate response quality. Ideal for sharing with your testing team to jumpstart validation efforts.
2828

2929
## 💡 Customization Tips
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

infra/scripts/fabric/fabric_database.py

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
from azure.identity import DefaultAzureCredential
2828
from azure.kusto.data import KustoClient, KustoConnectionStringBuilder, ClientRequestProperties
2929
from azure.kusto.data.exceptions import KustoServiceError
30-
from event import Event
31-
from asset import Asset
32-
3330

3431
def create_kusto_client(cluster_uri) -> KustoClient:
3532
"""
@@ -189,8 +186,16 @@ def get_table_schemas():
189186
LocationId: int,
190187
PlantType: string
191188
)""",
192-
193-
"assets": Asset.get_table_schema(),
189+
190+
# NOTE: schema here matches against entity Asset class in src/entities/asset.py
191+
"assets": """(
192+
Id: string,
193+
Name: string,
194+
SiteId: int,
195+
Type: string,
196+
SerialNumber: string,
197+
MaintenanceStatus: string
198+
)""",
194199

195200
"products": """(
196201
Id: string,
@@ -207,7 +212,19 @@ def get_table_schemas():
207212
IsoCurrencyCode: string
208213
)""",
209214

210-
"events": Event.get_table_schema()
215+
# NOTE: schema here matches against entity Event class in src/entities/event.py
216+
"events": """(
217+
Id: string,
218+
AssetId: string,
219+
ProductId: string,
220+
Timestamp: datetime,
221+
BatchId: string,
222+
Vibration: real,
223+
Temperature: real,
224+
Humidity: real,
225+
Speed: real,
226+
DefectProbability: real
227+
)"""
211228
}
212229

213230

0 commit comments

Comments
 (0)