Skip to content

Conversation

EinarSalbouvet
Copy link
Collaborator

Migration is missing, will be performed after other pull requests are migrated and merged

@EinarSalbouvet EinarSalbouvet requested a review from Copilot October 9, 2025 07:27
Copy link
Contributor

@Copilot 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 introduces conditional probabilities functionality by separating outcome probabilities from outcomes and adding support for conditional probability relationships based on parent options and outcomes.

  • Removes the probability field from the Outcome model and creates a new OutcomeProbability entity
  • Adds support for conditional probabilities with parent-child relationships between outcomes and options
  • Updates tests and services to work with the new probability model

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/models/outcome.py Removes probability field from Outcome model
src/models/outcome_probability.py Adds new OutcomeProbability model with parent relationships
src/models/uncertainty.py Adds outcome_probabilities relationship
src/dtos/outcome_probability_dtos.py Creates DTOs for outcome probability data transfer
src/dtos/uncertainty_dtos.py Updates uncertainty DTOs to include outcome probabilities
src/dtos/outcome_dtos.py Removes probability field from outcome DTOs
src/repositories/outcome_probability_repository.py Adds repository for outcome probability operations
src/repositories/uncertainty_repository.py Updates to handle outcome probabilities
src/repositories/outcome_repository.py Removes probability field handling
src/repositories/query_extensions.py Adds loading for outcome probability relationships
src/services/pyagrum_solver.py Updates solver to work with conditional probabilities
src/services/solver_service.py Adds NotImplementedError for conditional probabilities
src/seed_database.py Updates seed data to use new probability model
tests/ Updates all tests to work with new conditional probability structure
alembic/versions/58dceead9599_conditional_prob.py Database migration for conditional probabilities

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@EinarSalbouvet EinarSalbouvet requested a review from jafr67 October 10, 2025 08:25
Copy link
Contributor

@jafr67 jafr67 left a comment

Choose a reason for hiding this comment

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

Nice work 👍

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