Skip to content

Commit

Permalink
refactor: removes jsonschema dependency (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
pallabpain authored Sep 12, 2024
1 parent 065d95d commit 0e70d85
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 87 deletions.
1 change: 0 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ six = ">=1.13.0"
urllib3 = ">=1.23"
python-dateutil = ">=2.8.1"
pytz = "*"
jsonschema = "==4.0.0"
pyyaml = ">=5.4.1"

[dev-packages]
Expand Down
88 changes: 19 additions & 69 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 7 additions & 16 deletions rapyuta_io/rio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from __future__ import absolute_import

import json
import jsonschema
import os

import six
Expand All @@ -13,27 +12,20 @@
from rapyuta_io.clients.core_api_client import CoreAPIClient
from rapyuta_io.clients.deployment import Deployment
from rapyuta_io.clients.device import Device
from rapyuta_io.clients.metrics import QueryMetricsRequest, MetricOperation, \
MetricFunction, QueryMetricsResponse, \
ListMetricsRequest, ListTagKeysRequest, \
Metric, Tags, ListTagValuesRequest
from rapyuta_io.clients.metrics import ListMetricsRequest, ListTagKeysRequest, ListTagValuesRequest, Metric, \
MetricFunction, MetricOperation, QueryMetricsRequest, QueryMetricsResponse, Tags
from rapyuta_io.clients.native_network import NativeNetwork
from rapyuta_io.clients.package import Package
from rapyuta_io.clients.package import Runtime, ROSDistro, RestartPolicy
from rapyuta_io.clients.package import Package, ROSDistro, RestartPolicy, Runtime
from rapyuta_io.clients.persistent_volumes import VolumeInstance
from rapyuta_io.clients.project import Project
from rapyuta_io.clients.rip_client import RIPClient, AuthTokenLevel
from rapyuta_io.clients.rosbag import ROSBagJob, ROSBagJobStatus, ROSBagBlob, \
ROSBagBlobStatus
from rapyuta_io.clients.routed_network import RoutedNetwork, Parameters
from rapyuta_io.clients.rip_client import AuthTokenLevel, RIPClient
from rapyuta_io.clients.rosbag import ROSBagBlob, ROSBagBlobStatus, ROSBagJob, ROSBagJobStatus
from rapyuta_io.clients.routed_network import Parameters, RoutedNetwork
from rapyuta_io.clients.secret import Secret
from rapyuta_io.clients.user_group import UserGroup
from rapyuta_io.utils import InvalidAuthTokenException, \
InvalidParameterException
from rapyuta_io.utils import to_objdict
from rapyuta_io.utils import InvalidAuthTokenException, InvalidParameterException, to_objdict
from rapyuta_io.utils.settings import VOLUME_PACKAGE_ID, default_host_config
from rapyuta_io.utils.utils import get_api_response_data, valid_list_elements
from rapyuta_io.clients.validation_schema import UPDATE_DEPLOYMENT_SCHEMA


class Client(object):
Expand Down Expand Up @@ -356,7 +348,6 @@ def update_deployment(self, payload, retry_limit=0):
>>> status = client.update_deployment(payload)
"""
jsonschema.validate(instance=payload, schema=UPDATE_DEPLOYMENT_SCHEMA)
return self._catalog_client.update_deployment(payload, retry_limit)

def get_authenticated_user(self):
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"pytz",
"pyyaml>=5.4.1",
"setuptools",
"jsonschema==4.0.0",
],
extras_require={
"dev": ["sphinx", "furo"],
Expand Down

0 comments on commit 0e70d85

Please sign in to comment.