Skip to content

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Apr 2, 2024

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 4, 2024

Ready for review.

The failure in "Test modularized distributions" is unrelated; it is tracked in #37734.

@@ -1361,7 +1361,7 @@ def __init__(self, modules, **options):
"""
self._sets = modules
indices = CartesianProduct_iters(*[module.basis().keys()
for module in modules]).map(tuple)
for module in modules]).map(tuple, is_injective=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change? is_injective is the default, and also what I'd assume that map does.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just for clarity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

also what I'd assume that map does.

That's one of the trickier parts in the enumerated sets code. See e.g. #34389

@@ -1229,7 +1231,7 @@ def negative_roots(self):
"""
if not self.cartan_type().is_finite():
raise ValueError("%s is not a finite Cartan type" % self.cartan_type())
return self.positive_roots().map(attrcall('__neg__'))
return self.positive_roots().map(attrcall('__neg__'), is_injective=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change? is_injective is the default, and also what I'd assume that map does.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just annotation for clarity as I made my way through the code to fix a failure.

@mantepse
Copy link
Contributor

mantepse commented Apr 4, 2024

I think that's great!

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

I don't think the ImageSubobject should take the category into account for equality and hashing. It doesn't change what the actual set is. Same for _is_injective. Everything is contained within the self._map, self._inverse, and self._domain_subset.

Other than that, LGTM. We have to pull the trigger at some point on removing CombinatorialClass.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 4, 2024

I don't think the ImageSubobject should take the category into account for equality and hashing. It doesn't change what the actual set is. Same for _is_injective. Everything is contained within the self._map, self._inverse, and self._domain_subset.

Also self._inverse does not change what the actual set is...

Copy link

github-actions bot commented Apr 4, 2024

Documentation preview for this PR (built with commit 094c106; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

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

Thank you. LGTM. @mantepse Feel free to revert if you disagree.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 8, 2024

Thanks!

@vbraun
Copy link
Member

vbraun commented Apr 9, 2024

merge conflict

@mantepse
Copy link
Contributor

I'm not sure what happened here, I thought it was a simple merge conflict. Have I overlooked any changes?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 13, 2024

I set it to "needs review" only to wait for the CI to complete after resolving the merge conflict.
It's all good.

vbraun pushed a commit to vbraun/sage that referenced this pull request Apr 20, 2024
sagemathgh-37722: Remove `CombinatorialClass`
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Fixes sagemath#36133
- Fixes sagemath#33384
- Fixes sagemath#19474
- Fixes sagemath#12913

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#37722
Reported by: Matthias Köppe
Reviewer(s): Martin Rubey, Matthias Köppe, Travis Scrimshaw
@vbraun
Copy link
Member

vbraun commented Apr 24, 2024

merge conflict

@mantepse
Copy link
Contributor

Hi Matthias! I suppose that you only merged develop, right?

I find it a bit hard ti review if after a merge conflict the whole branch is replaced. I would prefer to see only the difference to the last version.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 28, 2024

I suppose that you only merged develop, right?

No, I rebased a previous version that was based on 10.4.beta2 (2141959) onto 10.4.beta4.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 28, 2024

I find it a bit hard ti review if after a merge conflict the whole branch is replaced. I would prefer to see only the difference to the last version.

That's understandable, but ease for the reviewer is only one of several criteria when deciding how to update a branch. Cleanliness of the branch is another one.

I can teach you how to use git more effectively in such situations if you are interested.

@mantepse
Copy link
Contributor

I was on my smartphone, so, no git there.

But yes, I'd still be interested to know how to get the "interesting part" of the diff between the branch that was replaced with the current branch.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 30, 2024

@mantepse A technique that I find useful in such situations is to take the old, reviewed version (here: git fetch upstream 1cdc9cfb1e70a94abf149582c13d588aeaf1b43e && git checkout FETCH_HEAD) and then merge the new release, asking for any merge conflicts to be resolved automatically instead of interactively (using -Xtheirs or -Xours): git merge -Xtheirs upstream/develop. Then the diff with the new version can be inspected.

@vbraun vbraun merged commit 46b7ec2 into sagemath:develop May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants