Skip to content

Commit

Permalink
Merge pull request #67 from rapyuta-robotics/devel
Browse files Browse the repository at this point in the history
🎉 release: v1.12.0
  • Loading branch information
ankitrgadiya authored Sep 26, 2023
2 parents 9b0433e + c0a0625 commit d1ab2ca
Show file tree
Hide file tree
Showing 12 changed files with 569 additions and 845 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
python-version: [ '3.8', '3.9', '3.10' ]
steps:
- name: Checkout Code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Rapyuta.io Python SDK enables you to access platform services and resources in
your python applications.

The SDK supports Python 3.7+. For older Python 2.x support, you can use the
The SDK supports Python 3.8+. For older Python 2.x support, you can use the
0.x.x [releases](https://pypi.org/project/rapyuta-io/#history) from Pypi.

## Install
Expand Down
7 changes: 5 additions & 2 deletions rapyuta_io/clients/user_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __int__(self, guid=None, name=None, description=None,
self.members = members
self.admins = admins
self.projects = projects
self.role_in_projects = []

@staticmethod
def validate(self, guid, name, description, creator, members, admins, projects):
Expand All @@ -58,7 +59,8 @@ def get_serialize_map(self):
'creator': 'creator',
'members': 'members',
'admins': 'admins',
'projects': 'projects'
'projects': 'projects',
'userGroupRoleInProjects': 'role_in_projects',
}

def get_deserialize_map(self):
Expand All @@ -69,5 +71,6 @@ def get_deserialize_map(self):
'creator': 'creator',
'members': list_field('members', User),
'admins': list_field('admins', User),
'projects': list_field('projects', Project)
'projects': list_field('projects', Project),
'role_in_projects': 'userGroupRoleInProjects'
}
1 change: 0 additions & 1 deletion sdk_test/coreapi/usergroup_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import unittest

from build.lib.rapyuta_io.utils.utils import generate_random_value
from rapyuta_io import UserGroup, Project

