Skip to content

Interface SCIP methods missing from PySCIPOpt - #1285

Merged
Joao-Dionisio merged 6 commits into
scipopt:masterfrom
adamj34:interface-methods
Nov 11, 2026
Merged

Joao-Dionisio merged 6 commits into
scipopt:masterfrom
adamj34:interface-methods

Conversation

@adamj34

@adamj34 adamj34 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Adds the following methods:
nodesSharePath(), nodesGetCommonAncestor(), getFocusDepth(), getRootNode(), wasNodeLastBranchParent()

Adds tests in tests/test_node.py and tests/test_node_methods.py for the interfaced methods

Adds function signatures to scip.pyi for type hints

Updates CHANGELOG.md

@adamj34
adamj34 marked this pull request as ready for review November 8, 2026 13:29
@Joao-Dionisio

Copy link
Copy Markdown
Member

Thank you so much @adamj34 !

One minor question: when the model is solved to optimality, things like getRootNode() return None, right? If so, then can both teh docstring and the stubs include this?

@adamj34
adamj34 marked this pull request as draft November 10, 2026 19:47
@adamj34
adamj34 marked this pull request as ready for review November 10, 2026 21:23
@adamj34

adamj34 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

That's a good catch, @Joao-Dionisio. nodesGetCommonAncestor can also return None, so I updated it as well.

@adamj34

adamj34 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

I also added one more method

@Joao-Dionisio Joao-Dionisio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you so much, @adamj34 , awesome PR as always!

@Joao-Dionisio
Joao-Dionisio added this pull request to the merge queue Nov 11, 2026
Merged via the queue into scipopt:master with commit 3653fbf Nov 11, 2026
10 checks passed
@adamj34
adamj34 deleted the interface-methods branch November 11, 2026 09:34
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