Skip to content

Use JSON schemas for Sienna model intermediary layer #1

Use JSON schemas for Sienna model intermediary layer

Use JSON schemas for Sienna model intermediary layer #1

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Schema Generation
on:
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.11"
miniforge-version: latest
- name: Installing datamodel-gen
run: |
pip install datamodel-code-generator==0.26
pip install pydantic==2
shell: bash -l {0}
- name: Run datamodel-generation
shell: bash -l {0}
run: |
datamodel-codegen --input schemas --input-file-type jsonschema --output python_models --output-model pydantic_v2.BaseModel
PYTHONPATH=. pytest test/load_models.py