summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
W. Trevor King [Sat, 19 Jan 2013 03:15:29 +0000 (22:15 -0500)]
storage:hdf5: Add support for dtype(object) and 0d string arrays
I'm not sure if it was a due to upgrading libhdf5, h5py, or Numpy, but
I'm getting strings back as `array('abc', dtype=object)` instead of
`array('abc', dtype='|S3')`. Add some 0d-array-extraction logic to
handle this case.
W. Trevor King [Sat, 20 Oct 2012 11:13:33 +0000 (07:13 -0400)]
.update-copyright.conf: update to pipe separators.
This brings the config file up to speed with the following
update-copyright commit:
commit
3c68a1a48419d8b2bbc2ce0e7f1700b996ec30e9
Author: W. Trevor King <wking@tremily.us>
Date: Fri Oct 19 21:52:48 2012 -0400
project: for consistency, also separate ignored paths with pipes
W. Trevor King [Wed, 12 Sep 2012 20:52:22 +0000 (16:52 -0400)]
storage:hdf5: convert int/float lists to builtin Python types on load.
This avoids loading a FloatListSetting as a list of `numpy.float64`s,
which lead to problems if you attempted to serialize the resulting
config using `YAML_Storage`:
Traceback (most recent call last):
...
File ".../h5config/storage/yaml.py", line 140, in _save
default_flow_style=False)
File "/usr/lib64/python2.7/site-packages/yaml/__init__.py", line 202, in dump
return dump_all([data], stream, Dumper=Dumper, **kwds)
...
File "/usr/lib64/python2.7/site-packages/yaml/representer.py", line 247, in represent_undefined
raise RepresenterError("cannot represent an object: %s" % data)
yaml.representer.RepresenterError: cannot represent an object: 0.0
W. Trevor King [Sun, 22 Jul 2012 16:17:10 +0000 (12:17 -0400)]
Flesh out .gitigore with build files.
W. Trevor King [Sun, 22 Jul 2012 16:16:40 +0000 (12:16 -0400)]
Add MANIFEST.in to distribute COPYING.
W. Trevor King [Sun, 22 Jul 2012 16:15:04 +0000 (12:15 -0400)]
Bump to version 0.2.
W. Trevor King [Fri, 11 May 2012 18:03:09 +0000 (14:03 -0400)]
.update-copyright.conf should not be executable.
W. Trevor King [Fri, 11 May 2012 17:50:15 +0000 (13:50 -0400)]
Ran update-copyright.py.
W. Trevor King [Fri, 11 May 2012 17:48:15 +0000 (13:48 -0400)]
Add .update-copyright.conf.
Use my update-copyright project to manage copyright blurbs.
http://pypi.python.org/pypi/update-copyright/
W. Trevor King [Wed, 18 Apr 2012 17:17:14 +0000 (13:17 -0400)]
Change my email address from drexel.edu to tremily.us.
W. Trevor King [Fri, 30 Mar 2012 04:13:56 +0000 (00:13 -0400)]
More Python 3 fixes, mostly about string/byte/unicode handling.
W. Trevor King [Fri, 30 Mar 2012 03:36:34 +0000 (23:36 -0400)]
Increase Python 3 compatibility (`print()` and `except ... as ...`).
W. Trevor King [Fri, 16 Mar 2012 14:42:02 +0000 (10:42 -0400)]
Don't try and create a directory with a blank string.
W. Trevor King [Fri, 16 Mar 2012 12:57:41 +0000 (08:57 -0400)]
Improve prettyprint message for empty HDF5 files.
W. Trevor King [Fri, 16 Mar 2012 08:38:31 +0000 (04:38 -0400)]
Also adjust HDF5_Storage._load and ._save to work with Group groups.
W. Trevor King [Fri, 16 Mar 2012 08:30:57 +0000 (04:30 -0400)]
Allow HDF5_Storage to be initialized without a filename.
If you use an `h5py.Group` instance for the group, you don't need to
open any files.
W. Trevor King [Fri, 16 Mar 2012 04:07:42 +0000 (00:07 -0400)]
Oops, forgot to import os and os.path for FileStorage._create_basedir().
W. Trevor King [Fri, 16 Mar 2012 04:06:12 +0000 (00:06 -0400)]
Create missing ~/.config directory (and other) if necessary.
W. Trevor King [Fri, 16 Mar 2012 03:55:31 +0000 (23:55 -0400)]
While we're shaking things up, move ~/.PKGrc.yaml -> ~/.config/PKG.yaml.
W. Trevor King [Thu, 15 Mar 2012 17:31:14 +0000 (13:31 -0400)]
Add ListSetting and IntegerListSetting types.
Also add the storage instance to test assertion error. Peering
through the logs looking for 'testing {}' wasn't cutting it ;).
W. Trevor King [Sun, 4 Mar 2012 16:08:17 +0000 (11:08 -0500)]
Oops, use 'v' instead of '' for download URL in setup.py.
W. Trevor King [Fri, 2 Mar 2012 18:42:01 +0000 (13:42 -0500)]
Log useful debugging info when you can't read a data value.
Now you know the field that caused the problem. For example:
Could not access /vibration/0/config/deflection/channel:
'ellipsis' object has no attribute 'encode'
Is more informative than a traceback that doesn't mention the
troublesome field.
W. Trevor King [Wed, 22 Feb 2012 16:50:12 +0000 (11:50 -0500)]
Update URLs from einstein to tremily.
W. Trevor King [Tue, 27 Sep 2011 18:41:24 +0000 (14:41 -0400)]
Rework de-numpy-ing in hdf5 module (now also de-numpy floats and ints).
W. Trevor King [Mon, 26 Sep 2011 00:19:01 +0000 (20:19 -0400)]
Consolidate de-numpy-ing in hdf5 module.
W. Trevor King [Sun, 25 Sep 2011 23:39:17 +0000 (19:39 -0400)]
Adjust ChoiceSetting.convert_from_text to handle numpy character ndarrays.
W. Trevor King [Sun, 25 Sep 2011 23:15:07 +0000 (19:15 -0400)]
Change attribute_name argument to the more flexible get_attribute in Config.select_config.
W. Trevor King [Fri, 23 Sep 2011 16:31:33 +0000 (12:31 -0400)]
Fix item_name -> attribute_name KeyError in select_config().
W. Trevor King [Thu, 8 Sep 2011 21:51:19 +0000 (17:51 -0400)]
Merging is still unimplemented, so raise an exception on Storage.clear().
W. Trevor King [Thu, 8 Sep 2011 21:50:35 +0000 (17:50 -0400)]
Standardize indentation in HDF5_Storage._save.
W. Trevor King [Thu, 8 Sep 2011 21:37:59 +0000 (17:37 -0400)]
Add public Config.set_storage() method.
W. Trevor King [Thu, 8 Sep 2011 15:17:03 +0000 (11:17 -0400)]
Add Config.select_config method and improve Config's docstring.
W. Trevor King [Thu, 8 Sep 2011 14:46:14 +0000 (10:46 -0400)]
Ensure that dumping doesn't crash for populated ConfigSettings.
W. Trevor King [Thu, 8 Sep 2011 14:39:21 +0000 (10:39 -0400)]
Fix nested dumping output (using prefix and nested config names).
W. Trevor King [Thu, 8 Sep 2011 14:34:28 +0000 (10:34 -0400)]
Fix dumping for ConfigListSetting (a subclass of ConfigSetting).
W. Trevor King [Thu, 8 Sep 2011 14:31:06 +0000 (10:31 -0400)]
Fix arbitrart -> arbitrary typo in config.Setting.__doc__.
W. Trevor King [Thu, 8 Sep 2011 14:26:11 +0000 (10:26 -0400)]
Log a useful error message when trying to dump and invalid value.
W. Trevor King [Fri, 29 Jul 2011 12:23:51 +0000 (08:23 -0400)]
Fix v -> value typo in YAML storage loader.
W. Trevor King [Fri, 29 Jul 2011 10:54:07 +0000 (06:54 -0400)]
Numeric types are now stored in native format (vs. old strings).
ChoiceSettings have string-type storage values anyway, so we'll leave
them as strings in the data files.
W. Trevor King [Fri, 29 Jul 2011 04:13:03 +0000 (00:13 -0400)]
Add ability to nest Configs.
I also restructured the storage backends as distinct helper classes
rather than Config subclasses. This means that you can use several
Storage instances to save a single Config instance (although each
Config instance will have a single default Storage instance stored in
config._storage). This avoids all the automatic subclassing
shenanigans, and makes loading and saving from different backends much
easier.
W. Trevor King [Thu, 28 Jul 2011 17:35:12 +0000 (13:35 -0400)]
Split out h5_create_group so it can be used by other modules.
My initial break from pypiezo was not from the pypiezo tip. This
commit pulls in following pypiezo changes:
commit
67d6dca84988d5d4271835522f4697d9e0a2c6f2
Split out h5_create_group so it can be used by other modules.
commit
9afcf604e967123b3cdf2665827afe24a74225f2
Return the group created in h5_create_group().
commit
5d84f6b5392236e8d2b1513178063bfc2a5f5893
Special case for '/' group in h5_create_group.
It also strips trailing whitespace from h5config/hdf5.py.
W. Trevor King [Thu, 28 Jul 2011 17:07:04 +0000 (13:07 -0400)]
PackageConfig should automatically add LOG to namespace.
W. Trevor King [Thu, 28 Jul 2011 16:59:00 +0000 (12:59 -0400)]
Fix name -> package_name typo in logger creation.
W. Trevor King [Thu, 28 Jul 2011 16:41:13 +0000 (12:41 -0400)]
Remove lots of leading underscores, now that we're a stand-alone package.
W. Trevor King [Thu, 28 Jul 2011 16:06:46 +0000 (12:06 -0400)]
Fix reStructuredText typos in README.
W. Trevor King [Thu, 28 Jul 2011 16:05:20 +0000 (12:05 -0400)]
Add missing comma in setup.py.
W. Trevor King [Thu, 28 Jul 2011 13:24:39 +0000 (09:24 -0400)]
Begin versioning (split out from the pypiezo package).