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

Overhaul of div-alg code (refactoring of PR 56) #57

Closed
wants to merge 6 commits into from

Conversation

olexandr-konovalov
Copy link
Member

@olexandr-konovalov olexandr-konovalov commented Apr 9, 2020

This is refactoring of PR #56. Work in progress for @drallenherman and @angeldelriomateos to check.

@codecov
Copy link

codecov bot commented Apr 9, 2020

Codecov Report

Merging #57 into master will decrease coverage by 5.69%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
- Coverage   80.49%   74.79%   -5.70%     
==========================================
  Files          11       11              
  Lines        4650     5309     +659     
==========================================
+ Hits         3743     3971     +228     
- Misses        907     1338     +431     
Impacted Files Coverage Δ
lib/div-alg.gi 67.07% <ø> (-18.83%) ⬇️
lib/div-alg.gd 100.00% <100.00%> (ø)
lib/crossed.gi 73.77% <0.00%> (-0.15%) ⬇️

@olexandr-konovalov olexandr-konovalov force-pushed the div-alg-bug branch 6 times, most recently from 8d01ad1 to d73204b Compare April 9, 2020 14:41
@olexandr-konovalov
Copy link
Member Author

I am comparing this with PR #56, to ensure that the result is identical:

$ diff -r ../wedderga/doc/ ../wedderga1/doc/
$ diff -r ../wedderga/lib/ ../wedderga1/lib/ 
```

@olexandr-konovalov olexandr-konovalov force-pushed the div-alg-bug branch 2 times, most recently from 287ee6f to 2e35874 Compare April 9, 2020 14:54
@drallenherman
Copy link
Contributor

This is refactoring of PR 56. Work in progress for @drallenherman and @angeldelriomateos to check.

Thank you Alexander, I've successfully rebased to the new branch.

@olexandr-konovalov olexandr-konovalov force-pushed the div-alg-bug branch 6 times, most recently from 8dff8ee to f6bb154 Compare April 9, 2020 17:36
@olexandr-konovalov
Copy link
Member Author

olexandr-konovalov commented Apr 9, 2020

@drallenherman I don't know what "rebased to the new branch" mean, because "rebase" usually means that you are placing some changes on top of another changes - for example, a pull request made on some older revision of the master branch is rebased to look like it is made on the most recent revision of the master branch. Perhaps you had something else in mind!

Anyhow, I have severely edit this branch again, reducing the number of commits from 20 to 6, so most likely you will have to do that operation again to sync your local copy. Sorry if I was unclear - when I say "work in progress to check", I usually mean "work in progress, do not checkout unless you really want, but watch it via the web interface". You can see https://github.com/gap-packages/wedderga/pull/57/commits on the level of individual commits, or at https://github.com/gap-packages/wedderga/pull/57/files to se cumulative diffs.

I have tried to untangle changes as best as I can, but then for some other changes I gave up and glued them together. Anyway, commits in this PR are not atomic (i.e. they contain unrelated changes), so I don't see the point, since anyway we will create a merge commit to accept all changes in once, and I can spend only a final amount of time of cleaning up the history.

So, I have now checked that this gives the same as PR #56, and I suggest to merge this into master, and start then again, following new rules in new PRs:

  • do not put unrelated changes in one commit (for example, bugfix, a new code, a documentation update for another code, and code reformatting).
  • do not put unrelated changes in one pull request.

Are you happy with this plan?

@olexandr-konovalov
Copy link
Member Author

@drallenherman if you have already checked out this new branch, and want to reset it, assuming that origin points to this repo, and not to my fork (check with git remote -v), you will have to do this to reset it:

git fetch origin && git checkout div-alg-bug && git reset --hard origin/div-alg-bug

@olexandr-konovalov
Copy link
Member Author

olexandr-konovalov commented Apr 9, 2020

P.S. If you think that this is still a major rewrite and we should not merge this, we can go by some other way - you will be submitting new pull requests, but to this branch instead of a master. You have already practiced a bit, so next time it should be easier for you to make a pull request! Perhaps, the name of the branch should be changed to more informative though, since what you're doing is already beyond fixing a bug!

@angeldelriomateos
Copy link
Contributor

Can I commit my fix of a bug on ReducingCyclotomicAlgebra?

@olexandr-konovalov
Copy link
Member Author

@angeldelriomateos not yet, I'd rather try to agree with the plan!

@angeldelriomateos
Copy link
Contributor

Ok. I wait instructions.... dear commander ;)

@angeldelriomateos
Copy link
Contributor

Yes, this was one of the first fixing which is incorporated in the last push, and even before

@olexandr-konovalov olexandr-konovalov changed the title Refactoring of PR 56 Overhaul of div-alg code (refactoring of PR 56) Apr 9, 2020
@olexandr-konovalov
Copy link
Member Author

Ok, so I will close #52 - because of indentation changes, it will be too tedious to get it merged, and then update this PR to resolve merge conflicts. Although, if that's a ready for the release bugfix, it may be still nice to get it merged...

@olexandr-konovalov
Copy link
Member Author

Discovered that the documentation is broken - gap makedoc.g reports errors in XML code. So merging this could be a bit too early... I suggest to proceed with you submitting pull requests to a branch in wedderga's main repository.

@drallenherman
Copy link
Contributor

@drallenherman I don't know what "rebased to the new branch" mean, because "rebase" usually means that you are placing some changes on top of another changes - for example, a pull request made on some older revision of the master branch is rebased to look like it is made on the most recent revision of the master branch. Perhaps you had something else in mind!

Anyhow, I have severely edit this branch again, reducing the number of commits from 20 to 6, so most likely you will have to do that operation again to sync your local copy. Sorry if I was unclear - when I say "work in progress to check", I usually mean "work in progress, do not checkout unless you really want, but watch it via the web interface". You can see https://github.com/gap-packages/wedderga/pull/57/commits on the level of individual commits, or at https://github.com/gap-packages/wedderga/pull/57/files to se cumulative diffs.

I have tried to untangle changes as best as I can, but then for some other changes I gave up and glued them together. Anyway, commits in this PR are not atomic (i.e. they contain unrelated changes), so I don't see the point, since anyway we will create a merge commit to accept all changes in once, and I can spend only a final amount of time of cleaning up the history.

So, I have now checked that this gives the same as PR #56, and I suggest to merge this into master, and start then again, following new rules in new PRs:

  • do not put unrelated changes in one commit (for example, bugfix, a new code, a documentation update for another code, and code reformatting).
  • do not put unrelated changes in one pull request.

Are you happy with this plan?

Yes, go ahead after Angel pushes his next bugfix. When I pulled this morning, there were a few merge conflicts but not on code so I just thought it must be the whitespace issue again. So I forced the merge and when I "rebased" to the new branch on github desktop nothing happened. Rebase to me only means I clicked on "rebase". Sorry for causing you so much stress, but actually those changes were related - I found those bugs in div-alg.gi because I was working on the documentation.

Is the whitespace issue fixed? I've left my Atom settings alone. I hope that isn't adding to your
stress.

Alexander Konovalov and others added 6 commits April 9, 2020 19:32
We will temporarily use this version to distinguish the package
loaded from this branch
This was done accidentally because of default Atom settings.
IsCyclotomicAlgebra(K,F) decides whether K is a cyclotomic extension of
a NF.

ReducingCyclotomicAlgebra(A) = Reduces the crossed product of a cyc. alg.
as much as possible.

FactoringCycAlg(A) outputs [A[1],B,C] where the crossed product of A is
the tensor product of B and C.
Also extend LocalIndicesOfCyclotomicAlgebra mansection
and save the file without trailing whitespaces.
@olexandr-konovalov
Copy link
Member Author

@angeldelriomateos please commit and push the bugfix to div-alg-bug in alex-konovalov/wedderga, don't make any other changes so far.

@drallenherman
Copy link
Contributor

drallenherman commented Apr 9, 2020 via email

y := Difference(v,x);
F1:=NF(con,List(y,j->A[4][j][2]));
F2:=NF(con,List(x,j->A[4][j][2]));
if IsCyclotomicExtension(F2,F) and IsCyclotomicExtension(F2,F) then
Copy link
Member Author

Choose a reason for hiding this comment

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

@drallenherman you can comment immediately in the diffs for the pull request - so, should the 1st F2 be F1 ?

@olexandr-konovalov
Copy link
Member Author

Speaking of bugs, please feel free to add new tests to catch them, e.g. as done in https://github.com/gap-packages/wedderga/pull/55/files

@olexandr-konovalov
Copy link
Member Author

@drallenherman wrote

Yes, go ahead after Angel pushes his next bugfix. When I pulled this morning, there were a few merge conflicts but not on code so I just thought it must be the whitespace issue again. So I forced the merge and when I "rebased" to the new branch on github desktop nothing happened. Rebase to me only means I clicked on "rebase". Sorry for causing you so much stress, but actually those changes were related - I found those bugs in div-alg.gi because I was working on the documentation.

That explains perhaps a strange thing with changes made and then disappearing and then made again.

GitHub desktop seems to have "Pull origin with rebase" (https://help.github.com/en/desktop/contributing-to-projects/syncing-your-branch) - is that what you did?

Is the whitespace issue fixed? I've left my Atom settings alone. I hope that isn't adding to your
stress.

I haven't seen new problems, but only because you work with the same files for which trailing whitespaces are already removed. I don't know which settings your Atom has, so when you will edit another file, anything could happen, so please be careful.

@olexandr-konovalov
Copy link
Member Author

P.S. I will put more detailed instructions on Wiki at https://github.com/gap-packages/wedderga/wiki tomorrow!

@angeldelriomateos
Copy link
Contributor

I committed and pushed my fix bug in RCA causing problems with GSOCA.
It should not cause a problem now.
Hope to have it done properly this time. At least all looked correct.

@olexandr-konovalov
Copy link
Member Author

@angeldelriomateos thanks, it seems your commit went smoothly. I have now pushed it as c48ec81 in PR #58, with a little rewrite of the commit message (to add an empty line after the 1st line and fix punctuation).

@olexandr-konovalov
Copy link
Member Author

This PR was an intermediate step, I have now replaced it by #58 and will provide instructions for further work at https://github.com/gap-packages/wedderga/wiki (basically, I called the branch div-alg-bug and did not like the name, since this project goes far beyond a bugfix).

@drallenherman
Copy link
Contributor

I committed and pushed my fix bug in RCA causing problems with GSOCA.
It should not cause a problem now.
Hope to have it done properly this time. At least all looked correct.

Yes it is working smoothly now on SG(160,137).
I am still wondering about the two F2's in line 2487 of div-alg.gi.
Alex and I were thinking one of them should be an F1?

@drallenherman drallenherman mentioned this pull request Apr 10, 2020
4 tasks
@olexandr-konovalov olexandr-konovalov deleted the div-alg-bug branch April 15, 2020 17:49
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.

None yet

3 participants