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
Change default behaviour of Poset to facade = True #13747
Comments
comment:2
facade=None just means that the facade option is not specified at this stage. The default value will be decided at a lower level, or from the context. Please edit the description to something more constructive (that you don't know the rationale for something doesn't mean that there is no rationale in the first place and that you can insult at will those who wrote it). Once done, you can erase this comment too. |
comment:3
Replying to @nthiery:
Hey Nicolas, when you DO WRITE in the documentation that a thing is binary, make it binary. Else, you HAVE TO explain what None means. What you have in your head when you look at code stays in your head. What am I guilty of in this case ? Not guessing what you intended ? There are PROBLEMS with the combinat documentation, and each time a stupid guy like me is wasting his week-end and going to sleep at 4am in order to fix your bugs and write your documentation (and bear in mind that it is precisely what is happening right now), this mess is improving a bit. But there is no reason why I should be expected to know what should have been written in the file all along. Nathann |
comment:5
Still editing the doc. I am about to try to replace some Nathann |
comment:6
Patch updated ! With a brand new doc for posets. I fixed the doc (the functions that have an optional I hope that this class is better now than it was before. Cheers ! Nathann |
comment:7
By the way, I just took another look at the documentation of Posets, and I wondered whether something may be added in the file's header to say that Nathann |
comment:9
Hello Nathann, a few remarks from my side:
Cheers Christian |
comment:10
Hellooooooo Christian !!!
Cool
Ahem. I believe so, too... But from the comments on this ticket you can see that I just said there what Nicolas gave me to chew. What this ticket initially contained is a warning like "There are three values for a boolean instead of three, the third is not well defined and should not be trusted -- it should be removed eventually or documented". But well, Nicolasgave me that explanation and honestly I do not mind much leaving it like that for the moment -- it is still much better than before and it will take manyyyyyyyyyyyyyyyy patches before this file is cleaned. Besides, that's not a "local" problem. Facades are used in many places and I do not expect their documentation to be very different.
was done on purpose of forgotten Oh. Yeah, easy. Many explanations usually : as the new default is Not that on some other occasions the documentation says "let us us
Oh ? Noooooooooo ! Actually, what I want to write is "whether the Poset's elements", but I wrapped Poset inside of a Nathann |
comment:11
(just had a chat with Nicolas Thiery, who told me that Patch updated. Still waiting for a review ! Nathann |
comment:12
Hello Nathann, I only had the time to run a few tests up to now:
These are the failures:
Christian |
Reviewer: Christian Kuper |
comment:13
Thank you so much for telling me... God. I did not think tht it would be that bad You will get it today. Thanks again. Nathann |
comment:14
Looks like I finally found my way through this chaos ! The only problems actually came from a couple of files, and everything was solved once this was fixed. I still have a problem with a couple of doctests in geometry/cone.py, and ask for some help on sage-devel. https://groups.google.com/d/topic/sage-devel/Bbs_65wxKY8/discussion If it turns out to be harmless, I will just change the doctests and this patch will be ready for a review Nathann |
comment:15
Apply trac_13747.patch, trac_13747-doctests.patch |
comment:16
Solved ! And easily ! Thanks to Volker ! Nathann |
comment:23
Ok, I feel comfortable with the patch. As there seem to be no more open issues I will set it to positive review. |
comment:24
Thaaaaaaaaanks ! Nathann |
comment:25
Thanks for the patch and the review. Now the next step is to send a big fat warning on sage-combinat-devel and sage-devel about this backward incompatible change! |
Dependencies: #11763 |
Attachment: trac_13747.patch.gz |
comment:28
Attachment: trac_13747-doctests.patch.gz Patches updates, I'm running tests right now. Nathann |
comment:29
Apply trac_13747.patch, trac_13747-doctests.patch, trac_13747_reviewer.patch |
This comment has been minimized.
This comment has been minimized.
comment:30
Because of new occurrences of ".element" in 11763, this ticket needs another patch to pass doctests... It's just about removing those occurrences, nothing smart involved. Apply trac_13747.patch, trac_13747-doctests.patch, trac_13747_reviewer.patch, trac_13747-rebase-11763.patch |
comment:31
Attachment: trac_13747-rebase-11763.patch.gz
|
comment:32
Oh. This is because of #12930 that got merged in the meantime. Nathann |
comment:33
Updated ! The most sensible was to change the doctest's output. Nathann |
Attachment: trac_13747-rebase-12930.patch.gz |
This comment has been minimized.
This comment has been minimized.
Merged: sage-5.6.beta2 |
As mentionned in the following discussions :
This patch changes the default behaviour of the Poset constructor to facade = True, so that the elements that you define the Poset with are the elements it contains.
Two comments about this ticket :
facade
is a boolean, it is not. Its former default value is actuallyNone
, and the code itself tests several timesif facade is None
. No idea why. All I know is that I first tried to make it really boolean, and to replace thoseNone
tests byif not facade
, but I was not able to make all tests pass without any idea why. I added a warning about this in the file's header, and the doctests based on the former versions of Posets are now defined with afacade = None
flag. Even though it should be a boolean. Well, if this wasn't a problem before, no reason why it should become one now. This clearly has to be fixed too.Poset.linear_extensions
method whose default behaviour is alsofacade = None
. Despite taking an optional flag, this method DOES NOT WORK as it is clearly indicated in its docstring. One can easily wonder what the hell this function is doing in Sage's code. Hence this function's behaviour is left untouched. It will usefacade=None
by default until it is rewritten correctly, or removed.Nathann
Apply:
Depends on #11763
Depends on #12930
CC: @nthiery @hivert @dimpase
Component: combinatorics
Author: Nathann Cohen
Reviewer: Christian Kuper
Merged: sage-5.6.beta2
Issue created by migration from https://trac.sagemath.org/ticket/13747
The text was updated successfully, but these errors were encountered: