Skip to content

Commit

Permalink
Merge pull request #259 from serlo/validate-nodes
Browse files Browse the repository at this point in the history
feat: Validate nodes against AMB json schema
  • Loading branch information
hugotiburtino authored Oct 30, 2024
2 parents b88c960 + 22867ec commit d750c47
Show file tree
Hide file tree
Showing 5 changed files with 486 additions and 652 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/datenraum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ on:
jobs:
sync_datenraum:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v4
Expand All @@ -34,6 +32,9 @@ jobs:
- name: Download metadata from Serlo Metadata API
run: pipenv run python download_metadata.py public/serlo-metadata.json

- name: Validate nodes according to AMB Schema
run: pipenv run python validate_nodes.py

- name: Set credentials for Datenraum
run: |
echo "DATENRAUM_ENVIRONMENT=demo" >> "$GITHUB_ENV"
Expand Down
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name = "pypi"
[packages]
gql = "==3.5.0"
requests-toolbelt = "==1.0.0"
fastjsonschema = "==2.20.0"

[dev-packages]
pylint = "==3.3.1"
Expand All @@ -17,6 +18,7 @@ lint = "pylint *.py"
format = "black ."
format_check = "black . --check"
test = "pytest -vv tests/"
validate_local = "pipenv run env USE_LOCAL_API=1 python download_metadata.py public/serlo-metadata.json && pipenv run python validate_nodes.py"

[requires]
python_version = "3.11"
Loading

0 comments on commit d750c47

Please sign in to comment.