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
Deprecations: default LP variables will become real instead of nonnegative #15521
Comments
comment:1
Heeeeeeere it is ! Warnings are displayed for each behaviour that will change in one year, and then we'll have something that makes sense AND does not lead anybody into a wall Nathann |
Branch: u/ncohen/15521 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Commit: |
comment:5
Just having a look at this. All the cleanup is a nice addition along with the deprecation warning. In the diff around @@ -577,6 +584,14 @@ cdef class MixedIntegerLinearProgram(SageObject): There is a new test labeled "Default behavior" that I don't quite see the point of. Was your intent just to document the current default behavior and have this test change when the deprecation period is up? |
comment:6
Helloooooooo !!!
Yep, but it did not apply on the latest 6.1.beta6. I just updated it
Hmmm... Yep, looks like this one is just there to check that the patch had his effect, a bit like how we add a doctest when we fix a bug. I know I added some doctests just to bring attention to the method when the default behaviour will be changed, but this one looks innocent Nathann |
comment:8
By the way it would be cool you could review #15489 and possibly this ticket too, for otherwise writing patches changes nothing to Sage's actual code Nathann |
comment:9
I can review #15489. Looks like it depends on #15482 (which has failing merge and doctests?) in turn. On this ticket, your latest changes look good to me. I'm waiting for my local copy to build and test. How does the patchbot get triggered these days? Your latest commits didn't seem to get tested.. |
comment:10
I get 5 doctest failures from knapsack.py that all look like:
|
comment:12
Sorryyyyyy ! It is now fixed. Nathann |
Reviewer: benjaminfjones |
comment:14
Ok, back from hiatus. Your latest rebase and minor changes look good and tests are passing now. I'll give a positive review and have a look at those other tickets you mentioned. |
comment:15
Thaaaaaanks !! I just rebased #15482 which is a dependency of this ticket. Nathann |
Changed reviewer from benjaminfjones to Benjamin Jones |
comment:16
Please use full names for the !Author/Reviewer fields next time |
comment:17
Conflict, please merge in latest beta |
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
comment:19
I am getting an error while building the relevant docs:
|
comment:21
Replying to @nathanncohen:
Huh? Are we back to the hg-like patch quilt? How come "#15489 is not applied" when I check this one out? EDIT: I don't see how to make this consistent without a manual rebase: if I "apply" #15489 by checking it out, this "application" will be reversed upon checking out this ticket, isn't it? |
comment:22
git does not manage dependencies based on branch names. This "branch" does not depend on branch "15489". The first commit of this branch depends on the last commit of branch 15489 when it was created, but since that time I fixed the problem by adding another commit at the end of branch 15489, which is totally unrelated to this branch. Thus, when you apply this branch, only the commits that actually depend on it are applied. Not the commit that were added later on that branch. Then again, git does not do anything based on branch names. Commit is the only thing that it sees.
Indeed. If you want both, what you should do is :
Pull is equivalent to "fetch + merge". So it will merge this branch atop of #15489. This way everything that is currently in #15489 will coexist with everything which is in #15521. This is what Volker does when he builds a release : he pulls patches one after the other starting from the previous release. Note that there is a "clean" way out : I can checkout this branch, pull #15489 (which will merge with this branch all commits from #15489 which are not already part of it) then update this branch with it. It's just that my Sage is compiling at the moment and I can't do it right now, so if you are satisfied with this explanation... Nathann |
comment:23
Replying to @nathanncohen:
this is what I get if I try this at branch 15489:
looks like an automatic clean merge won't fly... |
comment:25
Done Nathann |
comment:26
Looks good; tested with sage --dev scripts Just in case, note that somehow I was not able to make this to work using |
comment:27
(but also probably because I slightly rewrote history once or twice, in order to change a commit message for instance) Thanks for the review ! Nathann |
comment:28
Replying to @nathanncohen:
hopefully this won't cause problems when merging into the release. |
comment:29
Nono it does not. There is nothing "wrong" with changing history. The only bad thing that happens is when you update some commits which have already been used by somebody else in another branch. You end up with having two commits which are meant to do the same thing, one of them sligthly modified (a different commit message, for instance). That is a problem. But you can rewrite history 10000 times on your own computer before pushing the branch, in the same way that we can rewrite history 10000 times on this ticket if we are confident that nobody used the commits before we changed them. Nathann |
Changed branch from u/ncohen/15521 to |
Changed commit from |
comment:31
See #16504 for a follow-up. |
comment:32
Actually make the change: #19522 |
Following the discussion on Sage-devel [1], default LP variables will become "real" instead of nonnegative as it is the case at the moment.
The aim is to have 4 types available through
new_variable()
: binary, integer, nonnegative, and real. Right now, nonnegative does not exist, and "real" represents nonnegative variables.What this ticket does:
A warning has to be displayed when
new_variable()
is called without arguments, as the default behaviour will change. Users are advised to addnonnegative=True
instead.A warning has to be displayed when
new_variable(real=True)
is called, for it represents nonnegative variables at the moment and will represent real variables later. Users are advised to switch tononnegative=True
instead.Nathann
[1] https://groups.google.com/d/msg/sage-devel/3vrPzUqFpM4/hKFp0RjV8poJ
Depends on #15489
CC: @dimpase @vbraun @dcoudert @sagetrac-hartke @wdjoyner @johnperry-math @benjaminfjones
Component: linear programming
Author: Nathann Cohen
Branch:
980c202
Reviewer: Benjamin Jones
Issue created by migration from https://trac.sagemath.org/ticket/15521
The text was updated successfully, but these errors were encountered: