diff --git a/-.gitlab-ci.yml b/-.gitlab-ci.yml deleted file mode 100644 index 9a6cead..0000000 --- a/-.gitlab-ci.yml +++ /dev/null @@ -1,25 +0,0 @@ -stages: - - build - - publish - -build: - stage: build - image: python:3.8 - script: - - pip install poetry - - poetry install - - poetry build - artifacts: - paths: - - dist/* - -publish: - stage: publish - image: python:3.8 - script: - - pip install poetry - - poetry config http-basic.gitlab $POETRY_HTTP_BASIC_GITLAB_USERNAME $POETRY_HTTP_BASIC_GITLAB_PASSWORD - - poetry publish --repository gitlab - only: - - tags - - main diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..8f663ee --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,36 @@ +stages: + - build + +variables: + PYTHON_VERSION: "3.11" # Adjust to your Python version + SPHINX_OUTPUT_DIR: "public" # Output directory for the built docs + +sphinx-build: + stage: build + image: python:${PYTHON_VERSION} + variables: + GIT_SUBMODULE_STRATEGY: recursive # In case your project has submodules + before_script: + - pip install -U pip + - pip install -r docs/requirements.txt # Assuming you have `docs/requirements.txt` for Sphinx dependencies + - apt-get update && apt-get install -y graphviz # Optional, if you need GraphViz for diagrams + script: + - cd docs # Change into the docs directory (adjust if your docs are in a different structure) + - sphinx-build -b html . ../${SPHINX_OUTPUT_DIR} + artifacts: + paths: + - ${SPHINX_OUTPUT_DIR}/ + expire_in: 30 days # Adjust retention as needed + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run only on default branch (e.g., `main`) + # - if: $CI_COMMIT_BRANCH == "develop" # Uncomment if you want to run on other branches too + + pages: + stage: deploy + script: + - mv ${SPHINX_OUTPUT_DIR} public/ + artifacts: + paths: + - public/ + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..b66b07a --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,3 @@ +sphinx==7.3.* +myst-parser==3.0.* +sphinx-multiversion>=0.2.4 \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 9a62598..26b6287 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,6 +6,10 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +# docs/source/conf.py +from pathlib import Path +import sys + project = 'Owilix' copyright = '2024, Michael Granitzer' author = 'Michael Granitzer' @@ -35,3 +39,17 @@ html_static_path = ['_static'] import os import sys sys.path.insert(0, os.path.abspath('../..')) # Adjust the path according to the location of your package relative to the docs directory + + + +# Add version from project (adjust import path) +sys.path.insert(0, str(Path(__file__).parents[3])) +from owilix import __version__ # or use poetry version -s + +version = release = __version__ # Shows current version in docs + +# Optional: Enable version dropdown (requires sphinx-multiversion) +extensions = [ + 'sphinx_multiversion', # For versioned docs +] +smv_released_pattern = r'^v\d+\.\d+\.\d+$' # Match semantic-release tags \ No newline at end of file diff --git a/tests/lexis_test2.py b/tests/lexis_test2.py new file mode 100644 index 0000000..1bcfa6b --- /dev/null +++ b/tests/lexis_test2.py @@ -0,0 +1,31 @@ +""" +Simple test script to test connection statuses. +""" + +from py4lexis.session import LexisSession +from py4lexis.lexis_irods import iRODS +from time import sleep +session = LexisSession() + +irods = iRODS(session=session, + suppress_print=False) + +#for i in range(20): +# print(irods.get_project_collection("public", "openwebsearch")) + +from owilix.core.irods import IRODSOWI +slept=0 +iowi = IRODSOWI(session) +for i in range(2000): + + print("Collections at IT4I") + print(iowi.filesystem.ls("/IT4ILexisV2/public/proj862c5962623246664c1fda27b7afb108")) + + print("Collections at LRZ") + print(iowi.filesystem.ls("/OWSLRZZONE/public")) + + self. + + print("sleeping for 30 min. slept for ", slept, " min already") + slept+=30 + sleep(1800)