ocesou / hooke

Automatically exported from code.google.com/p/hooke
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Directory structure reorganization #35

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I mentioned this on the discussion list a while back,

http://groups.google.com/group/hookesoftware/browse_thread/thread/885fc6856438ad
ed
but it took me a while to get around to fixing up my code.

Anyhow, directory structure patch sets attached, or clone my Git branch:
  http://www.physics.drexel.edu/~wking/code/git/git.php?p=hooke.git

Massimo,
If you want to give me an SVN branch to push to, let me know...

Original issue reported on code.google.com by tvrkng@gmail.com on 4 May 2010 at 8:16

Attachments:

GoogleCodeExporter commented 8 years ago
I've replaced this Git repository with a Mercurial one which I'm hoping to get 
hosted
here at Google Code:
  http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/hooke/

Original comment by tvrkng@gmail.com on 16 May 2010 at 11:40

GoogleCodeExporter commented 8 years ago
The reorganization looks nice, but I could not make the program run.

I tried:
- executing hooke.py (from hooke subdir)
- executing ./hooke (from bin subdir)
- executing "setup.py build" and "setup.py install", this gave me 

BEGIN ERROR LOG:

Traceback (most recent call last):
  File "setup.py", line 68, in <module>
    provides = packages,
  File "/usr/lib/python2.6/distutils/core.py", line 113, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.6/distutils/dist.py", line 258, in __init__
    getattr(self.metadata, "set_" + key)(val)
  File "/usr/lib/python2.6/distutils/dist.py", line 1205, in set_provides
    distutils.versionpredicate.split_provision(v)
  File "/usr/lib/python2.6/distutils/versionpredicate.py", line 160, in split_provision
    raise ValueError("illegal provides specification: %r" % value)
ValueError: illegal provides specification: 'build.lib.linux-i686-2.6.test'

END ERROR LOG

Is this branch working at the moment? How should it be installed/launched?

Original comment by albertog...@gmail.com on 1 Jun 2010 at 1:31

GoogleCodeExporter commented 8 years ago
On Tue, Jun 01, 2010 at 01:31:48PM +0000, albertogomcas wrote:
> The reorganization looks nice, but I could not make the program run.

From the tutorial 
(http://www.physics.drexel.edu/~wking/rsrch/hooke/tutorial.html, I
mentioned my new documentation in this mailing list thread:
http://groups.google.com/group/hookesoftware/browse_thread/thread/34a90ba73d4edf
36),

    If you are running hooke from the source directory (see Installing Hooke), the
equivalent command is:

    $ python bin/hooke

    You may need to give the full path for Python on Windows systems.

> executing hooke.py (from hooke subdir)

This is just a library.  No if __name__ == '__main__' execution code.

> executing ./hooke (from bin subdir)

This would work if your PYTHONPATH included ..,

    bin $ PYTHONPATH="..:$PYTHONPATH" python hooke 
    Hooke version 0.9.0.devel (Kenzo)

    COPYRIGHT
    ----
    hooke> 

but as your command stands, Python can't find the hooke package to import.

    bin $ python hooke 
    Traceback (most recent call last):
      File "hooke", line 3, in <module>
        import hooke.hooke
    ImportError: No module named hooke.hooke

> - executing "setup.py build" and "setup.py install", this gave me 
>
> BEGIN ERROR LOG:
> ...
> ValueError: illegal provides specification: 'build.lib.linux-i686-2.6.test'

It looks like setup.py's find_packages() grabbed a setup.py-generated file 
(perhaps
on a second pass?).  I've just fixed it so it will only look in the hooke/ 
directory
(http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/hooke/rev/31207bd51fe
7).

> Is this branch working at the moment?

I'm trying to get the command line UI up and running with the functionality I 
need to
analyze some recent data.  Everything else is lower on my priority list, but 
I'll get
to it eventually.  To see what's working in a particular release, I enable 
plugins
and drivers as I translate them to the new architecture, so anything that's 
enabled
should work.  You could also look at the integration tests in test/.

Original comment by tvrkng@gmail.com on 2 Jun 2010 at 6:13

GoogleCodeExporter commented 8 years ago
>    If you are running hooke from the source directory (see Installing Hooke), 
the
equivalent command is:

>    $ python bin/hooke

alberto@alberto-laptop:~$ cd Desktop/hooke-932a9eb5daef/

alberto@alberto-laptop:~/Desktop/hooke-932a9eb5daef$ python bin/hooke 

Traceback (most recent call last):
  File "bin/hooke", line 3, in <module>
    import hooke.hooke
ImportError: No module named hooke.hooke

Original comment by albertog...@gmail.com on 2 Jun 2010 at 8:38

GoogleCodeExporter commented 8 years ago
Ah, I'd forgotten that I have . in my PYTHONPATH.

  $ echo $PYTHONPATH
  .:/home/wking/lib/python2.6/site-packages:/home/wking/lib/python:/home/wking/.python

It's strange that Python can import modules from the local directory without 
'.' in
the path, but it's needed to import packages?  Anyhow, try adding '.' to your 
path.

Original comment by tvrkng@gmail.com on 2 Jun 2010 at 4:00

GoogleCodeExporter commented 8 years ago
The mercurial repository is now being tracked as branches/wtk in SVN:
  http://code.google.com/p/hooke/source/browse/#svn/branches/wtk
Futher discussion on the list
  http://groups.google.com/group/hookesoftware/browse_thread/thread/8714cdb16980d761

Original comment by tvrkng@gmail.com on 3 Aug 2010 at 12:36

GoogleCodeExporter commented 8 years ago
bin/hooke is now bin/hk.py.  This fixes some issues with Windows and 
multiprocessing.  I've now run my branch (both the command line and GUI) on 
Windows XP, so I can confirm that they do actually work there ;).  What I did:

1) installed the Enthought Python Distribution 6.2.2
     http://www.enthought.com/products/epd.php
  (free for academics).  Or do whatever you want to install a working version of Python 2.6 and Hooke's other dependencies.  The Enthought install automatically adjusts your %PATH% to include the Python directories, you you can call `python` without specifying the full path.
2) downloaded the current tip of my branch
     http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/hooke/archive/tip.zip
   and unpack it somewhere.  You could also install Mercurial
     http://mercurial.selenic.com/
   and use that to grab the source, via either the command line or a GUI like TortiseHg
     http://mercurial.selenic.com/wiki/OtherTools#Graphical_User_Interfaces
3) Open up a command shell and cd to the hooke directory (the one containing 
the README file).
4) Add . to your PYTHONPATH.  My PYTHONPATH was previously blank
     > echo %PYTHONPATH%
     %PYTHONPATH%
   so I used
     > set PYTHONPATH=.
5) Run Hooke
     > python bin/hk.py
   Note that depending on your PATH, you may have to call python using its full path here.

By default, hooke runs the command line UI.  If you want to run the GUI (or 
change other config options permanently), try something like
  > python bin/hk.py --save-config -c ""
and edit the user interface section to look like
  # Select the user interface (only one).                                         
  [user interfaces]
  # Command line interface.  Simple and powerful.                                 
  command line = False
  # wxWindows graphical user interface.                                           
  gui = True

Hope that helps (and of course, let me know if it doesn't).

Original comment by tvrkng@gmail.com on 14 Aug 2010 at 1:03

GoogleCodeExporter commented 8 years ago
Now that Google code supports Git, my repository has been converted back to 
Git.  The current versions are at git://tremily.us/hooke.git (browsable: 
http://git.tremily.us/?p=hooke.git)

Original comment by tvrkng@gmail.com on 8 Mar 2012 at 4:43