schrodinger.test.performance.client module¶
- class schrodinger.test.performance.client.PerformanceTestClient(username=None)[source]¶
Bases:
schrodinger.test.stu.client._BaseClient
- getSingleEntityFromResponse(response: requests.models.Response, exception_missing_key_message: str = "Response does not contain the 'objects' key", exception_mulitple_objects_msg: str = "Response contains multiple 'objects', expecting only one") dict [source]¶
Take a response object, extract JSON, validate its contents. Return a single object if exists, return None of zero objects found, raise BedResponse exception otherwise.
- get_or_create(url: str, params: dict) str [source]¶
Get or create a resource matching the parameters.
- get_or_create_test(name: str, description: str, product_name: str, scival=False)[source]¶
Get or create a single test from the performance database.
Setting
scival
toTrue
will add the ‘scival’ tag when creating a new test.
- property auth¶
- delete(uri, **kwargs)¶
- property fullapi¶
- get(uri, **kwargs)¶
- getResourceURI(response=None)¶
Get an API rooted address from a full address.
- classmethod instance(username, base_url=None, api_version=1)¶
- item_uri(item)¶
- list2str(items)¶
- patch(uri, required_statuses=(202,), **kwargs)¶
- post(uri, required_statuses=(201,), **kwargs)¶
- put(uri, **kwargs)¶
- safename(oldname)¶
Ensure that the name is safe and that path separators are consistent on Linux and Windows.
- Parameters
oldname (str) – String to be protected
- Return type
str
- Returns
String with with all path separators replaced by / and all non-URL-safe characters protected.