Closed tomv42 closed 3 months ago
Thank you, I will review tomorrow UTC; in the meanwhile, can you please take care of failing tests on CI?
Anyway, in tests you can assert the string you are printing 👍
Yes, I'm working on it.
I added satisfactory assertions to all the unit tests except one, by comparing the results against sympy expressions and testing that the form is the right one with sympy too.
This didn't work for anf where calling is_anf
resulted in a type error. Which is weird because it didn't for the others.
For the DIMACS test, as the order of the symbols when converting to DIMACS is not guaranteed, and all the permutations of the names of the symbols give equivalent expressions, the test compares all the possible permutations of the 3 symbols.
@tomv42 with very few modification, you can also write the code for this: https://github.com/dakk/qlasskit/issues/26 , if you have time. You need to open a PR today, and then we have a week to review / request changes / edits.
@dakk I made the requested changes :)
Summary:
This pull request introduces the
py2bexp
command-line tool to theqlasskit
package. The tool converts qlassf functions in a Python script to boolean expressions. It also includes initial tests for the functionality.Changes:
Added
py2bexp.py
toqlasskit/tools
package:argparse
.Updated
setup.py
:py2bexp
as a console script entry point for seamless installation and usage.Initial Tests in
test_tools.py
:Related Issue:
This PR resolves issue #28
@dakk, I'm looking forward to your feedback.