Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/push-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
secrets: inherit
with:
notebooks-env-files: .ci_support/lower-bounds.yml .ci_support/environment-notebooks.yml
coverage-test-dir: tests/benchmark tests/unit
do-coveralls: false
do-codecov: true
# The test matrix supports up to four python versions
Expand All @@ -24,3 +25,22 @@ jobs:
alternate-tests-env-files: .ci_support/lower-bounds.yml
alternate-tests-python-version: '3.11'
alternate-tests-dir: tests/unit

openbis:
runs-on: 'ubuntu-22.04'
steps:
- uses: actions/checkout@v4
- name: write config
run: |
printf '%s' '${{ secrets.COSCINES3CONFIG }}' > some.conf
printf '%s' '${{ secrets.PYIRONAUTOUSER }}' > pyironautouser
- uses: pyiron/actions/add-to-python-path@actions-4.0.10
with:
path-dirs: 'pybis_aixtended'
- uses: pyiron/actions/unit-tests@actions-4.0.10
with:
python-version: '3.11'
env-files: .ci_support/lower-bounds.yml .ci_support/environment-notebooks.yml
test-dir: 'tests/integration'
timeout-minutes: 10

51 changes: 50 additions & 1 deletion tests/integration/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,55 @@
import os
import unittest

from datetime import datetime
from pybis_aixtended import OpenbisAixTended


class TestConf(unittest.TestCase):
def test_conf_present(self):
print(os.getcwd())
self.assertTrue(os.path.isfile("some.conf"))

def test_login_sfb1394_instance(self):
ob = OpenbisAixTended.OpenbisWithS3(
"https://openbis.imm.rwth-aachen.de/openbis/webapp/eln-lims/",
s3_config_path="some.conf",
)
with open("pyironautouser") as f:
ob.login("pyironautouser", f.readline())

self.assertTrue(ob.is_session_active())


class TestOpenBISinteractions(unittest.TestCase):

@classmethod
def setUpClass(cls):
cls.created_permIDs = []
ob = OpenbisAixTended.OpenbisWithS3(
"https://openbis.imm.rwth-aachen.de/openbis/webapp/eln-lims/",
s3_config_path="some.conf",
)
with open("pyironautouser") as f:
ob.login("pyironautouser", f.readline())
cls.pybis_w_s3 = ob
date = datetime.now()
date_code = (
f'{str(date.date()).replace("-","")}{date.hour}{date.minute}{date.second}'
)
cls.pybis_pr = cls.pybis_w_s3.new_project(
space="PYIRONAUTOUSER",
code="CiProject" + date_code,
description="Temporary CI project from pyiron_rdm",
)
cls.pybis_pr.save()
super().setUpClass()

@classmethod
def tearDownClass(cls):
# ToDo remove all created_permIDs
cls.pybis_w_s3.logout()
super().tearDownClass()

class TestNothing(unittest.TestCase):
def test_nothing(self):
self.assertTrue(True)
Loading