Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
11 changes: 9 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions update-redoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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"

Expand All @@ -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
Expand Down