Skip to content

Conversation

@OrestisLomis
Copy link
Contributor

This PR is such that conditionals can natively be added when using pysat to translate PB constraints.
The PR depends on two other PRs, one in pysat itself pysathq/pysat#206 which adds this functionality within pysat and another one in PBLIB rjungbeck/pypblib#6, which cleans up some trivial constraints. The latter one is not a blocker, it's just a testcase that would need to be changed.

@OrestisLomis OrestisLomis requested a review from hbierlee October 31, 2025 16:16
Copy link
Contributor

@hbierlee hbierlee left a comment

Choose a reason for hiding this comment

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

This can actually be made into a mergeable PR with the following trick: expect this assertion (using with pytest.raises(..), see doc) to raise an AssertionError (as it currently would). This passes. Once pypblib is updated and on our end upgraded, this test fails, and can be update the test. Maybe over-engineered, but avoids needing to remember this PR forever.

[edit: so that's only about the bit that tests the new expected output from pypblib. Indeed, the PySAT one is blocking for this PR, so we'll have to wait. The code looks good.]

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