Skip to content

Conversation

@jarsarasty
Copy link

@jarsarasty jarsarasty commented Oct 16, 2025

This PR integrates the KPI calculator functionality into the simulator-worker using the published PyPI package instead of GitHub artifacts.

Changes

Dependencies:

  • Added kpi-calculator>=0.1.1 from PyPI to pyproject.toml
  • Updated requirements.txt and dev-requirements.txt with kpi-calculator 0.1.1
  • Updated urllib3 from 2.5.0 to 2.6.3 to satisfy kpi-calculator dependency requirements

KPI Integration:

  • Integrated KPI calculation into the simulation workflow in simulator_worker.py
  • Added utility functions in utils.py for converting simulator output format to KPI calculator format
  • KPI calculation runs after simulation completes and adds KPI results to the output ESDL
  • Graceful error handling: simulation continues and returns results even if KPI calculation fails

Testing:

  • Added test_kpi_integration.py with integration tests
  • Updated pytest configuration to include KPI integration tests

@jarsarasty jarsarasty marked this pull request as draft October 16, 2025 08:51
@jarsarasty jarsarasty marked this pull request as ready for review October 16, 2025 11:25
@jarsarasty jarsarasty force-pushed the feature/kpi-calculator-integration branch 3 times, most recently from a713153 to 685a0eb Compare January 8, 2026 12:41
@jarsarasty jarsarasty marked this pull request as draft January 9, 2026 09:16
@jarsarasty jarsarasty force-pushed the feature/kpi-calculator-integration branch 9 times, most recently from 5617f0c to 2122d49 Compare January 15, 2026 10:57
@jarsarasty jarsarasty requested a review from Copilot January 15, 2026 10:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR integrates KPI calculation functionality into the simulator-worker by adding the kpi-calculator package from PyPI. The integration adds KPI computation to the simulation workflow while maintaining graceful error handling to ensure simulations can complete even if KPI calculation fails.

Changes:

  • Added kpi-calculator>=0.1.1 dependency and updated urllib3 to 2.6.3
  • Integrated KPI calculation into simulator_worker.py after simulation completion
  • Added convert_simulator_to_kpi_format utility function to transform simulator output format to KPI calculator format
  • Added comprehensive integration tests for KPI functionality

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyproject.toml Added kpi-calculator dependency and updated pytest configuration to include new test file
dev-requirements.txt Updated urllib3 dependency version
src/simulator_worker/simulator_worker.py Integrated KPI calculation workflow with error handling
src/simulator_worker/utils.py Added utility function to convert simulator DataFrame format to KPI calculator format
unit_test/test_kpi_integration.py Added comprehensive integration tests for KPI functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jarsarasty jarsarasty force-pushed the feature/kpi-calculator-integration branch from 2122d49 to 7ae989c Compare January 15, 2026 14:56
@jarsarasty jarsarasty marked this pull request as ready for review January 15, 2026 15:01
@jarsarasty jarsarasty marked this pull request as draft January 15, 2026 16:02
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