sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.41k stars 475 forks source link

Set factories #10194

Closed nthiery closed 9 years ago

nthiery commented 13 years ago

At Sage days 30, a long brainstorm seems to have finalized the design. Here is a excerpt from the documentation:

A set factory F is device, whose goal is to construct parent P which models subsets of a big set S. Typically, the P s are constructed within families obtained by putting a bunch of constraints cons on the elements of the set S. In such a hierarchy of subsets, one needs to have a fine and easy control on the elements construction. That is, one often needs that P constructs elements in a subclass of its usual class for element. On the contrary, one also often needs P to be a facade parent, meaning that P construct element whose actual parent is not P itself.

The role of a set factory is twofold:

The patch implement this idea while trying to leave as much as possible space for further improvement. In particular, I tried to specify the few possible things about constraints. I'm even not completely sure about add_constraints. Please comment and review.

Florent

CC: @sagetrac-sage-combinat @hivert

Component: combinatorics

Keywords: factories, days30, Cernay2012, days57

Author: Florent Hivert

Branch/Commit: 763f93c

Reviewer: Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/10194

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from 0eeecd1 to 16ca519

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

f823667Minor doc improvements
16ca519Merge branch 'public/ticket/10194' of trac.sagemath.org:sage into t/10194/factories_policy
fchapoton commented 10 years ago
comment:43

what about the pyflakes warning ? could you take care of that please ?

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

364a0c0Merge branch 'public/ticket/10194' of ssh://trac.sagemath.org:22/sage into 10194
014d842trac #10194 details and formatting
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from 16ca519 to 014d842

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from 014d842 to e061484

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

4895320Merge branch 'public/ticket/10194' of ssh://trac.sagemath.org:22/sage into 10194
e061484trac #10194 removed the category method (was useless and wrong ?)
fchapoton commented 10 years ago

Changed work issues from pyflakes warning to none

fchapoton commented 10 years ago
comment:48

At last, got a green report from the bot. Florent, do you think that this is ready ?

fchapoton commented 10 years ago

Reviewer: Frédéric Chapoton

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from e061484 to 87a475c

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

87a475cMerge branch 'public/ticket/10194' of ssh://trac.sagemath.org:22/sage into 10194
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from 87a475c to 641c28a

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

641c28atrac #10194 minor doc changes
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

3c12f5fMerge with 6.3.beta4
ed7f340trac #10194 found a few typo again
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from 641c28a to ed7f340

fchapoton commented 10 years ago
comment:53

@hivert : What is the meaning of the sentences

Put a nice warning _single_pair

and

Comment that and put link to documentation caveat....

in the example file ?

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

20f17b3Merge branch 'public/ticket/10194' of trac.sagemath.org:sage into 6.4.b6
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from ed7f340 to 20f17b3

fchapoton commented 10 years ago
comment:55

@hivert : PING, cf comment 53

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 20f17b3 to 52550e0

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

52550e0Merge branch 'develop' into t/10194/public/ticket/10194
fchapoton commented 9 years ago
comment:57

9 failing doctests, see patchbot report

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

ab1507cRe-reading set factories
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 52550e0 to ab1507c

hivert commented 9 years ago
comment:59

Replying to @fchapoton:

9 failing doctests, see patchbot report

Hi Frederic,

I should have fixed most of the problems (including comment 53). I still need a last pass of re-reading before putting it as needs review.

Florent

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

586248eVarious cleanup in the documentation
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from ab1507c to 586248e

hivert commented 9 years ago
comment:61

This should be ready for review

Florent

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

763f93cMerge tag '6.7' into t/10194/factories_policy
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 586248e to 763f93c

fchapoton commented 9 years ago
comment:63

Was there any need for a merge ? By the way, I usually do the merge in the other direction. This gives much smaller commits, as you can see in the commit list.

hivert commented 9 years ago
comment:64

Replying to @fchapoton:

Was there any need for a merge ? By the way, I usually do the merge in the other direction. This gives much smaller commits, as you can see in the commit list.

No there wasn't, but my goal is to update trees to use factories and ultimately to do computation in operads. As you merged 6.7 in operads I also merged this one to avoid going back and forth.

There is not diff before and after the merge so that you can review on the unmerged version.

fchapoton commented 9 years ago
comment:65

ok, let this get in. There are several combinatorial tickets on top of it.

fchapoton commented 9 years ago

Description changed:

--- 
+++ 
@@ -1,4 +1,4 @@
-At Sage days 30, a long brainstorm seems to have finalized the design. Here is a exerpt from the documentation:
+At Sage days 30, a long brainstorm seems to have finalized the design. Here is a excerpt from the documentation:

 A *set factory* `F` is device, whose goal is to construct parent `P`
 which models subsets of a big set `S`. Typically, the `P` s are constructed
fchapoton commented 9 years ago

Description changed:

--- 
+++ 
@@ -26,4 +26,3 @@

 Florent

-**Apply :** [trac_10194-factories_policy-fh.patch](https://github.com/sagemath/sage-prod/files/10651310/trac_10194-factories_policy-fh.patch.gz)
vbraun commented 9 years ago

Changed branch from public/ticket/10194 to 763f93c