from osparc import ApiClient, UsersApi, Confirmation
import os
cfg = Configuration()
print(cfg.host)
with ApiClient(cfg) as api_client:
users_api = UsersApi(api_client)
profile = users_api.get_my_profile()
print(profile)
Definition of Done
from osparc import ApiClient, UsersApi, Confirmation
import os
@pytest.fixture
def mock_osparc_service_envs(monkeypatch):
# emulate osparc variable and secrets mechanism here where starting a service
...
def test_done(mock_osparc_service_envs):
assert Configuration() = Configuration(
host=os.environ["OSPARC_API_HOST"],
username=os.environ["OSPARC_API_KEY"],
password=os.environ["OSPARC_API_SECRET"],
)
User Story
The
Configuration
object should by default capture specific environment variables. such that by open a jupyter-math service in osparc (see https://github.com/ITISFoundation/jupyter-math/pull/29, https://github.com/ITISFoundation/osparc-simcore/pull/5695)Definition of Done