(no subject)

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

Gary Burton
Hello Brian

>This is an excellent observation and suggestion. I think a great feature addition
>(for ALL export options) would be a new check box labeled "remove unreferenced objects".
>When this box is checked, Gramps would apply the filters as requested by the user, and
>then proceed to remove objects without references. It would perform the object clean up over
>and over until no more objects are removed.

I'm looking at implementing this feature. I'm thinking of doing this in __init__ of FilterProxyDb if filters have been applied and modifying the various "get" methods for places, sources, media etc to return from lists of remaining references rather than passing through to the equivalent "get" method in the database. Do you think this is the right approach?

Bye

Gary



      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Brian Matherly
Gary,

> >This is an excellent observation and suggestion. I
> think a great feature addition
> >(for ALL export options) would be a new check box
> labeled "remove unreferenced objects".
> >When this box is checked, Gramps would apply the
> filters as requested by the user, and
> >then proceed to remove objects without references. It
> would perform the object clean up over
> >and over until no more objects are removed.
>
> I'm looking at implementing this feature. I'm
> thinking of doing this in __init__ of FilterProxyDb if
> filters have been applied and modifying the various
> "get" methods for places, sources, media etc to
> return from lists of remaining references rather than
> passing through to the equivalent "get" method in
> the database. Do you think this is the right approach?
>

Adding support for more filter types other than person and event to the filter proxy would be great. But I don't think it would resolve the issue that started this conversation. The original problem had to do with notes being included in the export even if they were only ever referenced by people who were excluded from the export.

But feel free to move ahead with this as it would be a great addition to Gramps. You should be able to work from example from the existing filters that are supported, but feel free to ask questions if you get stuck.

~Brian

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Benny Malengier
In reply to this post by Gary Burton


2008/6/29 Gary Burton <[hidden email]>:
Hello Brian

>This is an excellent observation and suggestion. I think a great feature addition
>(for ALL export options) would be a new check box labeled "remove unreferenced objects".
>When this box is checked, Gramps would apply the filters as requested by the user, and
>then proceed to remove objects without references. It would perform the object clean up over
>and over until no more objects are removed.

I'm looking at implementing this feature. I'm thinking of doing this in __init__ of FilterProxyDb if filters have been applied and modifying the various "get" methods for places, sources, media etc to return from lists of remaining references rather than passing through to the equivalent "get" method in the database. Do you think this is the right approach?

Do you mean the filterproxy of the filter for persons would have a get method for place that gives None if the place is not connected to a person that is in the filter?

If so, I cannot think of any way to make this performant, so I don't think this is the way to go. Remember that FilterProxyDb is not only used for export, but also in reports.

I can only think of two approaches:
1/save the result of the export, then apply the remove unused objects tool on the export in a batch mode. This gives what the users was presently asking, applies to exports that support it only, and the relevant code is in the remove unused objects tool. A check box to activate it would be needed, as it can lead also to unwanted behaviour.
 
2/create FilterproxyDbPlace, FilterproxyDbSource, ... and allow for selection of filters on other objects too, not connected to the person filter. This gives for easy implemented proxy dbs with no complicated logic that can cause large overhead. Then a fine grained control is possible, but a complicated GUI is needed so that the user can actually use all this power.

Having looked in the db and proxy db classes, I would prefer keeping them simple, as they can be used in unexpected ways (due to the combination of different proxy's), and they are known already to be slow. They also have to support almost all non-write db methods, so doing magic only in the __init__ is not going to work I think without setting up a complete cache of the allowed db handles in memory.

Benny



Bye

Gary



     __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Duncan Lithgow-2
>> >(for ALL export options) would be a new check box labeled "remove
>> > unreferenced objects".

Can we call this "ignore unreferenced objects" or something similar?
We don't want this to be confused with actually removing unreferenced
objects from the database.

Duncan

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Brian Matherly
> >> >(for ALL export options) would be a new check
> box labeled "remove
> >> > unreferenced objects".
>
> Can we call this "ignore unreferenced objects" or
> something similar?
> We don't want this to be confused with actually
> removing unreferenced
> objects from the database.

Good point. How about "Exclude unreferenced objects"?

~Brian

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Eero Tamminen-3
Hi,

On Tuesday 01 July 2008, Brian Matherly wrote:

> > >> >(for ALL export options) would be a new check
> >
> > box labeled "remove
> >
> > >> > unreferenced objects".
> >
> > Can we call this "ignore unreferenced objects" or
> > something similar?
> > We don't want this to be confused with actually
> > removing unreferenced
> > objects from the database.
>
> Good point. How about "Exclude unreferenced objects"?

Sounds very technical (both unreferences and objects)...

Does Aunt Martha understand what is intended? :-)


        - Eero

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Stéphane Charette-2
On Tue, Jul 1, 2008 at 13:06, Eero Tamminen <[hidden email]> wrote:

> Hi,
>
> On Tuesday 01 July 2008, Brian Matherly wrote:
>> > >> >(for ALL export options) would be a new check
>> >
>> > box labeled "remove
>> >
>> > >> > unreferenced objects".
>> >
>> > Can we call this "ignore unreferenced objects" or
>> > something similar?
>> > We don't want this to be confused with actually
>> > removing unreferenced
>> > objects from the database.
>>
>> Good point. How about "Exclude unreferenced objects"?
>
> Sounds very technical (both unreferences and objects)...
>
> Does Aunt Martha understand what is intended? :-)


Remind me again why this isn't the default behaviour -- why do we want
to make this into an option?

Stéphane

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Benny Malengier


2008/7/2 Stéphane Charette <[hidden email]>:
On Tue, Jul 1, 2008 at 13:06, Eero Tamminen <[hidden email]> wrote:
> Hi,
>
> On Tuesday 01 July 2008, Brian Matherly wrote:
>> > >> >(for ALL export options) would be a new check
>> >
>> > box labeled "remove
>> >
>> > >> > unreferenced objects".
>> >
>> > Can we call this "ignore unreferenced objects" or
>> > something similar?
>> > We don't want this to be confused with actually
>> > removing unreferenced
>> > objects from the database.
>>
>> Good point. How about "Exclude unreferenced objects"?
>
> Sounds very technical (both unreferences and objects)...
>
> Does Aunt Martha understand what is intended? :-)


Remind me again why this isn't the default behaviour -- why do we want
to make this into an option?

If you export your entire database, you probably don't want to loose the unreferenced objects, which might be there for a reason.
The remove unused objects tool allows you to select which ones to delete, if everybody always wanted to delete all unused objects this would not be necessary.

So in short, all export of all data (backup, posting) should not remove the unreferenced objects.
As another use case, I want to share data with a fellow researcher, or start a separate branch. I would want to retain _all_ my place and repository information, but don't need my unreferenced events and sources. Again, deletion of all unreferenced objects would be doing to much.

Benny


Stéphane

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Gary Burton
In reply to this post by Gary Burton
>Remind me again why this isn't the default behaviour -- why do we want
>to make this into an option?

I wonder too whether we need to make this an option. I only see two situations:

1) The user wants to export a subset of their data using one of the filters and/or by setting the private/living flags. In this case we only export objects connected to the results of the filter which we achieve by ignoring any unreferenced objects.

2) The user exports without filters, in which case they get all unreferenced objects.

Are there any other use cases where a user might want to filter their data but also get objects unconnected to the result of the filter?

Bye

Gary



      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel