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

Replace IsIntegerMatrix and IsMatrixOverFiniteField by MatrixObj #827

Merged
merged 13 commits into from
Aug 4, 2022

Conversation

james-d-mitchell
Copy link
Collaborator

This PR so far contains changes that removes the code for integer matrices in the Semigroups package and replaces them with MatrixObj. This is WIP, and shouldn't be merged, at least in part because I think there's no released version of GAP that this will work with, and it's a backwards incompatible change.

@james-d-mitchell james-d-mitchell added enhancement A label for issues or PRs that offer an enhancement to existing functionality not-backward-compatible Should be applied to pull requests that break backwards compatibility refactor A label for issues or PR that refactor some part of the project WIP Label for PRs that are Works In Progress (WIP) labels Apr 28, 2022
@james-d-mitchell james-d-mitchell mentioned this pull request Apr 28, 2022
@james-d-mitchell
Copy link
Collaborator Author

I believe that this resolves the original issue raised in #807

@james-d-mitchell james-d-mitchell changed the title matrix: replace IsIntegerMatrix by MatrixObj Replace IsIntegerMatrix by MatrixObj Apr 28, 2022
@james-d-mitchell james-d-mitchell added this to Todo in Next release via automation Jun 15, 2022
@james-d-mitchell
Copy link
Collaborator Author

I've adjusted this again to remove the changes to the matrices over finite fields code, and also to try to make this work with GAP master and 4.11 and 4.10. I've tested this with 4.11 and it works ok.

@james-d-mitchell james-d-mitchell removed the not-backward-compatible Should be applied to pull requests that break backwards compatibility label Jun 16, 2022
@james-d-mitchell
Copy link
Collaborator Author

Slight revision, I don't currently expect this to work with master because there's more work to do to replace matrices over finite fields.

@james-d-mitchell james-d-mitchell moved this from Todo to In progress in Next release Jun 23, 2022
@james-d-mitchell james-d-mitchell changed the base branch from master to dev-5.0 June 23, 2022 16:33
@james-d-mitchell james-d-mitchell removed the enhancement A label for issues or PRs that offer an enhancement to existing functionality label Jun 24, 2022
@james-d-mitchell james-d-mitchell self-assigned this Jun 24, 2022
@james-d-mitchell
Copy link
Collaborator Author

james-d-mitchell commented Jun 24, 2022

I have now replaced the code in Semigroups for matrices over finite fields, and I expect that the Semigroups package tests will pass with GAP master, not sure about the other versions of GAP.

@james-d-mitchell
Copy link
Collaborator Author

@wilfwilson
Copy link
Collaborator

That link seems to be resolving now.

@fingolfin
Copy link
Contributor

fingolfin commented Jun 29, 2022

Broken CI was due to migration of the GAP website; I forgot to restore on HTTP redirect rule... fixed now

Now I've done the following: I took a GAP master build with the latest package distro, and replace semigroups in there with what is in this branch. I then run parts of the GAP test suite, after first loading Semigroups (I did not yet try "all" combinations).

This revealed a minor test regressions:

########> Diff in /Users/mhorn/Projekte/GAP/gap/tst/testinstall/magma.tst:54
# Input is:
AsSemigroup( F );
# Expected output:
<semigroup of size 6, with 2 generators>
# But found:
<semigroup of size 6, 2x2 matrices over GF(2) with 2 generators>
########

but that looks like something we can easily adjust in the GAP test suite (e.g. by suppressing the print output; we can't just change the expected output, though, as it now differs depending on whether semigroups is loaded or not...)

I am now going to run GAP's tst/teststandard.g and tst/testextra.g

@james-d-mitchell
Copy link
Collaborator Author

Thanks @fingolfin, we are running some GAP tests in the jobs on azure, but these are not being run here (they use GAP 4.10 and 4.11). I think the best solution to that change is to suppress the output, as you say.

@james-d-mitchell
Copy link
Collaborator Author

Is there a gh action for running the GAP library tests anywhere?

@james-d-mitchell
Copy link
Collaborator Author

Seems like gh-actions is having a "major outage".

@fingolfin
Copy link
Contributor

Is there a gh action for running the GAP library tests anywhere?

No, but assuming you already have a running GAP, then normally you can run the (minimal) test suite via Read(Filename(DirectoriesLibrary("tst"), "testinstall.g"));. This will exit the current GAP with an exit code set to indicate success or failure.

@james-d-mitchell
Copy link
Collaborator Author

Thanks @fingolfin, I think I'm just a little confused about how to do this in the context of the gh actions for GAP, since there's nowhere in the ci.yml file that we actually invoke GAP directly, just use one of the GAP gh actions. If you could point me in the right direction that'd be awesome.

I am nearly finished with this, I need to add a few more tests, and rebase the PR, but otherwise everything is looking good!

@fingolfin
Copy link
Contributor

@james-d-mitchell it should be possible to run gap by just invoking it as such in a bash shell script. So something like this should work:

      - name: "Run GAP testinstall test suite"
        run: gap -c 'Read(Filename(DirectoriesLibrary("tst"), "testinstall.g"));'

@fingolfin
Copy link
Contributor

Ah OK, I see you also got it to work by hacking gap-actions/run-pkg-tests. Also fine. Perhaps even better, to ensure the right version of semigroups is being loaded? Anyway, it seems to work.

@james-d-mitchell
Copy link
Collaborator Author

Thanks @fingolfin, yup I figured it out, thanks for letting me know.

I've tried as far as possible to not require any changes to the GAP tests for this version of Semigroups, but there are some I can't workaround (without doing too much work), so I'll likely submit a PR to GAP for this.

@fingolfin
Copy link
Contributor

Great. And of course if there are changes needed on the GAP side, that's fine (and kinda to be expected). Let me know if I can help with anything, or if a chat would help at any point.

@james-d-mitchell james-d-mitchell changed the title Replace IsIntegerMatrix by MatrixObj Replace IsIntegerMatrix and IsMatrixOverFiniteField by MatrixObj Aug 4, 2022
@james-d-mitchell
Copy link
Collaborator Author

@fingolfin I think the only changes required in GAP master are in the PR:

gap-system/gap#4971

@james-d-mitchell james-d-mitchell added not-backward-compatible Should be applied to pull requests that break backwards compatibility and removed WIP Label for PRs that are Works In Progress (WIP) labels Aug 4, 2022
@james-d-mitchell james-d-mitchell changed the base branch from dev-5.0 to master August 4, 2022 13:13
@james-d-mitchell james-d-mitchell merged commit d2e6238 into semigroups:master Aug 4, 2022
@james-d-mitchell james-d-mitchell deleted the MatrixObj branch August 4, 2022 13:54
@james-d-mitchell james-d-mitchell moved this from In progress to Done in Next release Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-backward-compatible Should be applied to pull requests that break backwards compatibility refactor A label for issues or PR that refactor some part of the project
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants