Skip to content

Commit 2f11abe

Browse files
šŸ› Fix api client construction in conftest (#176)
* update workflow before publishing python package fix dependency issue and bump version point to website in project description fix broken dependency improve doc add github token to download artifacts ensure only read-access @wvangeit yet another attempt at downloading artifacts make sure to use repo that ran the trigger wf another attempt at fixing change owner allow publishing to testpypi also when pr minor change revert minor (but breaking) change minor fix add debug messages another debug message hopefully the final version final fix minor fix move master and tag to individual jobs add debug messages add python script for determining semantic version minor changes minor changes improve error handling and add version file to artifacts check if release minor fix ensure to enter venv also when tagging source venv in publishin workflow ensure only master add script for testing 'pure' semver adapt workflows to new python script minor change attempt to evaluate expressions correctly several fixes to fix tests ensure repo is checked out in publish workflow several small fixes cleanup debug minor cleanup mionr changes add debug message minor change minor change yet another try minor change minor change minor change mionr change minor changes correct workflow run id cosmetic change avoid using gh change to a single job for publishing minor cleanup swap loops in clean up jobs correction get correct versions of github workflow files update a couple of other files update a few more tests update yet another file yet another file * fix
1 parent 3ce416f commit 2f11abe

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

ā€Žclients/python/test/e2e/conftest.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,19 @@ def pytest_configure(config):
9696

9797
@pytest.fixture
9898
def api_client() -> Iterable[osparc.ApiClient]:
99-
with osparc.ApiClient() as api_client:
100-
yield api_client
99+
if Version(osparc.__version__) >= Version("8.0.0"):
100+
with osparc.ApiClient() as api_client:
101+
yield api_client
102+
else:
103+
host = os.environ.get("OSPARC_API_HOST")
104+
username = os.environ.get("OSPARC_API_KEY")
105+
password = os.environ.get("OSPARC_API_SECRET")
106+
assert host and username and password
107+
configuration = osparc.Configuration(
108+
host=host, username=username, password=password
109+
)
110+
with osparc.ApiClient(configuration=configuration) as api_client:
111+
yield api_client
101112

102113

103114
@pytest.fixture

0 commit comments

Comments
Ā (0)