from sdk_test.config import Configuration
Expand Down
16 changes: 9 additions & 7 deletions sdk_test/jsons/packages/talker-docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "talker-docker",
"packageVersion": "v1.0.0",
"description": "talker-docker sdk test package",
"bindable": true,
"plans": [
{
"name": "default",
Expand All @@ -26,24 +27,25 @@
"ros_distro": "melodic"
},
"requiredRuntime": "device",
"restart_policy": "no",
"architecture": "amd64",
"executables": [
{
"name": "talkerExec",
"gitExecutable": {
"repository": "https://github.com/bhuvanchandra/ros_talker_py.git",
"strategyType": "Source",
"dockerFilePath": "",
"contextDir": ""
"simulationOptions": {
"simulation": false
},
"cmd": [
"roslaunch talker talker.launch"
]
],
"docker": "quay.io/rapyuta/io_tutorials:latest"
}
],
"parameters": []
"parameters": [],
"rosBagJobDefs": []
}
],
"includePackages": [],
"dependentDeployments": [],
"exposedParameters": [],
"inboundROSInterfaces": {
Expand Down
285 changes: 0 additions & 285 deletions sdk_test/package/build_tests.py

This file was deleted.

2 changes: 1 addition & 1 deletion sdk_test/package/deployment_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_component_context(component_info):

if len(executables) > 0:
result[component["componentID"]] = comp
comp["executables"] = executables
comp["component"] = {"executables": executables}
comp["update_deployment"] = True

return result
1,047 changes: 524 additions & 523 deletions sdk_test/package/rosbag_test.py

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions sdk_test/package/routed_networks_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ def validate_refresh(self, guid):
self.assertFalse(partial_net.is_partial)
self.assertTrue(partial_net.internalDeploymentStatus.status)

def assert_routed_network_parameters(self, parameters, network):
self.assertEqual(parameters['device_id'], self.docker_device.deviceId)
self.assertEqual(parameters['NETWORK_INTERFACE'], network)
self.assertEqual(parameters['restart_policy'], RestartPolicy.OnFailure)

def test_add_device_routed_network(self):
self.logger.info('Started creating device routed network')
self.create_routed_network(Runtime.DEVICE, {'device_id': self.docker_device.deviceId,
Expand All @@ -84,9 +89,7 @@ def test_add_device_routed_network(self):
self.routed_network = self.config.client.get_routed_network(self.routed_network.guid)
self.assertEqual(self.routed_network.runtime, 'device')
self.assertEqual(self.routed_network.guid, self.routed_network.guid)
self.assertEqual(self.routed_network.parameters, {'device_id': self.docker_device.deviceId,
'NETWORK_INTERFACE': 'lo',
'restart_policy': RestartPolicy.OnFailure})
self.assert_routed_network_parameters(self.routed_network.parameters, 'lo')
self.assert_deployment_status(self.routed_network)
self.assert_routed_network_present_in_list(self.routed_network.guid)

Expand Down Expand Up @@ -146,9 +149,7 @@ def test_create_device_routed_network(self):
self.routed_network = self.config.client.get_routed_network(self.routed_network.guid)
self.assertEqual(self.routed_network.runtime, 'device')
self.assertEqual(self.routed_network.guid, self.routed_network.guid)
self.assertEqual(self.routed_network.parameters, {'device_id': self.docker_device.deviceId,
'NETWORK_INTERFACE': 'docker0',
'restart_policy': RestartPolicy.OnFailure})
self.assert_routed_network_parameters(self.routed_network.parameters, 'docker0')
self.assert_deployment_status(self.routed_network)
self.assert_routed_network_present_in_list(self.routed_network.guid)
guid = self.routed_network.guid
Expand Down
12 changes: 7 additions & 5 deletions sdk_test/package/static_route_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ def test_get_static_route_by_name_404_case(self):
route = self.config.client.get_static_route_by_name('temp')
self.assertIsNone(route)

def test_get_static_route_by_name_success(self):
self._create_static_routes()
route = self.config.client.get_static_route_by_name(self.STATIC_ROUTE_1)
route_name = route['urlPrefix'].split('-')[0]
self.assertEqual(route_name, self.STATIC_ROUTE_1)
# TODO(senapati): This test is commented because filter static route
# API is deprecated in v1 api server.
# def test_get_static_route_by_name_success(self):
# self._create_static_routes()
# route = self.config.client.get_static_route_by_name(self.STATIC_ROUTE_1)
# route_name = route['urlPrefix'].split('-')[0]
# self.assertEqual(route_name, self.STATIC_ROUTE_1)

def test_delete_static_route_success(self):
route1 = self.config.client.create_static_route(self.STATIC_ROUTE_1)
Expand Down
24 changes: 13 additions & 11 deletions sdk_test/package/transformer_with_docker_device_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,16 @@ def deploy_listener_package(self, device):
ignored_device_configs)
self.assert_dependent_deployment(self.listener_deployment, [self.cloud_transform_deployment])

def test_deploy_transformer_with_docker_device(self):
self.logger.info('Started transformer with docker device test case')
self.deploy_talker_package(self.device)
self.talker_deployment.poll_deployment_till_ready()
self.assert_deployment_status(self.talker_deployment)
self.deploy_cloud_transform_package()
self.cloud_transform_deployment.poll_deployment_till_ready()
self.assert_deployment_status(self.cloud_transform_deployment)
self.deploy_listener_package(self.device)
self.listener_deployment.poll_deployment_till_ready()
self.assert_deployment_status(self.listener_deployment)
# TODO(senapati): This test is commented as its using build based package
# which is not supported anymore
# def test_deploy_transformer_with_docker_device(self):
# self.logger.info('Started transformer with docker device test case')
# self.deploy_talker_package(self.device)
# self.talker_deployment.poll_deployment_till_ready()
# self.assert_deployment_status(self.talker_deployment)
# self.deploy_cloud_transform_package()
# self.cloud_transform_deployment.poll_deployment_till_ready()
# self.assert_deployment_status(self.cloud_transform_deployment)
# self.deploy_listener_package(self.device)
# self.listener_deployment.poll_deployment_till_ready()
# self.assert_deployment_status(self.listener_deployment)
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
author="Rapyuta Robotics",
author_email="[email protected]",
packages=find_packages(include=["rapyuta_io*"]),
python_requires=">=3.7",
python_requires=">=3.8",
license="Apache 2.0",
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down

0 comments on commit d1ab2ca

Please sign in to comment.