Skip to content

Commit

Permalink
Merge pull request #57 from marl/final-0.2.0
Browse files Browse the repository at this point in the history
Final 0.2.0
  • Loading branch information
bmcfee committed Aug 31, 2015
2 parents 5793ce2 + 37dc615 commit 86f4b1a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/jams_structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ JAMS
A JAMS object consists of three basic properties:
* ``file_metadata``, which describes the audio file to which these annotations are attached;
* ``annotations``, a list of Annotation_ objects (described below); and
* ``sandbox``, an un-restricted place to store any additional data.
* ``sandbox``, an unrestricted place to store any additional data.


FileMetadata
Expand All @@ -32,13 +32,13 @@ Each annotation object contains the following properties:
* ``value`` : actual annotation (e.g., chord, segment label)
* ``confidence`` : certainty of the annotation
* ``annotation_metadata`` : see Annotation_Metadata_; and
* ``sandbox`` : additional un-structured storage space for this annotation.
* ``sandbox`` : additional unstructured storage space for this annotation.

The permissible contents of the ``value`` and ``confidence`` fields are defined by the ``namespace``.

Annotation_Metadata
~~~~~~~~~~~~~~~~~~~
The metadata associated with each annotation describes the process by which the annotation was generated.
The meta-data associated with each annotation describes the process by which the annotation was generated.
The ``annotation_metadata`` property has the following fields:

* ``corpus``: a string describing a corpus to which this annotation belongs;
Expand Down
18 changes: 9 additions & 9 deletions jams/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def __schema__(self):

@property
def __json__(self):
r"""Return the JObject as a set of native datatypes for serialization.
r"""Return the JObject as a set of native data types for serialization.
Note: attributes beginning with underscores are suppressed.
"""
Expand All @@ -249,7 +249,7 @@ def __json__(self):

@classmethod
def __json_init__(cls, **kwargs):
"""TODO([email protected]): writeme."""
"""Initialize the object from a dictionary of values"""
return cls(**kwargs)

def __eq__(self, other):
Expand All @@ -260,7 +260,7 @@ def __nonzero__(self):
return bool(self.__json__)

def __getitem__(self, key):
"""TODO([email protected]): writeme."""
"""Dict-style interface"""
return self.__dict__[key]

def __setattr__(self, name, value):
Expand Down Expand Up @@ -326,7 +326,7 @@ def keys(self):

def update(self, **kwargs):
'''Update the attributes of a JObject.
Parameters
----------
kwargs
Expand All @@ -351,7 +351,7 @@ def type(self):

@classmethod
def loads(cls, string):
'''Deserialize a JObject
'''De-serialize a JObject
Parameters
----------
Expand Down Expand Up @@ -493,7 +493,7 @@ class Sandbox(JObject):


class JamsFrame(pd.DataFrame):
'''A dataframe class for JAMS.
'''A data-frame class for JAMS.
This automates certain niceties, such as timestamp
conversion and serialization.
Expand Down Expand Up @@ -1038,7 +1038,7 @@ def __init__(self, annotations=None, file_metadata=None, sandbox=None):
Parameters
----------
annotations : list of Annotations
Zero or more Annotation objcets
Zero or more Annotation objects
file_metadata : FileMetadata (or dict), default=None
Metadata corresponding to the audio file.
Expand Down Expand Up @@ -1266,7 +1266,7 @@ def match_query(string, query):
-------
match : bool
`True` if `query` is a callable and `query(string) == True`
or if `query` is a regexp and `re.match(query, regexp)`
or if `query` is a regular expression and `re.match(query, string)`
`False` otherwise
Expand All @@ -1288,7 +1288,7 @@ def match_query(string, query):
def serialize_obj(obj):
'''Custom serialization functionality for working with advanced data types.
- Timedelta objects are convered to floats (in seconds)
- Timedelta objects are converted to floats (in seconds)
- numpy arrays are converted to lists
- lists are recursively serialized element-wise
Expand Down
2 changes: 1 addition & 1 deletion jams/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"""Version info"""

short_version = '0.2'
version = '0.2.0rc3'
version = '0.2.0'

0 comments on commit 86f4b1a

Please sign in to comment.