Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spelling of 'serializable' #144

Merged
merged 3 commits into from Aug 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/otioview.py
Expand Up @@ -138,7 +138,7 @@ def load(self, path):
self.sequences_widget.setVisible(False)
elif isinstance(
file_contents,
otio.schema.SerializeableCollection
otio.schema.SerializableCollection
):
for s in file_contents:
TimelineWidgetItem(s, s.name, self.sequences_widget)
Expand Down
4 changes: 2 additions & 2 deletions doc/source/opentimelineio.core.rst
Expand Up @@ -20,10 +20,10 @@ opentimelineio.core.item module
:undoc-members:
:show-inheritance:

opentimelineio.core.serializeable_object module
opentimelineio.core.serializable_object module
-----------------------------------------------

.. automodule:: opentimelineio.core.serializeable_object
.. automodule:: opentimelineio.core.serializable_object
:members:
:undoc-members:
:show-inheritance:
Expand Down
4 changes: 2 additions & 2 deletions opentimelineio/adapters/adapter.py
Expand Up @@ -54,7 +54,7 @@ class Adapter(plugins.PythonPlugin):
For more information:
https://github.com/PixarAnimationStudios/OpenTimelineIO/wiki/How-to-Write-an-OpenTimelineIO-Adapter # noqa
"""
_serializeable_label = "Adapter.1"
_serializable_label = "Adapter.1"

def __init__(
self,
Expand All @@ -74,7 +74,7 @@ def __init__(
suffixes = []
self.suffixes = suffixes

suffixes = core.serializeable_field(
suffixes = core.serializable_field(
"suffixes",
type([]),
doc="File suffixes associated with this adapter."
Expand Down
4 changes: 2 additions & 2 deletions opentimelineio/adapters/fcp_xml.py
Expand Up @@ -502,7 +502,7 @@ def _parse_timeline(sequence, element_map):


def _parse_collection(sequences, element_map):
collection = otio.schema.SerializeableCollection(name='sequences')
collection = otio.schema.SerializableCollection(name='sequences')
collection.extend([_parse_timeline(s, element_map) for s in sequences])
return collection

Expand Down Expand Up @@ -925,7 +925,7 @@ def write_to_string(input_otio):
children_e.append(
_build_sequence(input_otio.tracks, timeline_range, br_map)
)
elif isinstance(input_otio, otio.schema.SerializeableCollection):
elif isinstance(input_otio, otio.schema.SerializableCollection):
children_e.extend(
_build_collection(input_otio, br_map)
)
Expand Down
8 changes: 4 additions & 4 deletions opentimelineio/core/__init__.py
Expand Up @@ -26,10 +26,10 @@

# flake8: noqa

from . import serializeable_object
from .serializeable_object import (
SerializeableObject,
serializeable_field,
from . import serializable_object
from .serializable_object import (
SerializableObject,
serializable_field,
deprecated_field,
)
from .composable import (
Expand Down
12 changes: 6 additions & 6 deletions opentimelineio/core/composable.py
Expand Up @@ -27,36 +27,36 @@
An object that can be composed by sequences.
"""

from . import serializeable_object
from . import serializable_object
from . import type_registry


@type_registry.register_type
class Composable(serializeable_object.SerializeableObject):
class Composable(serializable_object.SerializableObject):
"""An object that can be composed by sequences.

Base class of:
Item
Transition
"""

