ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm...@apache.org
Subject incubator-ariatosca git commit: fixed parser imports and some linting [Forced Update!]
Date Wed, 16 Nov 2016 09:44:08 GMT
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-21-reorder-repository-sturcutre 36afcba15 -> ee06b34d5 (forced update)


fixed parser imports and some linting


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/ee06b34d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/ee06b34d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/ee06b34d

Branch: refs/heads/ARIA-21-reorder-repository-sturcutre
Commit: ee06b34d5e6a265e7d5f48ceea10e62e3185c92e
Parents: 675b820
Author: mxmrlv <mxmrlv@gmail.com>
Authored: Wed Nov 16 11:36:56 2016 +0200
Committer: mxmrlv <mxmrlv@gmail.com>
Committed: Wed Nov 16 11:43:58 2016 +0200

----------------------------------------------------------------------
 aria/exceptions.py                                            | 2 --
 aria/orchestrator/__init__.py                                 | 2 +-
 aria/orchestrator/context/common.py                           | 3 ++-
 aria/parser/modeling/context.py                               | 5 ++++-
 aria/parser/modeling/elements.py                              | 6 ++++--
 aria/parser/modeling/instance_elements.py                     | 6 ++++--
 aria/parser/modeling/model_elements.py                        | 7 +++++--
 aria/parser/modeling/types.py                                 | 6 ++++--
 aria/parser/modeling/utils.py                                 | 7 +++++--
 aria/parser/presentation/fields.py                            | 5 ++++-
 aria/parser/reading/json.py                                   | 5 ++++-
 aria/parser/reading/yaml.py                                   | 5 ++++-
 aria/parser/specification.py                                  | 6 ++++--
 aria/parser/tools/rest.py                                     | 6 +++++-
 aria/parser/utils/caching.py                                  | 6 ++++--
 aria/parser/utils/collections.py                              | 6 +++++-
 aria/parser/utils/daemon.py                                   | 6 +++---
 aria/parser/utils/formatting.py                               | 6 ++++--
 aria/parser/utils/rest_server.py                              | 6 ++++--
 aria/parser/validation/issue.py                               | 5 ++++-
 extensions/aria_extension_tosca/simple_v1_0/data_types.py     | 5 ++++-
 .../aria_extension_tosca/simple_v1_0/modeling/artifacts.py    | 5 ++++-
 .../aria_extension_tosca/simple_v1_0/modeling/capabilities.py | 5 ++++-
 .../aria_extension_tosca/simple_v1_0/modeling/data_types.py   | 5 ++++-
 .../aria_extension_tosca/simple_v1_0/modeling/interfaces.py   | 5 ++++-
 .../aria_extension_tosca/simple_v1_0/modeling/properties.py   | 5 ++++-
 .../aria_extension_tosca/simple_v1_0/modeling/requirements.py | 6 ++++--
 tests/test_logger.py                                          | 2 --
 28 files changed, 102 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/exceptions.py
----------------------------------------------------------------------
diff --git a/aria/exceptions.py b/aria/exceptions.py
index 1e99c4e..472b264 100644
--- a/aria/exceptions.py
+++ b/aria/exceptions.py
@@ -25,5 +25,3 @@ class AriaError(Exception):
     General aria exception
     """
     pass
-
-

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/orchestrator/__init__.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/__init__.py b/aria/orchestrator/__init__.py
index cf2f066..a5aeec7 100644
--- a/aria/orchestrator/__init__.py
+++ b/aria/orchestrator/__init__.py
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from decorators import workflow, operation
+from .decorators import workflow, operation
 
 from . import (
     context,

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/orchestrator/context/common.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/context/common.py b/aria/orchestrator/context/common.py
index 2142d01..48f4557 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -17,7 +17,8 @@ A common context for both workflow and operation
 """
 from uuid import uuid4
 
-from aria import logger, exceptions
+from aria import logger
+from aria.storage import exceptions
 from aria.tools.lru_cache import lru_cache
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/modeling/context.py
----------------------------------------------------------------------
diff --git a/aria/parser/modeling/context.py b/aria/parser/modeling/context.py
index 817ec15..9e64ac5 100644
--- a/aria/parser/modeling/context.py
+++ b/aria/parser/modeling/context.py
@@ -13,7 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 import itertools
 
 from ..utils import StrictDict, prune, puts, as_raw

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/modeling/elements.py
----------------------------------------------------------------------
diff --git a/aria/parser/modeling/elements.py b/aria/parser/modeling/elements.py
index 8974fd6..ffde635 100644
--- a/aria/parser/modeling/elements.py
+++ b/aria/parser/modeling/elements.py
@@ -13,8 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
-
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 from ..utils import StrictDict, puts
 from .utils import coerce_value
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/modeling/instance_elements.py
----------------------------------------------------------------------
diff --git a/aria/parser/modeling/instance_elements.py b/aria/parser/modeling/instance_elements.py
index d3e7359..5fbf4f4 100644
--- a/aria/parser/modeling/instance_elements.py
+++ b/aria/parser/modeling/instance_elements.py
@@ -13,8 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
-
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 from ..validation import Issue
 from ..utils import (StrictList, StrictDict, FrozenList, puts, indent, as_raw, as_raw_list,\
                      as_raw_dict, as_agnostic, safe_repr)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/modeling/model_elements.py
----------------------------------------------------------------------
diff --git a/aria/parser/modeling/model_elements.py b/aria/parser/modeling/model_elements.py
index 66989e3..ec081e7 100644
--- a/aria/parser/modeling/model_elements.py
+++ b/aria/parser/modeling/model_elements.py
@@ -14,10 +14,13 @@
 # limitations under the License.
 
 from __future__ import absolute_import  # so we can import standard 'types'
-
-from collections import OrderedDict
 from types import FunctionType
 
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
+
 from ..validation import Issue
 from ..utils import (StrictList, StrictDict, puts, safe_repr, as_raw, as_raw_list, as_raw_dict,
                      as_agnostic, deepcopy_with_locators)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/modeling/types.py
----------------------------------------------------------------------
diff --git a/aria/parser/modeling/types.py b/aria/parser/modeling/types.py
index c241131..4795fe0 100644
--- a/aria/parser/modeling/types.py
+++ b/aria/parser/modeling/types.py
@@ -13,8 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
-
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 from ..utils import StrictList, StrictDict, puts, as_raw
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/modeling/utils.py
----------------------------------------------------------------------
diff --git a/aria/parser/modeling/utils.py b/aria/parser/modeling/utils.py
index 57bdacc..5d99eb5 100644
--- a/aria/parser/modeling/utils.py
+++ b/aria/parser/modeling/utils.py
@@ -13,9 +13,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
-from collections import OrderedDict
 from random import randrange
+
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 from shortuuid import ShortUUID
 
 from .. import InvalidValueError

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/presentation/fields.py
----------------------------------------------------------------------
diff --git a/aria/parser/presentation/fields.py b/aria/parser/presentation/fields.py
index 4669fee..a3a9f12 100644
--- a/aria/parser/presentation/fields.py
+++ b/aria/parser/presentation/fields.py
@@ -16,7 +16,10 @@
 import threading
 from functools import wraps
 from types import MethodType
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 
 from ..exceptions import InvalidValueError, AriaException
 from ..utils import (FrozenList, FrozenDict, print_exception, deepcopy_with_locators, merge,

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/reading/json.py
----------------------------------------------------------------------
diff --git a/aria/parser/reading/json.py b/aria/parser/reading/json.py
index 4747651..24c4df0 100644
--- a/aria/parser/reading/json.py
+++ b/aria/parser/reading/json.py
@@ -13,7 +13,10 @@
 from __future__ import absolute_import  # so we can import standard 'json'
 
 import json
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 
 from .reader import Reader
 from .exceptions import ReaderSyntaxError

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/reading/yaml.py
----------------------------------------------------------------------
diff --git a/aria/parser/reading/yaml.py b/aria/parser/reading/yaml.py
index 55bcbd6..097816a 100644
--- a/aria/parser/reading/yaml.py
+++ b/aria/parser/reading/yaml.py
@@ -10,7 +10,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 
 from ruamel import yaml # @UnresolvedImport
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/specification.py
----------------------------------------------------------------------
diff --git a/aria/parser/specification.py b/aria/parser/specification.py
index 7a269f5..ec9959a 100644
--- a/aria/parser/specification.py
+++ b/aria/parser/specification.py
@@ -13,8 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
-
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 from .utils import full_type_name
 
 DSL_SPECIFICATION = {}

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/tools/rest.py
----------------------------------------------------------------------
diff --git a/aria/parser/tools/rest.py b/aria/parser/tools/rest.py
index d4997d8..5c3dd5e 100644
--- a/aria/parser/tools/rest.py
+++ b/aria/parser/tools/rest.py
@@ -15,9 +15,13 @@
 
 import os
 import urllib
-from collections import OrderedDict
 from urlparse import (urlparse, parse_qs)
 
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
+
 from ..loading import LiteralLocation
 from .. import install_aria_extensions
 from .utils import (CommonArgumentParser,

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/utils/caching.py
----------------------------------------------------------------------
diff --git a/aria/parser/utils/caching.py b/aria/parser/utils/caching.py
index 0b21560..8ebeef7 100644
--- a/aria/parser/utils/caching.py
+++ b/aria/parser/utils/caching.py
@@ -17,8 +17,10 @@ from __future__ import absolute_import  # so we can import standard 'collections
 
 from threading import Lock
 from functools import partial
-from collections import OrderedDict
-
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 
 
 class cachedmethod(object):  # pylint: disable=invalid-name

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/utils/collections.py
----------------------------------------------------------------------
diff --git a/aria/parser/utils/collections.py b/aria/parser/utils/collections.py
index d4b461d..ae45b25 100644
--- a/aria/parser/utils/collections.py
+++ b/aria/parser/utils/collections.py
@@ -16,7 +16,11 @@
 from __future__ import absolute_import  # so we can import standard 'collections'
 
 from copy import deepcopy
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
+
 
 def cls_name(cls):
     module = str(cls.__module__)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/utils/daemon.py
----------------------------------------------------------------------
diff --git a/aria/parser/utils/daemon.py b/aria/parser/utils/daemon.py
index c9cbd35..b47eea1 100644
--- a/aria/parser/utils/daemon.py
+++ b/aria/parser/utils/daemon.py
@@ -16,13 +16,13 @@
 from __future__ import absolute_import  # so we can import standard 'daemon'
 
 try:
+    import os
+    import signal
+    from time import sleep
     from .console import puts, Colored
     from daemon import DaemonContext
     from daemon.pidfile import TimeoutPIDLockFile
     from daemon.runner import is_pidfile_stale
-    from time import sleep
-    import os
-    import signal
 
     def start_daemon(pidfile_path, log_path, acquire_timeout=5):
         pidfile = TimeoutPIDLockFile(pidfile_path, acquire_timeout=acquire_timeout)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/utils/formatting.py
----------------------------------------------------------------------
diff --git a/aria/parser/utils/formatting.py b/aria/parser/utils/formatting.py
index 222dac9..0a7b34d 100644
--- a/aria/parser/utils/formatting.py
+++ b/aria/parser/utils/formatting.py
@@ -17,8 +17,10 @@ from __future__ import absolute_import  # so we can import standard 'collections
 
 import json
 from types import MethodType
-from collections import OrderedDict
-
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 from ruamel import yaml  # @UnresolvedImport
 
 from aria.parser.utils.collections import (FrozenList, FrozenDict, StrictList, StrictDict)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/utils/rest_server.py
----------------------------------------------------------------------
diff --git a/aria/parser/utils/rest_server.py b/aria/parser/utils/rest_server.py
index 9e842e7..17823f1 100644
--- a/aria/parser/utils/rest_server.py
+++ b/aria/parser/utils/rest_server.py
@@ -21,8 +21,10 @@ import shutil
 import json
 import sys
 import BaseHTTPServer
-from collections import OrderedDict
-
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 from ..utils import (puts, Colored)
 
 class RestServer(object):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/aria/parser/validation/issue.py
----------------------------------------------------------------------
diff --git a/aria/parser/validation/issue.py b/aria/parser/validation/issue.py
index a36fe6c..7c73b1c 100644
--- a/aria/parser/validation/issue.py
+++ b/aria/parser/validation/issue.py
@@ -15,7 +15,10 @@
 
 from __future__ import absolute_import  # so we can import standard 'collections'
 
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 from ..utils import full_type_name
 
 class Issue(object):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/extensions/aria_extension_tosca/simple_v1_0/data_types.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/data_types.py b/extensions/aria_extension_tosca/simple_v1_0/data_types.py
index 40e1e21..e9cd97c 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/data_types.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/data_types.py
@@ -14,7 +14,10 @@
 # limitations under the License.
 
 import re
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 from functools import total_ordering
 from datetime import datetime, tzinfo, timedelta
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/extensions/aria_extension_tosca/simple_v1_0/modeling/artifacts.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/artifacts.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/artifacts.py
index f28f429..f5667a6 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/artifacts.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/artifacts.py
@@ -13,7 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 
 #
 # NodeType, NodeTemplate

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
index f9e293d..4a96b04 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
@@ -13,7 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 
 from aria.parser.utils import deepcopy_with_locators
 from aria.parser.validation import Issue

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
index 9b0edb8..d98bc54 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
@@ -14,7 +14,10 @@
 # limitations under the License.
 
 import re
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 
 from aria.parser import dsl_specification
 from aria.parser.presentation import (get_locator, validate_primitive)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/extensions/aria_extension_tosca/simple_v1_0/modeling/interfaces.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/interfaces.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/interfaces.py
index 1d734cf..bffb5dc 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/interfaces.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/interfaces.py
@@ -13,7 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 
 from aria.parser.presentation import get_locator
 from aria.parser.utils import (merge, deepcopy_with_locators)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
index d803609..439f44c 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
@@ -13,7 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 
 from aria.parser.presentation import Value
 from aria.parser.utils import (merge, deepcopy_with_locators)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/extensions/aria_extension_tosca/simple_v1_0/modeling/requirements.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/requirements.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/requirements.py
index 721ea09..068dde0 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/requirements.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/requirements.py
@@ -13,8 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from collections import OrderedDict
-
+try:
+    from collections import OrderedDict
+except ImportError:
+    from ordereddict import OrderedDict
 from aria.parser.validation import Issue
 from aria.parser.utils import deepcopy_with_locators
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ee06b34d/tests/test_logger.py
----------------------------------------------------------------------
diff --git a/tests/test_logger.py b/tests/test_logger.py
index d3c1a73..8c7a9af 100644
--- a/tests/test_logger.py
+++ b/tests/test_logger.py
@@ -22,8 +22,6 @@ from aria.logger import (create_logger,
                          _default_file_formatter,
                          LoggerMixin,
                          _DefaultConsoleFormat)
-def test():
-    pass
 
 def test_create_logger():
 


Mime
View raw message