-
-
Notifications
You must be signed in to change notification settings - Fork 672
better uniformity for polytope methods #40875
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
base: develop
Are you sure you want to change the base?
Conversation
Documentation preview for this PR (built with commit e68b6a1; changes) is ready! 🎉 |
I think it would be good to have a more general scheme thought through before fixing these. For graphs, we have Or does this PR mean we fix |
One argument in favor of the Should we ask on sage-devel? What are the options, realistically?
|
I would advocate for just doing what I am doing now. This PR is only about local coherence, curing a very concrete pain. I do not think that we can achieve global coherence, but for sure we can think a little bit about it. |
I don't think |
my aim is very restricted : we have two implementations of polytopes, and they have incompatible names for the corresponding methods.. I have chosen to uniformize towards the most used names among the two possibilities |
current situation
changes from my proposal
and |
OK, in that case there is indeed something to conform with. I'd still advocate for not deprecating the |
You have a point. But deprecating and removing also has benefits, apart from just cleaning : the TAB-completion becomes shorter and better. |
Do you think you get a chance to tell and explain that to the people out there that have their code broken by a deprecation of a function name for what are ultimately aesthetic reasons? Do you think they'll agree with you? I know from experience that having to amend previously working code is very frustrating. It happened on a large scale with Python 2 -> Python 3 due to the parentheses around print and it was not enjoyable. It's good to keep in mind when you're considering inflicting something similar. |
In the case at hand, I suspect that there are not too many users / using projects affected. However, I admit that I don't know. It might be nice to have a service, eg., a mailing list, that projects could describe to, which would warn of intended deprecations, so they could voice the inflicted cost. |
In the case at hand, I suspect that there are not too many users / using projects affected. However, I admit that I don't know. It might be nice to have a service, eg., a mailing list, that projects could describe to, which would warn of intended deprecations, so they could voice the inflicted cost. I just noticed that there is also |
I would not oppose if we decide not to deprecate. Concerning python3, I know what it took. We may strive here to reach some coherence inside the geometry folder. Most methods are currently "n_*" there. Besides the methods in
|
I am strongly in favour of introducing the aliases I would not oppose the very limited deprecation of |
now without deprecations |
I'm setting this to positive, since this was done meanwhile for #40887, and I think it should be done simultaneously. |
sagemathgh-40875: better uniformity for polytope methods This is trying to enhance the uniformity of some method names between `LatticePolytope` and `Polyhedron`. ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. URL: sagemath#40875 Reported by: Frédéric Chapoton Reviewer(s):
sagemathgh-40887: convert some methods in designs and graphs to n_* This replaces methods `num_points` and `num_blocks` by `n_points` and `n_blocks` in designs. Old names are kept as aliases. cf also sagemath#40875 This is just a small reduction of the number of method with names `num_*` ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. URL: sagemath#40887 Reported by: Frédéric Chapoton Reviewer(s): Vincent Macri
sagemathgh-40875: better uniformity for polytope methods This is trying to enhance the uniformity of some method names between `LatticePolytope` and `Polyhedron`. ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. URL: sagemath#40875 Reported by: Frédéric Chapoton Reviewer(s):
sagemathgh-40887: convert some methods in designs and graphs to n_* This replaces methods `num_points` and `num_blocks` by `n_points` and `n_blocks` in designs. Old names are kept as aliases. cf also sagemath#40875 This is just a small reduction of the number of method with names `num_*` ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. URL: sagemath#40887 Reported by: Frédéric Chapoton Reviewer(s): Vincent Macri
This is trying to enhance the uniformity of some method names between
LatticePolytope
andPolyhedron
.📝 Checklist