Skip to content

Commit

Permalink
Merge pull request #136 from djarecka/ci/new_linkml
Browse files Browse the repository at this point in the history
fixing: testing software GA
  • Loading branch information
djarecka authored Jan 17, 2025
2 parents 9953688 + 9728ada commit d61b80f
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/reusable-generate_other_formats_new.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,27 @@ jobs:
generate:
runs-on: ubuntu-latest
needs: [setup-environment]
strategy:
matrix:
name: ${{ fromJson(format('["{0}"]', replace(inputs.model_name, ',', '","'))) }}
steps:
- name: Generate other model representations
run: |
cd linkml-schema
echo "Processing ${{ matrix.name }} model...";
linkml generate json-schema ${{ matrix.name }}.yaml > ../json-schema-autogen/${{ matrix.name }}.json;
# generating jsonld context and removing generation_date field to avoid constant updates
linkml generate jsonld-context ${{ matrix.name }}.yaml > ../jsonld-context-autogen/${{ matrix.name }}.context.jsonld;
sed -i "/generation_date/d" ../jsonld-context-autogen/${{ matrix.name }}.context.jsonld;
linkml generate pydantic ${{ matrix.name }}.yaml > ../models_py-autogen/${{ matrix.name }}.py;
linkml generate owl ${{ matrix.name }}.yaml > ../owl-autogen/${{ matrix.name }}.owl;
if [ ${{ matrix.name }} = "library_generation" ] || [ ${{ matrix.name }} = "genome_annotation" ]; then
echo "Fixing erdiagrams for ${{ matrix.name }}";
python ../utils/fix_and_create_erdiagram.py;
else
linkml generate erdiagram ${{ matrix.name }}.yaml > ../erdiagram-autogen/${{ matrix.name }}.md;
fi
models_list="${{ inputs.model_name }}"
echo "Model list: $model_list"
for name in $(echo "$model_list" | tr ',' '\n'); do
echo "Processing $name model...";
linkml generate json-schema ${name}.yaml > ../json-schema-autogen/${name}.json;
# generating jsonld context and removing generation_date field to avoid constant updates
linkml generate jsonld-context ${name}.yaml > ../jsonld-context-autogen/${name}.context.jsonld;
sed -i "/generation_date/d" ../jsonld-context-autogen/${name}.context.jsonld;
linkml generate pydantic ${name}.yaml > ../models_py-autogen/${name}.py;
linkml generate owl ${name}.yaml > ../owl-autogen/${name}.owl;
if [ ${name} = "library_generation" ] || [ ${name} = "genome_annotation" ]; then
echo "Fixing erdiagrams for $name";
python ../utils/fix_and_create_erdiagram.py;
else
linkml generate erdiagram ${name}.yaml > ../erdiagram-autogen/${name}.md;
fi
done
cd ..
push-changes:
runs-on: ubuntu-latest
Expand Down

0 comments on commit d61b80f

Please sign in to comment.