Skip to content
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

fix: broken doctests and typos #438

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Fe-r-oz
Copy link
Contributor

@Fe-r-oz Fe-r-oz commented Nov 29, 2024

This PR implements minor fixes in doctests.

Edit:

  • The code is properly formatted and commented.
  • Substantial new functionality is documented within the docs.
  • All new functionality is tested.
  • All of the automated tests on github pass.
  • We recently started enforcing formatting checks. If formatting issues are reported in the new code you have written, please correct them.

@Fe-r-oz Fe-r-oz changed the title fix broken doctests fix: broken doctests and typos Nov 29, 2024
@Krastanov
Copy link
Member

These fixes are much appreciated! But I am also a bit confused: any idea how come these problems were not detected by the test runner?

@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Dec 20, 2024

The test runner didn't detect these errors because it did not construct the code to check the parameters: the parameters (108,12) were given to it on the platter.

julia> B = 𝜋^8 + 𝜋^14 + 𝜋^47;
(108, 12)

To the test runner, this was correct because it was the expected result. It didn't calculate the parameters to verify it, as the calculation step - the code construction => to calculate the parameters was missing. This was a silly error. My bad.

@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Dec 20, 2024

In the first doctest fix, the group algebra, GA and the generators x and y are not constructed. For multivariate bicycle code, the condition is to have a z = x*y as the third generator. This doctest should have thrown an error because x and y are not provided to it when constructing the third generator.

julia> import Hecke: group_algebra, GF, abelian_group, gens; # hide
julia> l=4; m=6;
julia> z = x*y;
julia> A = x^3 + y^5;
julia> B = x + z^5 + y^5 + y^2;
julia> c = two_block_group_algebra_codes(A, B);
julia> code_n(c), code_k(c)

@Krastanov
Copy link
Member

That does not seem to be the correct explanation. It seems these doctests, because they were in an extension, were actually never executed. Hopefully the last commit I pushed fixes that.

Thanks for flagging this issue! That would have been unresolved and untested for a long time otherwise. Good catch!

@Krastanov Krastanov added the Skip-Changelog label for control of CI: skips the changelog check label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip-Changelog label for control of CI: skips the changelog check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants