GEPS 008: File Organization

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

GEPS 008: File Organization

Nick Hall-6
Devs,

I am doing some work on GEPS 008 at the moment.

Hopefully I will leave trunk in a working condition after each commit.  
Please let me know if you notice and problems or unexpected errors.  
Unfortunately I have made one mistake so far when renaming the filters.

The latest commit, which moved the glade directory under src/gui, made a
change to const.py - please run make.

./autogen.sh
make

I will try to keep the documentation in the GEPS up-to-date.

http://www.gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization

Regards,

Nick.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

John Ralls-2

On May 26, 2012, at 10:45 AM, Nick Hall wrote:

> Devs,
>
> I am doing some work on GEPS 008 at the moment.
>
> Hopefully I will leave trunk in a working condition after each commit.  
> Please let me know if you notice and problems or unexpected errors.  
> Unfortunately I have made one mistake so far when renaming the filters.
>
> The latest commit, which moved the glade directory under src/gui, made a
> change to const.py - please run make.
>
> ./autogen.sh
> make
>
> I will try to keep the documentation in the GEPS up-to-date.
>
> http://www.gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization
>

Nick,

Is there some reason you're not doing this in a feature branch?

Regards,
John Ralls



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

Nick Hall-6
On 26/05/12 19:57, John Ralls wrote:

> On May 26, 2012, at 10:45 AM, Nick Hall wrote:
>
>> Devs,
>>
>> I am doing some work on GEPS 008 at the moment.
>>
>> Hopefully I will leave trunk in a working condition after each commit.
>> Please let me know if you notice and problems or unexpected errors.
>> Unfortunately I have made one mistake so far when renaming the filters.
>>
>> The latest commit, which moved the glade directory under src/gui, made a
>> change to const.py - please run make.
>>
>> ./autogen.sh
>> make
>>
>> I will try to keep the documentation in the GEPS up-to-date.
>>
>> http://www.gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization
>>
> Nick,
>
> Is there some reason you're not doing this in a feature branch?
>
> Regards,
> John Ralls
>

I don't see any point in creating a separate branch for this.  It would
only create extra work.

These changes would really benefit from testing in trunk as early as
possible.

Let me know if you encounter any problems.

Nick.



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

DS Blank
On Sat, May 26, 2012 at 7:14 PM, Nick Hall <[hidden email]> wrote:

> On 26/05/12 19:57, John Ralls wrote:
>> On May 26, 2012, at 10:45 AM, Nick Hall wrote:
>>
>>> Devs,
>>>
>>> I am doing some work on GEPS 008 at the moment.
>>>
>>> Hopefully I will leave trunk in a working condition after each commit.
>>> Please let me know if you notice and problems or unexpected errors.
>>> Unfortunately I have made one mistake so far when renaming the filters.
>>>
>>> The latest commit, which moved the glade directory under src/gui, made a
>>> change to const.py - please run make.
>>>
>>> ./autogen.sh
>>> make
>>>
>>> I will try to keep the documentation in the GEPS up-to-date.
>>>
>>> http://www.gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization
>>>
>> Nick,
>>
>> Is there some reason you're not doing this in a feature branch?
>>
>> Regards,
>> John Ralls
>>
>
> I don't see any point in creating a separate branch for this.  It would
> only create extra work.
>
> These changes would really benefit from testing in trunk as early as
> possible.
>
> Let me know if you encounter any problems.

Nick,

One little problem. I think we need this:

Index: src/plugins/lib/libgedcom.py
===================================================================
--- src/plugins/lib/libgedcom.py (revision 19665)
+++ src/plugins/lib/libgedcom.py (working copy)
@@ -120,7 +120,7 @@
 import gen.mime
 import LdsUtils
 import Utils
-from gen.datehandler._DateParser import DateParser
+import gen.datehandler._dateparser as DateParser
 from gen.db.dbconst import EVENT_KEY
 from QuestionDialog import WarningDialog
 from gen.lib.const import IDENTICAL, DIFFERENT

But exporting in Gedcom (actually just loading the Gedcom Exporter)
gives an error:

Traceback (most recent call last):
  File "/home/dblank/gramps/trunk/src/gen/plug/_manager.py", line 219,
in load_plugin
    _module = self.import_plugin(pdata)
  File "/home/dblank/gramps/trunk/src/gen/plug/_manager.py", line 256,
in import_plugin
    module = __import__(pdata.mod_name)
  File "/home/dblank/gramps/trunk/src/plugins/import/ImportGedcom.py",
line 49, in <module>
    import libgedcom
  File "/home/dblank/gramps/trunk/src/plugins/lib/libgedcom.py", line
655, in <module>
    class GedcomDateParser(DateParser):
TypeError: Error when calling the metaclass bases
    module.__init__() takes at most 2 arguments (3 given)
None
ERROR: ImportGedcom.py Error when calling the metaclass bases
    module.__init__() takes at most 2 arguments (3 given)

Has something else changed?

-Doug

> Nick.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

Nick Hall-6
On 27/05/12 00:24, Doug Blank wrote:

> On Sat, May 26, 2012 at 7:14 PM, Nick Hall<[hidden email]>  wrote:
>> On 26/05/12 19:57, John Ralls wrote:
>>> On May 26, 2012, at 10:45 AM, Nick Hall wrote:
>>>
>>>> Devs,
>>>>
>>>> I am doing some work on GEPS 008 at the moment.
>>>>
>>>> Hopefully I will leave trunk in a working condition after each commit.
>>>> Please let me know if you notice and problems or unexpected errors.
>>>> Unfortunately I have made one mistake so far when renaming the filters.
>>>>
>>>> The latest commit, which moved the glade directory under src/gui, made a
>>>> change to const.py - please run make.
>>>>
>>>> ./autogen.sh
>>>> make
>>>>
>>>> I will try to keep the documentation in the GEPS up-to-date.
>>>>
>>>> http://www.gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization
>>>>
>>> Nick,
>>>
>>> Is there some reason you're not doing this in a feature branch?
>>>
>>> Regards,
>>> John Ralls
>>>
>> I don't see any point in creating a separate branch for this.  It would
>> only create extra work.
>>
>> These changes would really benefit from testing in trunk as early as
>> possible.
>>
>> Let me know if you encounter any problems.
> Nick,
>
> One little problem. I think we need this:
>
> Index: src/plugins/lib/libgedcom.py
> ===================================================================
> --- src/plugins/lib/libgedcom.py (revision 19665)
> +++ src/plugins/lib/libgedcom.py (working copy)
> @@ -120,7 +120,7 @@
>   import gen.mime
>   import LdsUtils
>   import Utils
> -from gen.datehandler._DateParser import DateParser
> +import gen.datehandler._dateparser as DateParser
>   from gen.db.dbconst import EVENT_KEY
>   from QuestionDialog import WarningDialog
>   from gen.lib.const import IDENTICAL, DIFFERENT
>
> But exporting in Gedcom (actually just loading the Gedcom Exporter)
> gives an error:
>
> Traceback (most recent call last):
>    File "/home/dblank/gramps/trunk/src/gen/plug/_manager.py", line 219,
> in load_plugin
>      _module = self.import_plugin(pdata)
>    File "/home/dblank/gramps/trunk/src/gen/plug/_manager.py", line 256,
> in import_plugin
>      module = __import__(pdata.mod_name)
>    File "/home/dblank/gramps/trunk/src/plugins/import/ImportGedcom.py",
> line 49, in<module>
>      import libgedcom
>    File "/home/dblank/gramps/trunk/src/plugins/lib/libgedcom.py", line
> 655, in<module>
>      class GedcomDateParser(DateParser):
> TypeError: Error when calling the metaclass bases
>      module.__init__() takes at most 2 arguments (3 given)
> None
> ERROR: ImportGedcom.py Error when calling the metaclass bases
>      module.__init__() takes at most 2 arguments (3 given)
>
> Has something else changed?

Thanks for pointing this out.  I am only moving directories and renaming
files to lower case.  This is clearly a filename change that I missed.

I'll look at the error.  It could have something to do with my changes.

Nick.


> -Doug
>
>> Nick.
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

Nick Hall-6
On 27/05/12 10:43, Nick Hall wrote:
> I'll look at the error.  It could have something to do with my changes.
This was a result of my changes.  You almost fixed it, but didn't quite
get the import right.

I have now fixed it along with a couple of related issues.  Sorry for
the inconvenience.

Nick.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

robhealey1
In reply to this post by John Ralls-2
Greetings:

I know that it is best practise and case for trunk NOT to be unstable or left unusable, but I think this is an acceptable time and place for it!

Even though it is NOT being done!

