-
Notifications
You must be signed in to change notification settings - Fork 1
feat: base dagpool simulation #4
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
base: main
Are you sure you want to change the base?
Conversation
554ae31 to
e4275ba
Compare
e4275ba to
5e15682
Compare
10ede7a to
f059db8
Compare
f059db8 to
b242137
Compare
3862fcd to
206deba
Compare
6f950ba to
45129e6
Compare
There was a problem hiding this 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 pull request adds core functionality for simulating dagpool computations, including graph algorithms for Hamiltonian path and cycle detection in tournament graphs.
- Introduces a new module (dagpool/graph.py) with implementations for tournament graph algorithms using Tarjan’s algorithm for strongly connected components.
- Adds a new module (dagpool/schemas.py) that defines several NewType schemas for identifying graph-related entities.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| dagpool/graph.py | Adds graph functionality including tournament graph checks, SCCs, Hamiltonian path and cycle finder functions. |
| dagpool/schemas.py | Provides type definitions used throughout the dagpool module. |
Comments suppressed due to low confidence (1)
dagpool/graph.py:168
- [nitpick] The parameter name 'hamiltonian_path' in 'assert_is_strongly_connected_component' is misleading since it actually represents the nodes of a strongly connected component. Consider renaming it to 'scc_nodes' for improved clarity.
def assert_is_strongly_connected_component(self, hamiltonian_path: List[GraphNodeId]):
| return False | ||
| return True | ||
|
|
||
| def print_all_edges(self): |
Copilot
AI
Mar 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'print_all_edges' function collects edges in a list but neither prints nor returns the collected list. To match the function name, consider either printing the list or returning it so that its output can be used.
No description provided.