diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index c13542f..be5e505 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -16,10 +16,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - run: pip install -r requirements.txt - name: Build diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 3364c80..bd15513 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -18,10 +18,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - run: pip install -r requirements.txt - name: Build diff --git a/requirements.in b/requirements.in index cace1b4..502f449 100644 --- a/requirements.in +++ b/requirements.in @@ -1,7 +1,7 @@ sphinx<8.0.0 sphinx-autobuild sphinxcontrib-httpdomain -sphinx-jsonschema +sphinx-jsonschema==1.19.1 #nbsphinx lxml[html_clean] sphinx_rtd_theme @@ -16,8 +16,6 @@ docutils furo sphinxcontrib-youtube virtualenv -sphinx-jsonschema==1.19.1 -requests -ods-tools sphinxcontrib-redoc lxml_html_clean +ods-tools>=5.0.0 diff --git a/requirements.txt b/requirements.txt index d7a6dc7..ef0bc18 100644 --- a/requirements.txt +++ b/requirements.txt @@ -99,7 +99,7 @@ kombu==5.4.2 # via celery llvmlite==0.43.0 # via numba -lxml[html-clean,html_clean]==5.3.0 +lxml[html-clean]==5.3.0 # via # -r requirements.in # lxml-html-clean @@ -122,9 +122,10 @@ numpy==2.0.2 # fastparquet # numba # pandas + # scipy oasis-data-manager==0.1.3 # via ods-tools -ods-tools==4.0.1 +ods-tools==5.0.1 # via -r requirements.in packaging==24.2 # via @@ -140,6 +141,8 @@ platformdirs==4.3.6 # via virtualenv prompt-toolkit==3.0.48 # via click-repl +pyarrow==23.0.0 + # via ods-tools pygments==2.18.0 # via # furo @@ -171,6 +174,8 @@ rpds-py==0.22.1 # via # jsonschema # referencing +scipy==1.17.0 + # via ods-tools six==1.16.0 # via # python-dateutil @@ -227,6 +232,8 @@ sphinxcontrib-youtube==1.4.1 # via -r requirements.in starlette==0.41.3 # via sphinx-autobuild +tqdm==4.67.3 + # via ods-tools typing-extensions==4.12.2 # via oasis-data-manager tzdata==2024.2 diff --git a/update-redoc.py b/update-redoc.py index ae501f4..f4de85e 100755 --- a/update-redoc.py +++ b/update-redoc.py @@ -7,7 +7,7 @@ import ods_tools from os import path -from ods_tools.oed.setting_schema import ModelSettingSchema, AnalysisSettingSchema +from ods_tools.oed import AnalysisSettingHandler, ModelSettingHandler # Locations MODEL_SETTINGS_SCHEMA = './src/schema/model_settings.json' @@ -16,7 +16,7 @@ PLAT_V2_SCHEMA = './src/schema/platform-2.json' # urls -PLAT_VER = '2.4.4' +PLAT_VER = '2.5.0' PLAT_V1_URL = f"https://github.com/OasisLMF/OasisPlatform/releases/download/{PLAT_VER}/v1-openapi-schema-{PLAT_VER}.json" PLAT_V2_URL = f"https://github.com/OasisLMF/OasisPlatform/releases/download/{PLAT_VER}/v2-openapi-schema-{PLAT_VER}.json" @@ -36,14 +36,14 @@ def patch_schema(base_schema, version, description): return base_schema ## Patch model settings schema -model_schema = ModelSettingSchema().schema +model_schema = ModelSettingHandler.make().get_schema('model_settings_schema') model_desc = read_file('./redoc/model_settings/description.md').decode() model_temp = json.loads(read_file('./redoc/model_settings/redoc_template.json')) model_temp['definitions']['ModelParameters'] = model_schema write_json(MODEL_SETTINGS_SCHEMA, patch_schema(model_temp, ods_tools.__version__, model_desc)) ## Patch analysis Settings schema -analysis_schema = AnalysisSettingSchema().schema +analysis_schema = AnalysisSettingHandler.make().get_schema('analysis_settings_schema') analysis_desc = read_file('./redoc/analysis_settings/description.md').decode() analysis_temp = json.loads(read_file('./redoc/analysis_settings/redoc_template.json')) analysis_temp['definitions']['AnalysisSettings'] = analysis_schema