name = serializeable_object.serializeable_field(
name = serializable_object.serializable_field(
"name",
doc="Composable name."
)
metadata = serializeable_object.serializeable_field(
metadata = serializable_object.serializable_field(
"metadata",
doc="Metadata dictionary for this Composable."
)

_serializeable_label = "Composable.1"
_serializable_label = "Composable.1"
_class_path = "core.Composable"

def __init__(self, name=None, metadata=None):
super(Composable, self).__init__()
self._parent = None

# initialize the serializeable fields
# initialize the serializable fields
self.name = name

if metadata is None:
Expand Down
8 changes: 4 additions & 4 deletions opentimelineio/core/composition.py
Expand Up @@ -27,7 +27,7 @@
import collections

from . import (
serializeable_object,
serializable_object,
type_registry,
item,
composable,
Expand All @@ -47,7 +47,7 @@ class Composition(item.Item, collections.MutableSequence):
directly.
"""

_serializeable_label = "Composition.1"
_serializable_label = "Composition.1"
_composition_kind = "Composition"
_modname = "core"
_composable_base_class = composable.Composable
Expand All @@ -73,7 +73,7 @@ def __init__(
# extra logic (assigning ._parent pointers).
self.extend(children)

_children = serializeable_object.serializeable_field(
_children = serializable_object.serializable_field(
"children",
list,
"Items contained by this composition."
Expand Down Expand Up @@ -111,7 +111,7 @@ def __repr__(self):
)
)

transform = serializeable_object.deprecated_field()
transform = serializable_object.deprecated_field()

def each_child(
self,
Expand Down
16 changes: 8 additions & 8 deletions opentimelineio/core/item.py
Expand Up @@ -29,7 +29,7 @@
)

from . import (
serializeable_object,
serializable_object,
composable,
)

Expand All @@ -47,7 +47,7 @@ class Item(composable.Composable):
- Gap
"""

_serializeable_label = "Item.1"
_serializable_label = "Item.1"
_class_path = "core.Item"

def __init__(
Expand All @@ -58,7 +58,7 @@ def __init__(
markers=None,
metadata=None,
):
serializeable_object.SerializeableObject.__init__(self)
serializable_object.SerializableObject.__init__(self)

self.name = name
self.source_range = source_range
Expand All @@ -77,8 +77,8 @@ def __init__(

self._parent = None

name = serializeable_object.serializeable_field("name", doc="Item name.")
source_range = serializeable_object.serializeable_field(
name = serializable_object.serializable_field("name", doc="Item name.")
source_range = serializable_object.serializable_field(
"source_range",
opentime.TimeRange,
doc="Range of source to trim to. Can be None or a TimeRange."
Expand Down Expand Up @@ -170,15 +170,15 @@ def transformed_time_range(self, tr, to_item):
tr.duration
)

markers = serializeable_object.serializeable_field(
markers = serializable_object.serializable_field(
"markers",
doc="List of markers on this item."
)
effects = serializeable_object.serializeable_field(
effects = serializable_object.serializable_field(
"effects",
doc="List of effects on this item."
)
metadata = serializeable_object.serializeable_field(
metadata = serializable_object.serializable_field(
"metadata",
doc="Metadata dictionary for this item."
)
Expand Down
28 changes: 14 additions & 14 deletions opentimelineio/core/json_serializer.py
Expand Up @@ -22,15 +22,15 @@
# language governing permissions and limitations under the Apache License.
#

"""Serializer for SerializeableObjects to JSON
"""Serializer for SerializableObjects to JSON

Used for the otio_json adapter as well as for plugins and manifests.
"""

import json

from . import (
SerializeableObject,
SerializableObject,
type_registry,
)

Expand All @@ -43,9 +43,9 @@
# @TODO: Handle file version drifting


class _SerializeableObjectEncoder(json.JSONEncoder):
class _SerializableObjectEncoder(json.JSONEncoder):

""" Encoder for the SerializeableObject OTIO Class and its descendents. """
""" Encoder for the SerializableObject OTIO Class and its descendents. """

def default(self, obj):
for typename, encfn in _ENCODER_MAP.items():
Expand All @@ -56,20 +56,20 @@ def default(self, obj):


def serialize_json_to_string(root, sort_keys=True, indent=4):
"""Serialize a tree of SerializeableObject to JSON.
"""Serialize a tree of SerializableObject to JSON.

Returns a JSON string.
"""

return _SerializeableObjectEncoder(
return _SerializableObjectEncoder(
sort_keys=sort_keys,
indent=indent
).encode(root)


def serialize_json_to_file(root, to_file):
"""
Serialize a tree of SerializeableObject to JSON.
Serialize a tree of SerializableObject to JSON.

Writes the result to the given file path.
"""
Expand All @@ -82,13 +82,13 @@ def serialize_json_to_file(root, to_file):
# @{ Encoders


def _encoded_serializeable_object(input_otio):
if not input_otio._serializeable_label:
raise exceptions.InvalidSerializeableLabelError(
input_otio._serializeable_label
def _encoded_serializable_object(input_otio):
if not input_otio._serializable_label:
raise exceptions.InvalidSerializableLabelError(
input_otio._serializable_label
)
result = {
"OTIO_SCHEMA": input_otio._serializeable_label,
"OTIO_SCHEMA": input_otio._serializable_label,
}
result.update(input_otio.data)
return result
Expand Down Expand Up @@ -125,7 +125,7 @@ def _encoded_transform(input_otio):
opentime.RationalTime: _encoded_time,
opentime.TimeRange: _encoded_time_range,
opentime.TimeTransform: _encoded_transform,
SerializeableObject: _encoded_serializeable_object,
SerializableObject: _encoded_serializable_object,
}

# @{ Decoders
Expand Down Expand Up @@ -155,7 +155,7 @@ def _decoded_transform(input_otio):

# Map of explicit decoder functions to schema labels (for opentime)
# because opentime is implemented with no knowledge of OTIO, it doesn't use the
# same pattern as SerializeableObject.
# same pattern as SerializableObject.
_DECODER_FUNCTION_MAP = {
'RationalTime.1': _decoded_time,
'TimeRange.1': _decoded_time_range,
Expand Down