If it were to be left unusable for nth amount of time, then it might have been best in a branch, but as we can see, Nick is right on top of it and in constant control of it...

Sincerely yours,
Rob G. Healey


On Sun, May 27, 2012 at 10:07 AM, John Ralls <[hidden email]> wrote:
Rob,

On May 26, 2012, at 10:38 PM, Rob Healey wrote:

Dear John:

You are correct that people do all kinds of different things for all kinds of different reasons!

Sometimes it makes sense and sometimes it does not!

I was just going off the fact that Brian didn't when he was doing GEPS008 things!  There were a few times when he moved a large amount of files if I remember that far back???

What another developer might have done or not done in the past isn't really germane. Doing a major change in a branch instead of on the trunk is now considered a "best practice"; it might not have been at the time you're remembering.  


On Sun, May 27, 2012 at 12:08 AM, John Ralls <[hidden email]> wrote:

On May 26, 2012, at 6:57 PM, Rob Healey wrote:

> Greetings:
>
> I do not understand the need for a new GEPS branch for this as there has NOT been any need for one in the past work done that Brian has done either...
>

It's not a "need" per se. It's just common practice when one is working on something potentially disruptive, and lots of file moves certainly can be. Heck, some people open a branch for non-trivial bug fixes.

Did you mean for this not to be on the list?

Yes, I meant for it to go to you only!  I didn't want to seem as if I were bullying you in front of everyone!

I know that I have made mistakes in the past, of whom my audience was, when I made certain comments and embarrassed someone when it wasn't meant...

Yeah, me too.

I know that this type of work can be disruptive as there are so many different things being done at once, but I do believe that it might be very complicated or hard to get things back into the repository afterwards!

It never leaves the repository, the work is just kept separate from the part that everyone else is working on until it's fully tested. With subversion, merging can be a pain if trunk has seen a lot of changes in parallel with the branch because it doesn't (or rather didn't before svn-1.7) handle multiple merges very well. That's one of the major advantages of git over subversion: It's easy to bring the branch up to date before merging it back in. It's also easy to do multiple merges from the branch back to trunk (which is usually called "master" in git repositories). But for a set of changes which is entirely renames, there isn't likely to be any difficulty merging unless someone else does a rename on trunk while the major work is in progress on the branch.

 The advantage of doing major changes on a branch is that tt allows the developer working on the branch to commit partial changes that make a nice "chunk" that's easily described in a commit message, but which might not leave the branch in a buildable state. Nick's comment that "Hopefully I will leave trunk in a working condition after each commit" ([hidden email],17:45 Z 26 May 2012) was an indication to me that a feature branch is indicated.

Regards,
John Ralls



--
Sincerely yours,
Rob G. Healey



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

Benny Malengier
The way I look at it, we always break trunk hard early in a devel cycle, so as to force people to run 3.4 branch for their work :-)

Especially now, trunk might see upgrade to distutils, pygobject, ..., so should really be for testing only.

Benny

2012/5/27 Rob Healey <[hidden email]>
Greetings:

I know that it is best practise and case for trunk NOT to be unstable or left unusable, but I think this is an acceptable time and place for it!

Even though it is NOT being done!

If it were to be left unusable for nth amount of time, then it might have been best in a branch, but as we can see, Nick is right on top of it and in constant control of it...

Sincerely yours,
Rob G. Healey


On Sun, May 27, 2012 at 10:07 AM, John Ralls <[hidden email]> wrote:
Rob,

On May 26, 2012, at 10:38 PM, Rob Healey wrote:

Dear John:

You are correct that people do all kinds of different things for all kinds of different reasons!

Sometimes it makes sense and sometimes it does not!

I was just going off the fact that Brian didn't when he was doing GEPS008 things!  There were a few times when he moved a large amount of files if I remember that far back???

What another developer might have done or not done in the past isn't really germane. Doing a major change in a branch instead of on the trunk is now considered a "best practice"; it might not have been at the time you're remembering.  


On Sun, May 27, 2012 at 12:08 AM, John Ralls <[hidden email]> wrote:

On May 26, 2012, at 6:57 PM, Rob Healey wrote:

> Greetings:
>
> I do not understand the need for a new GEPS branch for this as there has NOT been any need for one in the past work done that Brian has done either...
>

It's not a "need" per se. It's just common practice when one is working on something potentially disruptive, and lots of file moves certainly can be. Heck, some people open a branch for non-trivial bug fixes.

Did you mean for this not to be on the list?

Yes, I meant for it to go to you only!  I didn't want to seem as if I were bullying you in front of everyone!

I know that I have made mistakes in the past, of whom my audience was, when I made certain comments and embarrassed someone when it wasn't meant...

Yeah, me too.

I know that this type of work can be disruptive as there are so many different things being done at once, but I do believe that it might be very complicated or hard to get things back into the repository afterwards!

It never leaves the repository, the work is just kept separate from the part that everyone else is working on until it's fully tested. With subversion, merging can be a pain if trunk has seen a lot of changes in parallel with the branch because it doesn't (or rather didn't before svn-1.7) handle multiple merges very well. That's one of the major advantages of git over subversion: It's easy to bring the branch up to date before merging it back in. It's also easy to do multiple merges from the branch back to trunk (which is usually called "master" in git repositories). But for a set of changes which is entirely renames, there isn't likely to be any difficulty merging unless someone else does a rename on trunk while the major work is in progress on the branch.

 The advantage of doing major changes on a branch is that tt allows the developer working on the branch to commit partial changes that make a nice "chunk" that's easily described in a commit message, but which might not leave the branch in a buildable state. Nick's comment that "Hopefully I will leave trunk in a working condition after each commit" ([hidden email],17:45 Z 26 May 2012) was an indication to me that a feature branch is indicated.

Regards,
John Ralls



--
Sincerely yours,
Rob G. Healey



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

John Ralls-2
In reply to this post by Nick Hall-6

On May 26, 2012, at 4:14 PM, Nick Hall wrote:

> On 26/05/12 19:57, John Ralls wrote:
>> On May 26, 2012, at 10:45 AM, Nick Hall wrote:
>>
>>> Devs,
>>>
>>> I am doing some work on GEPS 008 at the moment.
>>>
>>> Hopefully I will leave trunk in a working condition after each commit.
>>> Please let me know if you notice and problems or unexpected errors.
>>> Unfortunately I have made one mistake so far when renaming the filters.
>>>
>>> The latest commit, which moved the glade directory under src/gui, made a
>>> change to const.py - please run make.
>>>
>>> ./autogen.sh
>>> make
>>>
>>> I will try to keep the documentation in the GEPS up-to-date.
>>>
>>> http://www.gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization
>>>
>> Nick,
>>
>> Is there some reason you're not doing this in a feature branch?
>>
>> Regards,
>> John Ralls
>>
>
> I don't see any point in creating a separate branch for this.  It would only create extra work.
>
> These changes would really benefit from testing in trunk as early as possible.
>
> Let me know if you encounter any problems.

On Debian Wheezy:
With `./setup.py build`:
copying src/DbState.py -> build/lib.linux-i686-2.7/gramps
error: package directory 'src/DateHandler' does not exist

Building with autotools completes without errors.

runtests.sh fails lots of tests because it can't find favicon.ico:
IOError: [Errno 2] No such file or directory: u'/home/john/gramps-svn/src/images/favicon.ico'

(It has been moved to plugins/webstuff/images.)

RunAllTests.py just fails with
Traceback (most recent call last):
  File "../test/RunAllTests.py", line 113, in <module>
    unittest.TextTestRunner(verbosity=options.verbose_level).run(allTheTests())
  File "../test/RunAllTests.py", line 76, in allTheTests
    return unittest.TestSuite(getTestSuites()[0])
  File "../test/RunAllTests.py", line 73, in getTestSuites
    return (test_suites,perf_suites)
UnboundLocalError: local variable 'test_suites' referenced before assignment

but that's perhaps a separate issue not related to moving the files around.

Regards,
John Ralls



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

Nick Hall-6
John,

Thanks for letting me know about these problems.

On 28/05/12 18:53, John Ralls wrote:
> On Debian Wheezy:
> With `./setup.py build`:
> copying src/DbState.py ->  build/lib.linux-i686-2.7/gramps
> error: package directory 'src/DateHandler' does not exist

Yes, distutils is experimental and it hasn't been updated since I
started the work on GEPS008.  When I have finished the GEPS008 work, I
will continue helping Rob with GEPS026 again.


>
> Building with autotools completes without errors.

I am keeping autotools up-to-date.


>
> runtests.sh fails lots of tests because it can't find favicon.ico:
> IOError: [Errno 2] No such file or directory: u'/home/john/gramps-svn/src/images/favicon.ico'
>
> (It has been moved to plugins/webstuff/images.)
>
> RunAllTests.py just fails with
> Traceback (most recent call last):
>    File "../test/RunAllTests.py", line 113, in<module>
>      unittest.TextTestRunner(verbosity=options.verbose_level).run(allTheTests())
>    File "../test/RunAllTests.py", line 76, in allTheTests
>      return unittest.TestSuite(getTestSuites()[0])
>    File "../test/RunAllTests.py", line 73, in getTestSuites
>      return (test_suites,perf_suites)
> UnboundLocalError: local variable 'test_suites' referenced before assignment
>
> but that's perhaps a separate issue not related to moving the files around.

The src/images directory is on my ToDo list, but I haven't looked at it yet.

The directories that I have re-structured so far contain the filter,
datehandler and merge code.

I am currently working on the GrampsLogger directory and removing the
Assistant.py code, but I haven't committed this yet.

Regards,

Nick.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

John Ralls-2

On May 28, 2012, at 11:56 AM, Nick Hall wrote:

> John,
>
> Thanks for letting me know about these problems.
>
> On 28/05/12 18:53, John Ralls wrote:
>> On Debian Wheezy:
>> With `./setup.py build`:
>> copying src/DbState.py ->  build/lib.linux-i686-2.7/gramps
>> error: package directory 'src/DateHandler' does not exist
>
> Yes, distutils is experimental and it hasn't been updated since I started the work on GEPS008.  When I have finished the GEPS008 work, I will continue helping Rob with GEPS026 again.
>
>
>>
>> Building with autotools completes without errors.
>
> I am keeping autotools up-to-date.
>
>
>>
>> runtests.sh fails lots of tests because it can't find favicon.ico:
>> IOError: [Errno 2] No such file or directory: u'/home/john/gramps-svn/src/images/favicon.ico'
>>
>> (It has been moved to plugins/webstuff/images.)
>>
>> RunAllTests.py just fails with
>> Traceback (most recent call last):
>>   File "../test/RunAllTests.py", line 113, in<module>
>>     unittest.TextTestRunner(verbosity=options.verbose_level).run(allTheTests())
>>   File "../test/RunAllTests.py", line 76, in allTheTests
>>     return unittest.TestSuite(getTestSuites()[0])
>>   File "../test/RunAllTests.py", line 73, in getTestSuites
>>     return (test_suites,perf_suites)
>> UnboundLocalError: local variable 'test_suites' referenced before assignment
>>
>> but that's perhaps a separate issue not related to moving the files around.
>
> The src/images directory is on my ToDo list, but I haven't looked at it yet.
>
> The directories that I have re-structured so far contain the filter, datehandler and merge code.
>
> I am currently working on the GrampsLogger directory and removing the Assistant.py code, but I haven't committed this yet.

Looks like the favicon.ico bust is from a change Doug made almost 2 years ago. It would appear that nobody is actually running the tests. :-(

Regards,
John Ralls


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

DS Blank
On Mon, May 28, 2012 at 3:57 PM, John Ralls <[hidden email]> wrote:

>
> On May 28, 2012, at 11:56 AM, Nick Hall wrote:
>
>> John,
>>
>> Thanks for letting me know about these problems.
>>
>> On 28/05/12 18:53, John Ralls wrote:
>>> On Debian Wheezy:
>>> With `./setup.py build`:
>>> copying src/DbState.py ->  build/lib.linux-i686-2.7/gramps
>>> error: package directory 'src/DateHandler' does not exist
>>
>> Yes, distutils is experimental and it hasn't been updated since I started the work on GEPS008.  When I have finished the GEPS008 work, I will continue helping Rob with GEPS026 again.
>>
>>
>>>
>>> Building with autotools completes without errors.
>>
>> I am keeping autotools up-to-date.
>>
>>
>>>
>>> runtests.sh fails lots of tests because it can't find favicon.ico:
>>> IOError: [Errno 2] No such file or directory: u'/home/john/gramps-svn/src/images/favicon.ico'
>>>
>>> (It has been moved to plugins/webstuff/images.)
>>>
>>> RunAllTests.py just fails with
>>> Traceback (most recent call last):
>>>   File "../test/RunAllTests.py", line 113, in<module>
>>>     unittest.TextTestRunner(verbosity=options.verbose_level).run(allTheTests())
>>>   File "../test/RunAllTests.py", line 76, in allTheTests
>>>     return unittest.TestSuite(getTestSuites()[0])
>>>   File "../test/RunAllTests.py", line 73, in getTestSuites
>>>     return (test_suites,perf_suites)
>>> UnboundLocalError: local variable 'test_suites' referenced before assignment
>>>
>>> but that's perhaps a separate issue not related to moving the files around.
>>
>> The src/images directory is on my ToDo list, but I haven't looked at it yet.
>>
>> The directories that I have re-structured so far contain the filter, datehandler and merge code.
>>
>> I am currently working on the GrampsLogger directory and removing the Assistant.py code, but I haven't committed this yet.
>
> Looks like the favicon.ico bust is from a change Doug made almost 2 years ago. It would appear that nobody is actually running the tests. :-(

It looks like someone is :-)

Can you give a refresher on what you did to run the tests? It seems
that there are a few tests sprinkled throughout.

-Doug

> Regards,
> John Ralls
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

Benny Malengier
Yes, we need a better testing system. I have also never known how to run them.
I see John writes: runtests.sh fails lots
but I don't have a runtests.sh file on my computer.

I would like a system where

import gramps
gramps.tests()

just runs all the tests, or for the gramps pacakge:

gramps --test

Doing test should then run all scripts in the testsuite (like http://docs.python.org/library/unittest.html )

Benny

2012/5/28 Doug Blank <[hidden email]>
On Mon, May 28, 2012 at 3:57 PM, John Ralls <[hidden email]> wrote:
>
> On May 28, 2012, at 11:56 AM, Nick Hall wrote:
>
>> John,
>>
>> Thanks for letting me know about these problems.
>>
>> On 28/05/12 18:53, John Ralls wrote:
>>> On Debian Wheezy:
>>> With `./setup.py build`:
>>> copying src/DbState.py ->  build/lib.linux-i686-2.7/gramps
>>> error: package directory 'src/DateHandler' does not exist
>>
>> Yes, distutils is experimental and it hasn't been updated since I started the work on GEPS008.  When I have finished the GEPS008 work, I will continue helping Rob with GEPS026 again.
>>
>>
>>>
>>> Building with autotools completes without errors.
>>
>> I am keeping autotools up-to-date.
>>
>>
>>>
>>> runtests.sh fails lots of tests because it can't find favicon.ico:
>>> IOError: [Errno 2] No such file or directory: u'/home/john/gramps-svn/src/images/favicon.ico'
>>>
>>> (It has been moved to plugins/webstuff/images.)
>>>
>>> RunAllTests.py just fails with
>>> Traceback (most recent call last):
>>>   File "../test/RunAllTests.py", line 113, in<module>
>>>     unittest.TextTestRunner(verbosity=options.verbose_level).run(allTheTests())
>>>   File "../test/RunAllTests.py", line 76, in allTheTests
>>>     return unittest.TestSuite(getTestSuites()[0])
>>>   File "../test/RunAllTests.py", line 73, in getTestSuites
>>>     return (test_suites,perf_suites)
>>> UnboundLocalError: local variable 'test_suites' referenced before assignment
>>>
>>> but that's perhaps a separate issue not related to moving the files around.
>>
>> The src/images directory is on my ToDo list, but I haven't looked at it yet.
>>
>> The directories that I have re-structured so far contain the filter, datehandler and merge code.
>>
>> I am currently working on the GrampsLogger directory and removing the Assistant.py code, but I haven't committed this yet.
>
> Looks like the favicon.ico bust is from a change Doug made almost 2 years ago. It would appear that nobody is actually running the tests. :-(

It looks like someone is :-)

Can you give a refresher on what you did to run the tests? It seems
that there are a few tests sprinkled throughout.

-Doug

> Regards,
> John Ralls
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gramps-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-devel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GEPS 008: File Organization

John Ralls-2

On May 29, 2012, at 1:17 AM, Benny Malengier wrote:

Yes, we need a better testing system. I have also never known how to run them.
I see John writes: runtests.sh fails lots
but I don't have a runtests.sh file on my computer.

I would like a system where

import gramps
gramps.tests()

just runs all the tests, or for the gramps pacakge:

gramps --test

Doing test should then run all scripts in the testsuite (like http://docs.python.org/library/unittest.html )

Benny,

Sorry, that was a typo: it's test/runtest.sh. 

RunAllTests.py is a unittest test runner, so it would be pretty easy to run that from gramps.py. 

Regards,
John Ralls


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel