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

Implement Specht modules for diagrams #35036

Merged

Conversation

tscrim
Copy link
Collaborator

@tscrim tscrim commented Feb 9, 2023

Fixes #34883.

@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2023

Codecov Report

Patch coverage: 91.91% and no project coverage change.

Comparison is base (5330147) 88.61% compared to head (ca76b1d) 88.61%.

❗ Current head ca76b1d differs from pull request most recent head ff7bc98. Consider uploading reports for the commit ff7bc98 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #35036   +/-   ##
========================================
  Coverage    88.61%   88.61%           
========================================
  Files         2148     2149    +1     
  Lines       398855   398847    -8     
========================================
+ Hits        353438   353445    +7     
+ Misses       45417    45402   -15     
Impacted Files Coverage Δ
src/sage/combinat/permutation.py 96.57% <75.00%> (-0.08%) ⬇️
src/sage/combinat/diagram.py 97.95% <81.81%> (-0.76%) ⬇️
src/sage/combinat/integer_vector.py 93.35% <81.81%> (-0.08%) ⬇️
src/sage/combinat/composition.py 97.00% <86.66%> (-0.38%) ⬇️
src/sage/combinat/partition.py 96.79% <86.66%> (-0.09%) ⬇️
src/sage/combinat/skew_partition.py 97.91% <86.66%> (-0.37%) ⬇️
src/sage/combinat/specht_module.py 97.29% <97.29%> (ø)
src/sage/combinat/symmetric_group_algebra.py 94.44% <100.00%> (+0.08%) ⬆️

... and 121 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 15, 2023

@zabrocki @saliola @darijgr Here is the PR for the branch that was previously there.

@tscrim tscrim requested a review from saliola February 15, 2023 03:19
@fchapoton
Copy link
Contributor

I would prefer to add just one method everywhere, not the second method about rank.

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 18, 2023

I would prefer to add just one method everywhere, not the second method about rank.

The rank computation is faster as it doesn't need to do the full echelonization. Since it can often be the point of interest (at least with more arbitrary shapes from what I've heard), I wanted to have easy access to it, plus the Specht module itself.

sage: s(SM.frobenius_image())
s[2, 2, 1]
"""
from sage.combinat.specht_module import SpechtModule
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe factor out a function specht_module_builder that takes a ring, a size and cells ? Instead of doing these double imports everywhere ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't really see the benefit. To me, it adds more indirection and complexity to save on just doing one import at each point of the code instead of two (as the second import is still done). To me, it is equivalent to having

class Bar:
    def __init__(self, x):
        self._x = x

def foo(x):
    from above import Bar
    return Bar(x)

which I would want to just call Bar(x) within my code.

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 9, 2023

Okay, something is seriously borked up with how GH is syncing as I have merged in develop, which is what is leading to the massive file differences. @mkoeppe @dimpase What is going on with this?

@dimpase
Copy link
Member

dimpase commented Mar 9, 2023

I don't have anything to do with releases - develop is updated by @vbraun

@dimpase
Copy link
Member

dimpase commented Mar 9, 2023

my advice is to rebase (rather than merge), as far as it is easy. Leads to much clearer branches. GH has an automated rebase for the base branch (instead of merging it, you can choose to rebase)

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 9, 2023

@dimpase I am of the opinion rewriting history is bad (and it can mean I have to rehandle all merge conflicts; although that isn't the case here IIRC), but I will try. However, you are part of the GH transition team, and this is an issue with developing Sage with GH.

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 9, 2023

@dimpase Actually, I do have merge conflicts to deal with...

@tscrim tscrim force-pushed the public/combinat/specht_modules-34883 branch from cca8827 to abe78e3 Compare March 9, 2023 00:19
@dimpase
Copy link
Member

dimpase commented Mar 9, 2023

There were a number of very large edits done recently, e.g. replacing explicit references to trac.sagemath.org all over the sources.

This will not happen often.

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 9, 2023

The rebase seems to have fixed the GH issue, but there should have been no difference with develop.

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 9, 2023

@tscrim I didn't see what GitHub was showing in the diff; but I've just looked at your branch before the rebase (cca8827).
The first parent of cca8827 is 10.0.beta3 – so you merged a branch into the development version. (Compare git log cca882762fa41c40 and git log --first-parent cca882762fa41c40.) This is not good practice, and I can imagine that it may confuse tools that show diffs regarding what is to be considered the upstream branch. Instead, go to the branch and merge the develop branch into it.

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 9, 2023

@mkoeppe It was showing 524 files changed. I also really never want to rollback my version of Sage to a previous version just to merge in develop. This needlessly wastes a huge amount of time with recompiling stuff that didn't actually change (beyond the timestamps)., Not to mention it is far more commands and a good diff tool should be comparing files rather than by commits (which seems to me like it would be very brittle).

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 9, 2023

I'm aware of the problem of expensive rebuilds. I just use a separate worktree when I have to do such merges.
On GitHub you can also use the merge button to merge; then pull in the updated branch.

Your fix, merging in the opposite direction, is bad practice and creates bad history.

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 9, 2023

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 9, 2023

Okay, I see. This is a bit contrary to how I remember the development model being presented (e.g., there is no special branch).

Copy link
Contributor

@fchapoton fchapoton left a comment

Choose a reason for hiding this comment

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

ok, let it be

@github-actions
Copy link

Documentation preview for this PR is ready! 🎉
Built with commit: ca76b1d

@fchapoton
Copy link
Contributor

in my opinion, it is not required to merge develop after getting positive review

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 15, 2023

in my opinion, it is not required to merge develop after getting positive review

Quite possibly; I am somewhat of the same opinion. Although it is one click on GH and makes sure there are no merge conflicts…

@dimpase
Copy link
Member

dimpase commented Mar 15, 2023

By merging (even better, rebasing, if possible), you're alleviating the risk that the branch does not merge cleanly any more.

This is something that ought to be improved in our development workflow. IMHO most everyone thinks that our develop branch is too slow with its updates.

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 15, 2023

But not everyone; in particular, I am not of that opinion. Although having a more all-PRs-currently-merged branch that doesn’t change would be nice to have. Yet that might end up being more work for Volker…

@dimpase
Copy link
Member

dimpase commented Mar 15, 2023

my point is that with other GitHub projects I contribute to, once your PR is approved, the rest is not your worry. Here, you still have to often watch your approved contribution to get all mouldy and often in need of more polish, because bitrot...

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 15, 2023

Although it is one click on GH and makes sure there are no merge conflicts…

GH checks for merge conflicts already when you view the PR; there's no need to push the merge button for that. When it displays "branch is out of date", that means it can be merged cleanly.

I think the standing guidance from @vbraun still applies: Don't touch a PR that has the "positive review" label. (It may already be merged into Volker's branch.) With the modification: If GH indicates that there is a merge conflict, then it makes sense to resolve the conflicts – it typically can't be merged in this case.

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 15, 2023

@mkoeppe Do the tests run against the latest develop too?

@dimpase I think there is only so much that can be done for that because of a higher volume of changes that SageMath development has. The only thing I could think of to prevent that would be the every-accepted-PR-merged branch I mentioned before. Usually the biggest lag in beta versions comes around release time and just after, but I think that comes from Volker having to do too much.

@dimpase
Copy link
Member

dimpase commented Mar 15, 2023

Do the tests run against the latest develop too?

as far as I know, they are not running with an explicit trigger such as a git push.
So in that sense, updating the branch triggers the tests against the new base branch.

@dimpase
Copy link
Member

dimpase commented Mar 15, 2023

every-accepted-PR-merged branch

as far as I know, that's what large Python orgs, such as cPython, scipy, etc., use.

@vbraun
Copy link
Member

vbraun commented Mar 19, 2023

Merge conflict

@tscrim tscrim force-pushed the public/combinat/specht_modules-34883 branch from fe8b956 to ff7bc98 Compare March 26, 2023 14:04
@tscrim
Copy link
Collaborator Author

tscrim commented Mar 26, 2023

Trivial rebase.

@vbraun vbraun merged commit b5d509b into sagemath:develop Apr 1, 2023
@mkoeppe mkoeppe added this to the sage-10.0 milestone Apr 1, 2023
@tscrim tscrim deleted the public/combinat/specht_modules-34883 branch April 2, 2023 10:29
@tscrim tscrim restored the public/combinat/specht_modules-34883 branch April 28, 2023 05:31
@tscrim tscrim deleted the public/combinat/specht_modules-34883 branch April 28, 2023 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Specht modules for arbitrary diagrams
6 participants