Skip to content

Commit

Permalink
fix: switched from pyyaml and ruamel to ruyaml, fixes #38
Browse files Browse the repository at this point in the history
  • Loading branch information
jmetz committed Feb 8, 2024
1 parent 8a35a9d commit 969ed83
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/scripts/upload_model_to_zenodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
import requests # type: ignore
from loguru import logger # type: ignore
import spdx_license_list # type: ignore
import yaml # type: ignore
from ruyaml import YAML # type: ignore

from update_status import update_status
from s3_client import create_client

yaml=YAML(typ='safe')

spdx_licenses = [item.id for item in spdx_license_list.LICENSES.values()]

GOOD_STATUS_CODES = (
Expand Down Expand Up @@ -103,7 +105,7 @@ def main():
bucket_url = deposition_info["links"]["bucket"]

rdf_text = client.load_file(Path(s3_path, "rdf.yaml"))
rdf = yaml.safe_load(rdf_text)
rdf = yaml.load(rdf_text)
if not isinstance(rdf, dict):
raise Exception('Failed to load rdf.yaml from S3')

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: |
echo "Installing workflow script dependencies"
python -m pip install --upgrade pip
python -m pip install "minio==7.2.3" "ruamel.yaml==0.18.5" "bioimageio.spec==0.4.9.post5" "typer"
python -m pip install "minio==7.2.3" "ruyaml==0.91.0" "bioimageio.spec==0.4.9.post5" "typer"
- name: Unzip model file
run: |
python .github/scripts/update_status.py "${{ inputs.model_nickname }}" "Unzipping package" "1" "6"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: |
echo "Installing workflow script dependencies"
python -m pip install --upgrade pip
python -m pip install "minio==7.2.3" "loguru==0.7.2" "packaging==23.2" "spdx-license-list==3.22" "ruamel.yaml==0.18.5" "typer"
python -m pip install "minio==7.2.3" "loguru==0.7.2" "packaging==23.2" "spdx-license-list==3.22" "ruyaml==0.91.0" "typer"
- name: Publish to Zenodo
run: |
python .github/scripts/update_status.py "${{ inputs.model_nickname }}" "Publishing to Zenodo" "5" "6"
Expand Down

0 comments on commit 969ed83

Please sign in to comment.