Skip to content

Commit

Permalink
Merge pull request #3 from asmodehn/nested_implement
Browse files Browse the repository at this point in the history
Nested implement
  • Loading branch information
yotabits authored Apr 18, 2017
2 parents 88a9dd4 + b915ecf commit 00e1b57
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 43 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Code Issues](https://www.quantifiedcode.com/api/v1/project/646d87c377144f1fa5c9a328a883c619/badge.svg)](https://www.quantifiedcode.com/app/project/646d87c377144f1fa5c9a328a883c619)
[![Build Status](https://travis-ci.org/asmodehn/pyros-msgs.svg?branch=master)](https://travis-ci.org/asmodehn/pyros-msgs)

# Pyros-msgs
Expand Down
22 changes: 1 addition & 21 deletions pyros_msgs/opt_as_array/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,9 @@
pyros_msgs.opt_as_array is a module that interprets arrays as optional fields in a message.
This is useful if you have an existing ros message type, and want to allow some field to not have any defined value :
An empty array will represent that
An empty array will represent that, but it might be ambiguous...
When importing this module, the ros message field default value for array will be changed to an empty array.
"""


# try:
# import pyros_utils
#
# except ImportError:
# # Because we need to access Ros message types here (from ROS env or from virtualenv, or from somewhere else)
# import pyros_setup
# # We rely on default configuration to point us ot the proper distro
# pyros_setup.configurable_import().configure().activate()
# import pyros_utils
#
# # Fixing out __file__ for proper python behavior
#
# # Getting actual filepath (not ros generated init)
# # detecting and fixing ROS generated __init__.py behavior when importing this package
#
# ros_exec = pyros_utils.get_ros_executed_file()
# if ros_exec:
# __file__ = ros_exec

from .opt_as_array import duck_punch
22 changes: 0 additions & 22 deletions pyros_msgs/opt_as_nested/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,7 @@
This is useful if you want to express an optional field in a message without any ambiguity.
When importing this module, a set of ros messages will be imported, and duck punched to make default value a "non initialized value"
"""
#
# try:
# import pyros_utils
#
# except ImportError:
# # Because we need to access Ros message types here (from ROS env or from virtualenv, or from somewhere else)
# import pyros_setup
# # We rely on default configuration to point us ot the proper distro
# pyros_setup.configurable_import().configure().activate()
# import pyros_utils
#
# # Fixing out __file__ for proper python behavior
#
# # Getting actual filepath (not ros generated init)
# # detecting and fixing ROS generated __init__.py behavior when importing this package
#
# ros_exec = pyros_utils.get_ros_executed_file()
# if ros_exec:
# __file__ = ros_exec

# Now we can import packages relatively

from .opt_as_nested import duck_punch

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def run(self):
# this is needed as install dependency since we embed tests in the package.
# 'pyros_setup>=0.2.1', # needed to grab ros environment even if distro setup.sh not sourced
# 'pyros_utils', # this must be satisfied by the ROS package system...
'pyyaml>=3.10', # genpy relies on this...
'pytest>=2.8.0', # as per hypothesis requirement (careful with 2.5.1 on trusty)
'hypothesis>=3.0.1', # to target xenial LTS version
'numpy>=1.8.2', # from trusty version
Expand Down

0 comments on commit 00e1b57

Please sign in to comment.