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 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 👍

EinarSalbouvet and others added 7 commits October 20, 2025 13:44
* feat: handle conditional prob in pyagrum

* refactor: update UUID handling and improve discrete probability management

* fix: correct spelling of 'influence' in method names and improve probability scaling logic

* fix: add type ignore comments for pyagrum usage and improve type hinting in methods
@EinarSalbouvet EinarSalbouvet marked this pull request as draft November 3, 2025 09:50
EinarSalbouvet and others added 3 commits November 13, 2025 12:44
#177)

* feat: add edge connections to discrete probabilities and update related services

* feat: implement edge connection handling in discrete probability and update related models

* feat: add edge handling to conditional probabilities and refactor related repositories

* feat: implement foreign key constraints and cleanup logic for discrete probabilities

* feat: enhance uncertainty handling in session manager and issue repository

* feat: implement event handlers for session management and discrete probability recalculation

* feat: apply relational fixes to discrete probabilities and update foreign key constraints

* feat: remove unused imports and tracked entities from DiscreteProbabilityEventHandler

* Update src/repositories/uncertainty_repository.py

Co-authored-by: Copilot <[email protected]>

* Update src/repositories/uncertainty_repository.py

Co-authored-by: Copilot <[email protected]>

* feat: remove unused imports and improve code clarity across multiple files

* feat: remove unused endpoints and related tests for discrete probabilities

* feat: update probability field to be optional in DTOs and models; add new Alembic migration

* refactor: simplify migration merge

---------

Co-authored-by: Copilot <[email protected]>
@EinarSalbouvet EinarSalbouvet marked this pull request as ready for review November 19, 2025 07:21
@EinarSalbouvet EinarSalbouvet merged commit 08985af into main Nov 19, 2025
4 checks passed
@EinarSalbouvet EinarSalbouvet deleted the feat/conditional-probabilities branch November 19, 2025 08:08
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.

3 participants