-
Notifications
You must be signed in to change notification settings - Fork 160
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
Convert more Random methods to use InstallMethodWithRandomSource #1098
Comments
This is a newcomer friendly issue in that it should be relatively easy to make some progress on it, and thus "wet your feet" in GAP development. To get an idea about the kind of changes that need to be done, see e.g. PR #1599. To get an idea of places that need to be adapted, one can use the command |
Hi @fingolfin ,
be a suitable change, or am I overlooking something? Thank you |
@grouptheoryenthusiast that does seem plausible, however, be careful because this can lead to regressions if there are some values for That said, we might be there already, so I don't mean to discourage you from submitting it via a PR, just wanted to make sure you are aware of this potential problem. In any case, if you make sure that this function is actually tested by some test case, ideally by adding some explicit tests triggering it to |
A recent PR which did changes as described in this PR was PR #2115. |
Yes, in some cases I found my problem was I couldn't build a set of objects to test the code. While doing it, it's worth trying to build a bunch of different things to test with (much of this code is fairly untested), such as cosets of size 1, that kind of thing. Hopefully it's easy to slot into the tester, as in #2115, let us know if you have any problems with that. |
Hi @fingolfin and @ChrisJefferson ,
Please could you advise me what I should do to fix this. |
Somewhere there will be the Random function for AdditivelyActingDomain(A), you need to find that function and fix it first. If you can't figure out which other function needs improving first, one way of doing that would be to use the |
|
Hi @fingolfin and @ChrisJefferson ,
I get errors including:
I wonder if this means that I am calling |
No, you are barking up the right tree, but you've hit a fairly horrible case :) That copy of Random is defined really early, before InstallMethodWithRandomSource. Let me see if I can pick this particular one apart. |
@ChrisJefferson |
Just to keep you up to date, I've made PR #2204 , which will hopefully clean this up. I had to move some methods around a little, but the patch isn't too big. |
Thanks, I just read through your PR and it is a very useful learning tool because I can see exactly what you did to overcome the issues I was struggling with! |
For completeness and in case it is useful in testing the other PR, I will add here the tests I am working with.
|
@grouptheoryenthusiast nice, looking forward to a PR! |
@fingolfin thanks, I am not completely familiar with the git workflow, but as I am relying on PR #2204 I assume I wait for that to be merged until I submit this? Is that correct? |
Yes! |
So just to say, what we are having problems with is specifically the |
@ChrisJefferson , I have been looking at random in |
A quick update, I see that your pull request has now been merged. Over the next few days I will look at my proposed changes and submit a PR of my own. |
Making the change as I proposed above, all the tests seem to pass except for one.
Please can you advise what is happening here? Thanks for your time and guidance with this. James |
I think the error message might be misleading, and likewise the output of It would be easier to say if your code was available somewhere -- perhaps you can put it into a PR right now, even with the problem above. Then it's much easier to locate the error (e.g. I can then run the example directly, and try to analyze it). |
This might be me misunderstanding how |
If you want to try a quick fix, I think line 270 of coll.gi has to be:
Notice the extra comma before |
Ahhh, indeed :-) A pity this was not noticed during code review :-(. I guess it's good that the upcoming tests by @grouptheoryenthusiast will ensure we test the redispatch. If this fix works, I suggest @grouptheoryenthusiast just puts it into their upcoming PR |
@fingolfin and @ChrisJefferson thank you for your replies. |
In PR #810, the new
InstallMethodWithRandomSource
was introduced.We should convert more
Random
methods in the library to useInstallMethodWithRandomSource
, and, once a release of GAP supporting it has been made, we should also get packages to use it.UPDATE: Also, once GAP 4.9 has been released (resp. a stable release of it is out, presumable 4.9.1 or 4.9.2), we should look into nudging package authors into using
InstallMethodWithRandomSource
resp.InstallOtherMethodWithRandomSource
. Some relevant packages include:The text was updated successfully, but these errors were encountered: