hooke.git
13 years agoFix broken hooke.plugin.playlist.playlist_name_callback
W. Trevor King [Wed, 19 May 2010 06:40:52 +0000 (02:40 -0400)]
Fix broken hooke.plugin.playlist.playlist_name_callback

13 years agoRemove if __name__ == '__main__' section of hooke.hooke
W. Trevor King [Wed, 19 May 2010 06:40:24 +0000 (02:40 -0400)]
Remove if __name__ == '__main__' section of hooke.hooke

13 years agoAdd unicode-capable IO to hooke.ui.commandline.
W. Trevor King [Wed, 19 May 2010 06:31:00 +0000 (02:31 -0400)]
Add unicode-capable IO to hooke.ui.commandline.

The previous implementation produced:
  $ python bin/hooke -c 'flat_filter_playlist'
  ...
  hooke> Traceback (most recent call last):
  ...
  UnicodeEncodeError: 'ascii' codec can't encode character u'\xec'...

The new encoding detection functions in hooke.util.encoding came from
my libbe.util.encoding module for Bugs Everywhere.  From my original
BE commit (Tue 2008-11-25 15:47:19 -0500):

  get_encoding() is from Trac
    http://trac.edgewall.org/browser/trunk/trac/util/datefmt.py
    format_datetime()
  Trac has a BSD license
    http://trac.edgewall.org/wiki/TracLicense
  I don't know if such a small snippet requires us to "reproduce the
  above copyright" or where we need to reproduce it if it is needed.

  The stdout/stdin replacement code follows
    http://wiki.python.org/moin/ShellRedirectionFails

  References:
    http://wiki.python.org/moin/Unicode
    http://www.amk.ca/python/howto/unicode
    http://www.python.org/dev/peps/pep-0100/

13 years agoRemove two debugging prints from hooke.ui.commandline
W. Trevor King [Wed, 19 May 2010 05:11:15 +0000 (01:11 -0400)]
Remove two debugging prints from hooke.ui.commandline

13 years agoAdjust update_copyright hacks to follow plugin.peakspot -> util.peak move
W. Trevor King [Wed, 19 May 2010 05:03:30 +0000 (01:03 -0400)]
Adjust update_copyright hacks to follow plugin.peakspot -> util.peak move

13 years agoMajor plugin restructuring.
W. Trevor King [Wed, 19 May 2010 04:54:48 +0000 (00:54 -0400)]
Major plugin restructuring.

The restructuring makes major improvements in:
  * numpy/scipy utilization (for speed)
  * functional encapsulation (breaking long, complicated functions
    into easily understood pieces, and sharing those pieces between
    related Commands).

Renames:
  * generalclamp -> fclamp
  * generalvclamp -> vclamp
  * generaltccd -> tccd
  * peakspot -> hooke.util.peak

Splits:
  * flatfilts -> flatfily
             `-> convfilt

The config files convfilt.conf and flatfilts.ini were also
internalized into their respective plugins' .default_settings().

13 years agoRemove debugging print command from hooke.util.calculus.derivative
W. Trevor King [Wed, 19 May 2010 04:41:11 +0000 (00:41 -0400)]
Remove debugging print command from hooke.util.calculus.derivative

13 years agoFix a pickling problems with hooke.plugin.playlist.FilterCommand.
W. Trevor King [Wed, 19 May 2010 04:38:51 +0000 (00:38 -0400)]
Fix a pickling problems with hooke.plugin.playlist.FilterCommand.

Pickle doesn't like functions that aren't defined the top level of
modules (such as NoteFilterCommand's old lambda filter_fn).  Add a
warning to that effect to the FilterCommand doc string, and rearrange
to encourage the use of methods (which are less likely to be defined
on the fly than functions).

Also:
  * Added pickle queue debugging code to hooke.hooke.  This isn't the
    first tiem I've had a pickling problem.  This code (when enabled),
    makes it easier for me to track down the failing code.
  * Fix a typo in hooke.hooke.HookeRunner.run (self.ui -> hooke.ui).
  * Remove a snip of trailing whitespace in hooke.hooke.

13 years agoAllow extra arguments to NoteIndexList.filter's filter_fn
W. Trevor King [Tue, 18 May 2010 16:35:22 +0000 (12:35 -0400)]
Allow extra arguments to NoteIndexList.filter's filter_fn

13 years agoMove argument_to_setting before plugin loading code in hooke.plugin.
W. Trevor King [Tue, 18 May 2010 14:50:18 +0000 (10:50 -0400)]
Move argument_to_setting before plugin loading code in hooke.plugin.

Otherwise Python loads the plugins before argument_to_setting has been
defined, which makes it hard for the plugins to use the function ;).

13 years agoAdd Numpy crossreferences to hooke.util.fft
W. Trevor King [Tue, 18 May 2010 14:44:29 +0000 (10:44 -0400)]
Add Numpy crossreferences to hooke.util.fft

13 years agoIntroduce intersphinx to Numpy, Scipy, and Matplotlib
W. Trevor King [Tue, 18 May 2010 14:43:20 +0000 (10:43 -0400)]
Introduce intersphinx to Numpy, Scipy, and Matplotlib

13 years agoAdd hooke.plugin.argument_to_setting to convert Arguments -> Settings.
W. Trevor King [Tue, 18 May 2010 12:59:16 +0000 (08:59 -0400)]
Add hooke.plugin.argument_to_setting to convert Arguments -> Settings.

This will make it easy for Plugins to generate Settings matching
Command Arguments.

13 years agoActually, pass plugin instance to Command.__init__.
W. Trevor King [Tue, 18 May 2010 12:54:38 +0000 (08:54 -0400)]
Actually, pass plugin instance to Command.__init__.

Rather than using Plugin._setup_commands, because the commands may
wish to use some aspects of the Plugin during initialization (e.g. to
build argument lists from plugin settings).  The previous
implemetation gave the commands no way to respond to the attached
plugin instance.

13 years agoRework Plugin.commands() to include _setup_commands().
W. Trevor King [Tue, 18 May 2010 11:34:02 +0000 (07:34 -0400)]
Rework Plugin.commands() to include _setup_commands().

The previous implementation gave Commands no way to access the
Plugin's configuration.

13 years agoFix syntax errors in hooke.plugin.curve
W. Trevor King [Tue, 18 May 2010 02:04:06 +0000 (22:04 -0400)]
Fix syntax errors in hooke.plugin.curve

13 years agoFinish translating the hooke.plugin.curve Commands from procplots.
W. Trevor King [Tue, 18 May 2010 01:58:57 +0000 (21:58 -0400)]
Finish translating the hooke.plugin.curve Commands from procplots.

13 years agoConverted hooke.util.fft to Hooke coding style.
W. Trevor King [Mon, 17 May 2010 22:38:33 +0000 (18:38 -0400)]
Converted hooke.util.fft to Hooke coding style.

* Add numpydoc docstrings (to most functions)
* Converted hackish test suites to hackish `unittest.TestCase`s.
  Still ugly, but now `nosetests` finds them.
  They should really use .assertAlmostEqual and company...
* Added neccessary function definitions to doc/conf.py for the
  'math' sections of fft's docstrings.

13 years agoAdd intersphinx_mapping to doc/conf.py
W. Trevor King [Mon, 17 May 2010 20:27:20 +0000 (16:27 -0400)]
Add intersphinx_mapping to doc/conf.py

This tell's intersphinx where to find documentation for other
projects.  Currently we've only told it about the standard Python
libraries.

http://sphinx.pocoo.org/latest/ext/intersphinx.html#confval-intersphinx_mapping

13 years agoAdd Sphinx extensions sphinx.ext.intersphinx sphinx.ext.pngmath.
W. Trevor King [Mon, 17 May 2010 20:18:46 +0000 (16:18 -0400)]
Add Sphinx extensions sphinx.ext.intersphinx sphinx.ext.pngmath.

* intersphinx allows documentation linking between known Sphinx packages.
  http://sphinx.pocoo.org/ext/intersphinx.html
* pngmath allows LaTeX inclusion via the math directive
  http://sphinx.pocoo.org/ext/math.html

Also reorder extension list following:
  sphinx.* alphabetically
  everything else aphabetically

13 years agoRan ./update_copyright.py to setup copyrights in caclulus and fft.
W. Trevor King [Mon, 17 May 2010 19:45:20 +0000 (15:45 -0400)]
Ran ./update_copyright.py to setup copyrights in caclulus and fft.

Also corrects a name typo in th picoforce copyright.  Sometimes I miss
keystrokes and Emacs starts running aspell without me noticing :p.

13 years agoAdjusted hooke.util.calculus.derivative.__doc__ so Sphinx doesn't die.
W. Trevor King [Mon, 17 May 2010 19:38:31 +0000 (15:38 -0400)]
Adjusted hooke.util.calculus.derivative.__doc__ so Sphinx doesn't die.

13 years agoMerged my unitary FFT wrappers (FFT_tools) as hooke.util.fft.
W. Trevor King [Mon, 17 May 2010 19:08:29 +0000 (15:08 -0400)]
Merged my unitary FFT wrappers (FFT_tools) as hooke.util.fft.

Origininally versioned in Git and licensed under BSD, but I wrote
them, so I'm relicensing under the LGPL for Hooke.

The original git repository was:
  http://www.physics.drexel.edu/~wking/code/git/FFT_tools.git/

13 years agoRelicensed FFT_tools.py under Hooke's LGPL fft
W. Trevor King [Mon, 17 May 2010 19:05:09 +0000 (15:05 -0400)]
Relicensed FFT_tools.py under Hooke's LGPL

13 years agoMerged hooke.plugin.plotmanip into hooke.plugin.curve.
W. Trevor King [Mon, 17 May 2010 18:40:02 +0000 (14:40 -0400)]
Merged hooke.plugin.plotmanip into hooke.plugin.curve.

Also:
  * Fixed a number of typos in hooke.plugin.curve.
  * Rewrote derivative code for Numpy in
    hooke.util.calculus.derivative.
  * Removed FFT code (I'm replacing it with my FFT_tools module
    shortly).
  * Moved v-clamp-specific code into generalvclamp.
  * Moved plotmanips to hooke.plugin.plotmanip holding area.

13 years agoRemove leftover curve.InfoCommand cruft from ExportCommand.__init__.
W. Trevor King [Mon, 17 May 2010 14:33:03 +0000 (10:33 -0400)]
Remove leftover curve.InfoCommand cruft from ExportCommand.__init__.

13 years agoMoving hooke.plugin.procplots to .curve in preparation for merge
W. Trevor King [Mon, 17 May 2010 14:29:41 +0000 (10:29 -0400)]
Moving hooke.plugin.procplots to .curve in preparation for merge

13 years agoStarted translating hooke.plugin.multifit to new Plugin/Command architecture.
W. Trevor King [Mon, 17 May 2010 13:18:28 +0000 (09:18 -0400)]
Started translating hooke.plugin.multifit to new Plugin/Command architecture.

13 years agoAdd REAMDE and playlist.hkp for Hemingway force clamp curves.
W. Trevor King [Mon, 17 May 2010 12:30:20 +0000 (08:30 -0400)]
Add REAMDE and playlist.hkp for Hemingway force clamp curves.

13 years agoAdded sample Hemingway force-clamp curves
W. Trevor King [Mon, 17 May 2010 12:29:40 +0000 (08:29 -0400)]
Added sample Hemingway force-clamp curves

13 years agoMoved test/data/titin to more descriptive test/data/vclamp_picoforce
W. Trevor King [Mon, 17 May 2010 12:28:43 +0000 (08:28 -0400)]
Moved test/data/titin to more descriptive test/data/vclamp_picoforce

13 years agoAdd REAMDE and playlist.hkp for titin I-27 curves.
W. Trevor King [Mon, 17 May 2010 12:18:28 +0000 (08:18 -0400)]
Add REAMDE and playlist.hkp for titin I-27 curves.

13 years agoAdded 100 sample velocity-clamp curves for titin I-27
W. Trevor King [Mon, 17 May 2010 12:17:46 +0000 (08:17 -0400)]
Added 100 sample velocity-clamp curves for titin I-27

13 years agoFix rief1997 footnote in hooke.experiment.VelocityClamp
W. Trevor King [Mon, 17 May 2010 12:02:21 +0000 (08:02 -0400)]
Fix rief1997 footnote in hooke.experiment.VelocityClamp

13 years agoUpdated hooke.driver.picoforce to new Driver class.
W. Trevor King [Mon, 17 May 2010 12:00:36 +0000 (08:00 -0400)]
Updated hooke.driver.picoforce to new Driver class.

This is a fairly major rewrite of the previous PicoForce driver.  I've
cleaned up header parsing and tried to break trace -> block conversion
up into compact functions.  The meaning of many PicoForce file
constants is still unclear to me though, so I may have gotten some
things wrong.

Also:
  * Added references for each hooke.experiment.Experiment subclass.
  * TutorialDriver sets curve.info['experiment'] to an Experiment subclass.
  * An adjusted test.curve_info now passes.

While we're translating the old experiment strings to the new
Experiment classes, the following conversion table may be useful:

  'clamp'  -> ForceClamp
  'smfs'   -> VelocityClamp
  'smfluo' -> TwoColorCoincidenceDetection

13 years agoFixed bugs in hooke.curve.Data.__new__ and added doctests
W. Trevor King [Sun, 16 May 2010 18:35:01 +0000 (14:35 -0400)]
Fixed bugs in hooke.curve.Data.__new__ and added doctests

13 years agoAdd Curve loading to hooke.playlist.Playlist.
W. Trevor King [Sun, 16 May 2010 16:00:56 +0000 (12:00 -0400)]
Add Curve loading to hooke.playlist.Playlist.

Highlights:
  * NotRecognized.__get/setstate__ for Pickling through the Queues.
    Perhaps this would be better solved in Failure.__get/setstate__?
    The current fix works for the moment though.
  * Use Curve.data == None to indicate unloaded curves.
  * Fix TutorialDriver.is_me(self) -> is_me(self, path)
  * Added ._load* to Playlist, so it only caches ._max_loaded curves
    in memory.
  * Fix broken Playlist.from_string doctest.

13 years agoMoved doc/hooke.jpg to doc/img/hooke.jpg
W. Trevor King [Sun, 16 May 2010 14:56:06 +0000 (10:56 -0400)]
Moved doc/hooke.jpg to doc/img/hooke.jpg

13 years agoAdd hooke.plugin.curve (moved from hooke.plugin.curvetools)
W. Trevor King [Sun, 16 May 2010 14:49:56 +0000 (10:49 -0400)]
Add hooke.plugin.curve (moved from hooke.plugin.curvetools)

Provides 'curve info' and 'export' commands.  Added test.curve_info
to test the 'curve info' command, but it currently fails due to
unimplemnted Curve loading.

Also:
 * Minor docstring cleanups in hooke.plugin.playlist
 * Moved some functions to hooke.plugin.generalvclamp.  I'm not clear
   on Experiment-specific Curve interpretation yet, but these
   functions (which will eventually be Commands) seem better placed
   here.
   * fit_interval_nm
   * find_current_peak
   * pickup_contact_point
   * baseline_points

13 years agoAdded .hooke.cfg to .hgignore.
W. Trevor King [Sun, 16 May 2010 13:56:00 +0000 (09:56 -0400)]
Added .hooke.cfg to .hgignore.

The local config copy auto-generated by hooke.hooke.main().  We don't
want anyone adding this to the versioning system by accident.

13 years agoBroke out Hooke.run and Hooke.run_lines into HookeRunner.
W. Trevor King [Sun, 16 May 2010 13:53:53 +0000 (09:53 -0400)]
Broke out Hooke.run and Hooke.run_lines into HookeRunner.

This allows the main process access to the command process' possibly
altered Hooke instance.  For example:
  >>> h = Hooke()
  >>> r = HookeRunner()
  >>> h = r.run_lines(h, ['load_playlist test/data/test'])
  >>> h = r.run_lines(h, ['curve_info --all=True'])
With the old implementation, second run_lines() call would fail
because the playlist was only loaded in the first command process'
Hooke instance, not the Hooke instance that the main (UI) process
held.

13 years agoPull Hooke.run*() multiprocessing setup/teardown into ._setup/_cleanup_run.
W. Trevor King [Sun, 16 May 2010 13:29:51 +0000 (09:29 -0400)]
Pull Hooke.run*() multiprocessing setup/teardown into ._setup/_cleanup_run.

Limits code duplication between .run() and .run_lines().

13 years agoAdd hooke.playlist.NoteIndexList.__str__() method.
W. Trevor King [Sun, 16 May 2010 12:21:20 +0000 (08:21 -0400)]
Add hooke.playlist.NoteIndexList.__str__() method.

Now playlists etc. will flatten themselves to strings with:
  '...%s...' % instance.

13 years agoUnset executible bits in curvetools.py and jumpstat.py permissions.
W. Trevor King [Sun, 16 May 2010 11:49:54 +0000 (07:49 -0400)]
Unset executible bits in curvetools.py and jumpstat.py permissions.

13 years agoRan update_copyright.py, updating all the copyright blurbs and adding AUTHORS.
W. Trevor King [Sun, 16 May 2010 11:26:28 +0000 (07:26 -0400)]
Ran update_copyright.py, updating all the copyright blurbs and adding AUTHORS.

13 years agoUse ALIASES and AUTHOR_HACKS handling in update_copyright.update_authors.
W. Trevor King [Sun, 16 May 2010 11:26:00 +0000 (07:26 -0400)]
Use ALIASES and AUTHOR_HACKS handling in update_copyright.update_authors.

The previously generated AUTHORS file was the raw list of VCS
commiters.

13 years agoUpdated copyright blurbs in all files to '# Copyright'
W. Trevor King [Sun, 16 May 2010 11:18:31 +0000 (07:18 -0400)]
Updated copyright blurbs in all files to '# Copyright'

This tag will be replaced by update_copyright.py with the full
copyright blurb for each file.

13 years agoFurther author/year workarounds in update_copyright.py.
W. Trevor King [Sun, 16 May 2010 11:18:00 +0000 (07:18 -0400)]
Further author/year workarounds in update_copyright.py.

13 years agoAdd AUTHOR_HACKS and YEAR_HACKS to update_copyright.py
W. Trevor King [Sun, 16 May 2010 10:51:39 +0000 (06:51 -0400)]
Add AUTHOR_HACKS and YEAR_HACKS to update_copyright.py

This works around holes in the versioning where files were initially
released before being added to the versioning system, or they were
never committed under the name of one of the authors.

13 years agoUpdate canonical copyright names for 'illysam' and 'pancaldi.paulo'.
W. Trevor King [Sat, 15 May 2010 12:25:23 +0000 (08:25 -0400)]
Update canonical copyright names for 'illysam' and 'pancaldi.paulo'.

Also add the missing '.82' to Fabrizio's alias.

13 years agoFix some doctests in update_copyright.py.
W. Trevor King [Sat, 15 May 2010 11:58:48 +0000 (07:58 -0400)]
Fix some doctests in update_copyright.py.

And make some adjustments so that update_copyright.py can update its
own copyright blurb without changing anything else inside itself.

13 years agoRearrange license text and add update_copyright.py.
W. Trevor King [Fri, 14 May 2010 18:40:14 +0000 (14:40 -0400)]
Rearrange license text and add update_copyright.py.

Following http://www.gnu.org/licenses/gpl-howto.html
  * Moved LGPLv3 text from LICENSE -> COPYING.LESSER
  * Brought in GPLv3 text -> COPYING

update_copyright.py automates the maitenance of boilerplate copyright
information at the head of every file.

13 years agoAdded integration test directory test/ and load_playlist test.
W. Trevor King [Fri, 14 May 2010 15:32:17 +0000 (11:32 -0400)]
Added integration test directory test/ and load_playlist test.

Run all integration tests with:
  nosetests --with-doctest --doctest-tests test/

13 years agoUpdated .hgignore to ignore documentation build files.
W. Trevor King [Fri, 14 May 2010 15:19:08 +0000 (11:19 -0400)]
Updated .hgignore to ignore documentation build files.

13 years agoAdded .hgignore masking *.pyc files
W. Trevor King [Fri, 14 May 2010 14:40:53 +0000 (10:40 -0400)]
Added .hgignore masking *.pyc files

13 years agoAdded distutils-based setup.py.
W. Trevor King [Fri, 14 May 2010 14:39:58 +0000 (10:39 -0400)]
Added distutils-based setup.py.

13 years agoFix git->hg and wget -o -> -O in doc/install.txt snapshot command.
W. Trevor King [Fri, 14 May 2010 13:22:52 +0000 (09:22 -0400)]
Fix git->hg and wget -o -> -O in doc/install.txt snapshot command.

Path change because of Git->Mercurial migration.

wget
  -O --output-document    sets the document file.
  -o --output-file        sets the logfile.

13 years agoUpdated fork project info for Rolf and my branches in doc/install.txt.
W. Trevor King [Fri, 14 May 2010 13:17:04 +0000 (09:17 -0400)]
Updated fork project info for Rolf and my branches in doc/install.txt.

I think I found where Rolf's code is (SVN illysam branch), and I
migrated my Git-versioned fork to Mercurial.

13 years agoAdd --script and --command to bin/hooke
W. Trevor King [Thu, 13 May 2010 14:41:09 +0000 (10:41 -0400)]
Add --script and --command to bin/hooke

13 years agoSave playlist digest on loading.
W. Trevor King [Thu, 13 May 2010 14:08:54 +0000 (10:08 -0400)]
Save playlist digest on loading.

The previous implementation felt that playlists were not saved
(.is_saved() -> False) when the playlists had not been altered since
loading.

We *don't* save the digest when we load from a string, because
that string is not necessarily on disk and we *do* want to save
it, even if the playlist hasn't change since loading.

I also removed the return bits, since FilePlaylist._from_xml_doc()
doesn't return anything.

13 years agoActually set self.name in hooke.playlist.FilePlaylist.set_path
W. Trevor King [Thu, 13 May 2010 11:41:46 +0000 (07:41 -0400)]
Actually set self.name in hooke.playlist.FilePlaylist.set_path

13 years agoFix str() bug in hooke.ui.commandline.LocalExitCommand save msg.
W. Trevor King [Thu, 13 May 2010 11:40:00 +0000 (07:40 -0400)]
Fix str() bug in hooke.ui.commandline.LocalExitCommand save msg.

Old implemtation crashed if Playlist.name was None.

13 years agoMove hooke/test/default.000 -> test/data/picoforce.000
W. Trevor King [Thu, 13 May 2010 11:34:41 +0000 (07:34 -0400)]
Move hooke/test/default.000 -> test/data/picoforce.000

+ corresponding update to test/data/test.hkp.

13 years agoActually set self.path in hooke.playlist.FilePlaylist.set_path
W. Trevor King [Thu, 13 May 2010 11:33:08 +0000 (07:33 -0400)]
Actually set self.path in hooke.playlist.FilePlaylist.set_path

13 years agoAdd all_drivers_callback to hooke.plugin.playlist.LoadCommand.
W. Trevor King [Thu, 13 May 2010 11:27:58 +0000 (07:27 -0400)]
Add all_drivers_callback to hooke.plugin.playlist.LoadCommand.

I can't imagine the user not wanting to use all available playlists.
They still can, but specifiying a sublist is now optional.

13 years agoFix typos in hooke.playlist.FilePlaylist.set_path
W. Trevor King [Thu, 13 May 2010 11:24:52 +0000 (07:24 -0400)]
Fix typos in hooke.playlist.FilePlaylist.set_path

13 years agoFix bug in hooke.ui.commandline.DoCommand._check_argument_length() max_arg calculation.
W. Trevor King [Thu, 13 May 2010 10:55:29 +0000 (06:55 -0400)]
Fix bug in hooke.ui.commandline.DoCommand._check_argument_length() max_arg calculation.

13 years agoMoved test and mfp_igor_scripts directories around
W. Trevor King [Thu, 13 May 2010 10:48:13 +0000 (06:48 -0400)]
Moved test and mfp_igor_scripts directories around

13 years agoSplit out "Troubleshooting" into doc/bugs.txt.
W. Trevor King [Thu, 13 May 2010 10:31:56 +0000 (06:31 -0400)]
Split out "Troubleshooting" into doc/bugs.txt.

This section will probably grow ;).
+ other textual cleanups.

13 years agoFix doc/index.txt references to auto-generated pages
W. Trevor King [Thu, 13 May 2010 10:16:50 +0000 (06:16 -0400)]
Fix doc/index.txt references to auto-generated pages

:ref:`~...` -> :ref:`...` following
  http://sphinx.pocoo.org/_sources/contents.txt

13 years agoDocumentation cleanups.
W. Trevor King [Thu, 13 May 2010 10:06:22 +0000 (06:06 -0400)]
Documentation cleanups.

Specifically:
  * Escape *nix -> \*nix, because the bare * looks like an emphasis
    start mark.
  * Use :file:`...` to denote files.
  * Fix FHS reference '_ ..' -> '.. _'
  * Add a link to Sphinx's markup extensions.
  * Remove superfluous "Hooke" from section titles.
  * Use correct section linking:
      X.txt -> X
      :doc:`X`
    see
      http://sphinx.pocoo.org/concepts.html#document-names
      http://sphinx.pocoo.org/markup/inline.html#role-doc
  * Use two spaces (not one) at start of sentences.
  * `code` -> ``code`` (the way I had things originally :p).  See
      http://sphinx.pocoo.org/markup/inline.html#role-samp

13 years agoDon't abbreviate multiprocessing.Queue in hacking.txt
W. Trevor King [Wed, 12 May 2010 23:44:21 +0000 (19:44 -0400)]
Don't abbreviate multiprocessing.Queue in hacking.txt

13 years agoRemove ~~ in info attribute reference of doc/hacking.txt
W. Trevor King [Wed, 12 May 2010 22:16:40 +0000 (18:16 -0400)]
Remove ~~ in info attribute reference of doc/hacking.txt

13 years agoFix hooke.utils -> hooke.util typo in doc/hacking.txt
W. Trevor King [Wed, 12 May 2010 22:11:00 +0000 (18:11 -0400)]
Fix hooke.utils -> hooke.util typo in doc/hacking.txt

13 years agoAdd :class: bit to many `...` escapes in hacking.txt and index.txt
W. Trevor King [Wed, 12 May 2010 22:03:39 +0000 (18:03 -0400)]
Add :class: bit to many `...` escapes in hacking.txt and index.txt

13 years agoStandardize example indentation to 4 spaces in doc/tutorial.txt
W. Trevor King [Wed, 12 May 2010 21:48:39 +0000 (17:48 -0400)]
Standardize example indentation to 4 spaces in doc/tutorial.txt

13 years agoSync doc/tutorial.txt splash text with hooke.ui.UserInterface._splash_text.
W. Trevor King [Wed, 12 May 2010 21:39:40 +0000 (17:39 -0400)]
Sync doc/tutorial.txt splash text with hooke.ui.UserInterface._splash_text.

Also:
 * Flesh out doc/architecture.txt
 * Replace a number of '``' escapes with '`'.  My reStructuredText was
   rusty on the first pass through the documentation ;).

13 years agoNothing useful left in hooke_cli, removed.
W. Trevor King [Wed, 12 May 2010 20:04:34 +0000 (16:04 -0400)]
Nothing useful left in hooke_cli, removed.

13 years agoMore commands moved from hooke_cli to hooke.ui.gui.plotcommands stub
W. Trevor King [Wed, 12 May 2010 20:03:11 +0000 (16:03 -0400)]
More commands moved from hooke_cli to hooke.ui.gui.plotcommands stub

13 years agoMoved config handling commands from hooke_cli to hooke.plugin.config.
W. Trevor King [Wed, 12 May 2010 19:57:33 +0000 (15:57 -0400)]
Moved config handling commands from hooke_cli to hooke.plugin.config.

Also:
  * Moved construct_graph and IsSubclass from hooke.plugin to
    hooke.util.pluggable to avoid import cycles and cleanup
    hooke.plugin.
  * Added hooke.interaction.ReloadUserInterfaceConfig to trigger UI
    reconfigure.
  * Added hooke.ui.UserInterface.reload_config (triggered by above).
  * Pass CommandLine instance to HookeCmd, so it can reconfigure
    the UI.

13 years agoMoved printlist command from hooke_cli -> hooke.plugin.playlist.CurveListCommand.
W. Trevor King [Wed, 12 May 2010 19:03:17 +0000 (15:03 -0400)]
Moved printlist command from hooke_cli -> hooke.plugin.playlist.CurveListCommand.

13 years agoMoved index command from hooke_cli -> hooke.plugin.playlist.IndexCommand.
W. Trevor King [Wed, 12 May 2010 18:59:04 +0000 (14:59 -0400)]
Moved index command from hooke_cli -> hooke.plugin.playlist.IndexCommand.

13 years agoRemoved next/previous commands from hooke_cli
W. Trevor King [Wed, 12 May 2010 18:54:48 +0000 (14:54 -0400)]
Removed next/previous commands from hooke_cli

Superseded by hooke.plugin.playlist commands.

13 years agoMoved plot commands from hooke_cli -> hooke.ui.gui.plotcommands stub.
W. Trevor King [Wed, 12 May 2010 18:53:45 +0000 (14:53 -0400)]
Moved plot commands from hooke_cli -> hooke.ui.gui.plotcommands stub.

13 years agoMoved export command from hooke_cli -> hooke.ui.gui.export stub.
W. Trevor King [Wed, 12 May 2010 18:52:20 +0000 (14:52 -0400)]
Moved export command from hooke_cli -> hooke.ui.gui.export stub.

13 years agoMoved txt command from hooke_cli -> hooke.plugin.curvetools stub.
W. Trevor King [Wed, 12 May 2010 18:51:11 +0000 (14:51 -0400)]
Moved txt command from hooke_cli -> hooke.plugin.curvetools stub.

13 years agoMoved note handling commands to hooke.plugin.note.
W. Trevor King [Wed, 12 May 2010 18:46:35 +0000 (14:46 -0400)]
Moved note handling commands to hooke.plugin.note.

Also:
  * Fixed graph dependency creation in hooke.plugin.construct_graph.
    The previous implemetation had Plugin instances as parents, not
    Node instances.
  * Moved a few builtin modules from hooke.plugin.PLUGIN_MODULES to
    .BUILTIN_MODULES.
  * Fixup unsaved playlist detection in
    hooke.ui.commandline.LocalExitCommand._run

13 years agonotelog has been superseded by hooke.plugin.playlist.SaveCommand
W. Trevor King [Wed, 12 May 2010 18:08:05 +0000 (14:08 -0400)]
notelog has been superseded by hooke.plugin.playlist.SaveCommand

The notes will be stored in Playlist.info['note'], and the info dict
is saved in the playlist file format.

13 years agoRun hooke.command.Argument.callback every time (if defined).
W. Trevor King [Wed, 12 May 2010 18:00:57 +0000 (14:00 -0400)]
Run hooke.command.Argument.callback every time (if defined).

The previous implemtation which only ran the callback if a value was
given was too confusing.

Also:
  * Added hooke.plugin.playlist.NoteFilterCommand.  In general, I
    think running commands this way is pretty awkward.  We should
    probably just use a Python interpreter instead of cmd.Cmd, but
    for now, NoteFilterCommand provides something like the old
    'copylog' functionality.
  * Removed a bunch of superseded code from hooke.hooke_cli.

13 years agoFix hooke.ui.commandline imports following hooke.interaction creation.
W. Trevor King [Wed, 12 May 2010 17:51:17 +0000 (13:51 -0400)]
Fix hooke.ui.commandline imports following hooke.interaction creation.

13 years agoMoved hooke.libpeakspot -> hooke.plugin.peakspot
W. Trevor King [Wed, 12 May 2010 17:41:06 +0000 (13:41 -0400)]
Moved hooke.libpeakspot -> hooke.plugin.peakspot

13 years agoMoved hooke.formatter -> hooke.ui.gui.formatter.
W. Trevor King [Wed, 12 May 2010 17:39:11 +0000 (13:39 -0400)]
Moved hooke.formatter -> hooke.ui.gui.formatter.

The code seemed GUI-specific.

13 years agoMoved Interaction related classes from hooke.command -> hooke.interaction.
W. Trevor King [Wed, 12 May 2010 17:36:27 +0000 (13:36 -0400)]
Moved Interaction related classes from hooke.command -> hooke.interaction.

Breaking them out makes hooke.command clearer for new readers.

Also moved remaining libhooke functionality ->
hooke.ui.gui.point_request, although it will need reworking (like the
rest of the stuff in hooke.ui.gui) once I finish the architecture
transition.

13 years agoRemoved hooke.liboutlet/.libviewer/.plugin.viewer.
W. Trevor King [Wed, 12 May 2010 17:12:41 +0000 (13:12 -0400)]
Removed hooke.liboutlet/.libviewer/.plugin.viewer.

Functionality superseded by hooke.ui.

13 years agoRemoved hooke.libinput
W. Trevor King [Wed, 12 May 2010 16:54:35 +0000 (12:54 -0400)]
Removed hooke.libinput

Functionality superseded by hooke.command.Request/.Response.

13 years agoUse *_SETTING_SECTION in hooke.plugin/.driver/.ui for section name
W. Trevor King [Wed, 12 May 2010 15:49:26 +0000 (11:49 -0400)]
Use *_SETTING_SECTION in hooke.plugin/.driver/.ui for section name

Avoid constant duplication in code (brittle).

13 years agoRemoved hooke.hooke.TestHooke.
W. Trevor King [Wed, 12 May 2010 15:23:03 +0000 (11:23 -0400)]
Removed hooke.hooke.TestHooke.

I couldn't find a flexible enough equality comparison between the two
Hooke instances.  It doesn't seem worth it to add .__eq__ or .__cmp__
methods to all of my classes just to test Queue-proof-ness.  Maybe I'm
just lazy...  Anyhow, the original problem case now works:

  $echo 'debug' | python bin/hooke
  This is Hooke, version 0.9.0.devel (Kenzo)

  COPYRIGHT
  ----
  hooke> <hooke.hooke.Hooke object at 0xb6a0bcac>
  Success
  ...

13 years agoFix problem in Queuing odict/HookeConfigParser.
W. Trevor King [Wed, 12 May 2010 15:03:46 +0000 (11:03 -0400)]
Fix problem in Queuing odict/HookeConfigParser.

I'm not sure why odict.__setstate__() is not being called before
.__setitem__(), but this hack seems to be a valid workaround.

13 years agoAdded hooke.config.TestHookeConfigParser
W. Trevor King [Wed, 12 May 2010 15:02:50 +0000 (11:02 -0400)]
Added hooke.config.TestHookeConfigParser

Used hooke.hooke.TestHooke to isolate Queue issue to
HookeConfigParser:

  ======================================================================
  ERROR: Ensure :class:`HookeConfigParser` is Queue-safe
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/tmp/hooke/hooke/config.py", line 270, in test_queue_safe
      b = q.get(a)
    File "/usr/lib/python2.6/multiprocessing/queues.py", line 91, in get
      res = self._recv()
    File "/tmp/hooke/hooke/compat/odict.py", line 214, in __setitem__
      self._keys.append(key)
  AttributeError: 'odict' object has no attribute '_keys'

13 years agoAdded hooke.hooke.TestHooke
W. Trevor King [Wed, 12 May 2010 13:01:46 +0000 (09:01 -0400)]
Added hooke.hooke.TestHooke