Import test prototype

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

Import test prototype

prculley
Gentlemen:

I've decided its time to see what you think my prototype of the Gramps import testing module.
Code is here:
 https://github.com/prculley/gramps/tree/test_imports/gramps/plugins/test.
An associated add-on is here:
 https://github.com/gramps-project/addons-source/tree/master/DetId
A wiki page with descriptions is here:
 https://gramps-project.org/wiki/index.php?title=Test_Imports_module

A note about the actual imported test files:
Paris.ged A test that would fail for bugs 9173 and 9416
sample.ged
sample.gramps
test_FTM_CONC.ged
test_FTM_CONC.gramps
vcard.difs
vcard.gramps
vcard.vcf


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Fwd: Import test prototype

prculley
Sorry, original got sent before I was finished.

Gentlemen:

I've decided its time to see what you think my prototype of the Gramps import testing module.
Code is here:
 https://github.com/prculley/gramps/tree/test_imports/gramps/plugins/test.
An associated add-on is here:
 https://github.com/gramps-project/addons-source/tree/master/DetId
A wiki page with descriptions is here:
 https://gramps-project.org/wiki/index.php?title=Test_Imports_module

A note about the actual imported test files (not in wiki):
bug 8322 test.ged  A test that shows up if bugs 9414, 9415, 9425, 9430 are not patched
FTM_16dec2015a-mod1.ged  A test that shows up if bug 8809 is not patched
MixInlineXrefNote.ged    A test that shows up if bug 9465 is not patched
MixInlineXrefNote.grampsParis.ged      A test that would fail for bugs 9173 and 9416
sample.ged         From the gramps source tree.
test_FTM_CONC.ged  Displays a bug not yet entered into the bug tracker (and desired response)
vcard.difs         An exception file that allows the bug 9458 to pass
vcard.vcf          A test of Vcard importer, shows a bug 9458, not yet patched

Please let me know if this needs more work, or any other comments...

Paul Culley



------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Import test prototype

DS Blank
On Mon, May 23, 2016 at 7:11 PM, Paul Culley <[hidden email]> wrote:
Sorry, original got sent before I was finished.

Gentlemen:

Paul, and devs,
 

I've decided its time to see what you think my prototype of the Gramps import testing module.

Looks very nice! Some questions:

Do all of the test files have licenses that allow us to use? Do we need additional README/LICENSE files?

Can you put those in gramps/example/...? Maybe a special test folder would be appropriate.

Can you make a PR for master? You don't need (and I don't think want) to make an addon for this function. If it is generally useful for testing, you could put it in gramps/test/test_utils.py, or just keep it local to test_imports.py

Thanks! Great addition.

-Doug

 
A note about the actual imported test files (not in wiki):
bug 8322 test.ged  A test that shows up if bugs 9414, 9415, 9425, 9430 are not patched
FTM_16dec2015a-mod1.ged  A test that shows up if bug 8809 is not patched
MixInlineXrefNote.ged    A test that shows up if bug 9465 is not patched
MixInlineXrefNote.grampsParis.ged      A test that would fail for bugs 9173 and 9416
sample.ged         From the gramps source tree.
test_FTM_CONC.ged  Displays a bug not yet entered into the bug tracker (and desired response)
vcard.difs         An exception file that allows the bug 9458 to pass
vcard.vcf          A test of Vcard importer, shows a bug 9458, not yet patched

Please let me know if this needs more work, or any other comments...

Paul Culley



------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel



------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Import test prototype

DS Blank
I'm CCing the mailing list too, as others may want to chime in.

On Tue, May 24, 2016 at 11:09 AM, Paul Culley <[hidden email]> wrote:
>Do all of the test files have licenses that allow us to use? Do we need additional README/LICENSE files?

The files are all either artificial hand created (by me) or seriously edited off of the files found in the bug tracker (public).  In the case of the vcard.vcf, I intercepted the intermediate output of the original vcard test as a .vcf file.
I expect to add more in the future from various sources, but I assume (perhaps erroneously) that if the authors say it is available for test purposes, then we can use it for that here.  I recognize that we need to avoid copyright issues, and will generally try to limit my files to artificially generated ones.

As long as this data has the proper copyrights/permission, we should be fine. One should be able to tell with a glance that we are following proper licensing.
 

>Can you put those in gramps/example/...? Maybe a special test folder would be appropriate.

Well, they are in a special test folder; the Tstdata sub-folder of the plugins/test folder.  If you would rather have them somewhere else, tell me where.  I initially rejected gramps/example/ because I did not think most users would ever care about this stuff.  As I have it now it looks like the package generation process removes files in 'test' directories, so this stuff would vanish for distribution where it is located now.  Also it was not too hard to programmatically find the files where they are now, I'm not so sure that writing code to find them in gramps/example/ would be as easy with the way things get shifted around for distribution.

I think it would be better to put these files someplace other than a random test directory. You are right that users don't want to see these, but developers should be able to find them, and perhaps make use of them in other tests.

I suggest master/example/tests/ or master/data/tests/. Whatever we chose, these should not be included in packaging.

 
 
>Can you make a PR for master?

I can, if you think it is close enough, or prefer that; I just did not think that you would integrate with master so quick without some side testing.

PR's are exactly for this. It makes them easier to test and compare what changes with existing code. PRs can start as WIP (work in progress) and each commit to that branch will be included in the PR automatically. When done, we merely click on "merge".
 


>You don't need (and I don't think want) to make an addon for this function. If it is generally useful for testing, you could put it in gramps/test/test_utils.py, or just keep it local to test_imports.py

The add-on is used exclusively by developers during the test creation process.  I could have added a config option, to be used only when starting Gramps for test creation, but that would have involved changing more source files.  And I tend to be more GUI oriented myself anyway.  So I created the add-on just to set the 'mode' of the ID generation.

Gramps addons is for users, not developers. This could confuse users.

I see the problem though: you want a low-level function, create_id(), to be able to respond differently. In a proper design, I guess we would have a class we could override with a different create_id method. Given that our code is far from that, I am concerned about creating (and thus exposing) a config option.

I'm usually against the idea of "monkey patching" but these tests may warrant the use for now. If you aren't familiar with the idea in Python, it might look something like:

>>> gramps.gen.utils.id.create_id = my_new_create_id

Then subsequent imports will use your new function. 

But perhaps other developers may have a better solution that would work for this, and other variations in the future.

-Doug

 

>Thanks! Great addition.

>-Doug

 
A note about the actual imported test files (not in wiki):
bug 8322 test.ged  A test that shows up if bugs 9414, 9415, 9425, 9430 are not patched
FTM_16dec2015a-mod1.ged  A test that shows up if bug 8809 is not patched
MixInlineXrefNote.ged    A test that shows up if bug 9465 is not patched
MixInlineXrefNote.grampsParis.ged      A test that would fail for bugs 9173 and 9416
sample.ged         From the gramps source tree.
test_FTM_CONC.ged  Displays a bug not yet entered into the bug tracker (and desired response)
vcard.difs         An exception file that allows the bug 9458 to pass
vcard.vcf          A test of Vcard importer, shows a bug 9458, not yet patched

Please let me know if this needs more work, or any other comments...

Paul Culley



------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel





------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel