Skip to content

Commit

Permalink
Remove outdated editor queries
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermak committed May 23, 2024
1 parent bc1dcb6 commit dad4063
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
29 changes: 0 additions & 29 deletions src/aerie_cli/aerie_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2080,35 +2080,6 @@ def get_resource_types(self, model_id: int) -> List[ResourceType]:
)
return [ResourceType.from_dict(r) for r in resp]

# TODO remove
def get_sequence_json(self, command_dictionary_id: int, edsl_body: str) -> dict:
"""Get user SeqJSON from EDSL
Args:
command_dictionary_id (int): Command dictionary to generate the sequence json with
edsl_body (str): The EDSL code run to run through the sequence editor
Returns:
dict: The sequence json as dictionary
"""
get_sequence_json_query = """
query GenerateJSON($id: Int!, $body: String!) {
getUserSequenceSeqJson(
commandDictionaryID: $id
edslBody: $body
){
seqJson
}
}
"""

resp = self.aerie_host.post_to_graphql(
get_sequence_json_query,
id=command_dictionary_id,
body=edsl_body
)
return resp["seqJson"]

def get_directive_metadata(self) -> list:
"""Get metatdata
Expand Down
19 changes: 0 additions & 19 deletions tests/unit_tests/test_aerie_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,25 +257,6 @@ def test_get_resource_types():
res = client.get_resource_types(1)
assert res == expected

def test_get_sequence_json():
aerie_host = MockAerieHost("get_sequence_json")
client = AerieClient(aerie_host)

expected = json.loads("""
{
"id": "2",
"metadata": {
"testKey": "testValue"
},
"steps": []
}
""")

edsl_code = "export default () => Sequence.new({ seqId: '2', metadata: {\"testKey\": \"testValue\"}, steps: [] });"

res = client.get_sequence_json(1, edsl_code)
assert res == expected

def test_upload_directive_metadata():
aerie_host = MockAerieHost("upload_directive_metadata_schemas")
client = AerieClient(aerie_host)
Expand Down

0 comments on commit dad4063

Please sign in to comment.