Skip to content

Instantly share code, notes, and snippets.

@IAlibay
Created April 24, 2023 19:14
Show Gist options
  • Save IAlibay/e2222851fa00726b5704e9301c1879af to your computer and use it in GitHub Desktop.
Save IAlibay/e2222851fa00726b5704e9301c1879af to your computer and use it in GitHub Desktop.
import os
from alchemiscale import AlchemiscaleClient, Scope, ScopedKey
user_id = os.environ['ALCHEMISCALE_ID']
user_key = os.environ['ALCHEMISCALE_KEY']
asc = AlchemiscaleClient('https://api.alchemiscale.org', user_id, user_key)
scope = Scope('openfe', 'v0_7_3', 'tyk2_off2_0')
with open('scoped-key.dat', 'r') as f:
network = asc.get_network(f.read())
transformation_sks = []
for transform in network.edges:
transformation_sks.append(asc.get_scoped_key(transform, scope))
for sk in transformation_sks:
tasks = asc.get_transformation_tasks(sk)
for task in tasks:
status = asc.get_tasks_status(task)[0]
if status.value == 'error':
asc.set_tasks_status(task, 'waiting')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment