Skip to content

Add test suite that runs anatevka on large graphs with known MWPMs #60

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

Merged
merged 2 commits into from
Mar 15, 2025

Conversation

karalekas
Copy link
Member

Changes:

  • tests/py directory containing Python code for generating random graphs and computing their MWPM w/ networkx, and then saving each as a test case file
  • define-blossom-suite macro and for parsing these test case files and adding more unit tests via define-blossom-test

Test suite is considerably slower now, but passes for all 60 additional tests.

"Generates a valid Lisp symbol for a test name based on directory and file name."
(let* ((test-name (pathname-name test-path))
(clean-name (format nil "test-blossom-suite-~A-~A" dirname test-name)))
(intern (string-upcase (substitute #\- #\/ clean-name)) :anatevka-tests))))
Copy link
Contributor

Choose a reason for hiding this comment

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

Honestly this seems fine, since there aren't a bajillion test cases, but I have a dull memory that it's ill-advised to intern programmatically generated symbols. As an alternative, I guess we could just iterate through the directory at eval time of a single umbrella test, whether than at compile time to generate individuated tests?

Don't worry about it, just a comment.

@karalekas
Copy link
Member Author

Test suite is now 17m, up from 7s on main -- sounds like a job for feature/sleepy!

@karalekas karalekas merged commit bdb4e8d into main Mar 15, 2025
1 check passed
@karalekas karalekas deleted the test-blossom-suite branch March 15, 2025 22:25
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