Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make two node example graph #16

Merged
merged 27 commits into from
Mar 20, 2025
Merged

Make two node example graph #16

merged 27 commits into from
Mar 20, 2025

Conversation

mscroggs
Copy link
Collaborator

@mscroggs mscroggs commented Mar 14, 2025

  • Refactored node and graph so that a graph can be more easily created using functions as in Helper class for creating graph #7.
  • Added functions to estimate mean and standard deviation from a graph
  • Added test that one and two node graphs containing normal distributions give the correct mean and stdev

@mscroggs mscroggs marked this pull request as draft March 14, 2025 15:30
@mscroggs mscroggs linked an issue Mar 19, 2025 that may be closed by this pull request
3 tasks
@mscroggs mscroggs requested a review from willGraham01 March 19, 2025 09:24
@mscroggs mscroggs marked this pull request as ready for review March 19, 2025 09:24
Copy link
Collaborator

@willGraham01 willGraham01 left a comment

Choose a reason for hiding this comment

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

Working example 🥳 🚀

Couple of small ruff-please-ers in the Graph class.

For the algorithms module, I'm not convinced as to why the methods in there can't be part of the Graph class itself, but I'm open to being convinced.

The test comments are mostly on a reduction in the number of cases. The two example tests have 16 & 32 test cases, respectively (which is not a bad thing, but some are likely redundant in terms of what they check).

Copy link
Collaborator

@willGraham01 willGraham01 left a comment

Choose a reason for hiding this comment

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

Have put a few small suggestions in (if you agree with them, it should just be a case of "apply suggestion" and things won't break), otherwise looks good to go!

@mscroggs mscroggs enabled auto-merge (squash) March 20, 2025 14:09
@mscroggs mscroggs merged commit b8aec32 into main Mar 20, 2025
5 checks passed
@mscroggs mscroggs deleted the mscroggs/normal-example branch March 20, 2025 14:09
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.

Helper class for creating graph
2 participants