Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

low-diff-minimal-enum-descriptions #867

Closed
wants to merge 6 commits into from
Closed
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: 4 additions & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
formatter:
type: basic
include_document_start: true
max_line_length: 79
4 changes: 4 additions & 0 deletions assets/mixs-schema-formatting-variants/.yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
formatter:
type: basic
include_document_start: true
max_line_length: 79
19 changes: 19 additions & 0 deletions assets/mixs-schema-formatting-variants/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
poetry run python src/scripts/describe_enums_by_slots_using.py --schema-file src/mixs/schema/mixs.yaml --output-file assets/mixs-schema-formatting-variants/mixs_with_enum_descriptions.yaml

cp src/mixs/schema/mixs.yaml assets/mixs-schema-formatting-variants/original.yaml

poetry run gen-linkml --format yaml --no-materialize-attributes --materialize-patterns --no-mergeimports src/mixs/schema/mixs.yaml > assets/mixs-schema-formatting-variants/original-regenerated.yaml

cp src/mixs/schema/mixs.yaml assets/mixs-schema-formatting-variants/pycharm-auto.yaml # then open in pycharm, select all and hit control-alt-l aka command-option-l and save

yq eval '(.. | select(has("from_schema")) | .from_schema) style="" | del(.. | select(has("from_schema")).from_schema)' original-regenerated.yaml |\
yq eval '.prefixes |= map_values(.prefix_reference)' |\
yq eval '.settings |= map_values(.setting_value)' |\
yq eval 'del(.classes.[].name)' |\
yq eval 'del(.classes.[].slot_usage.[].name)' |\
yq eval 'del(.enums.[].name)' |\
yq eval 'del(.enums.[].permissible_values.[].text)' |\
yq eval 'del(.slots.[].domain)' |\
yq eval 'del(.slots.[].name)' |\
yq eval 'del(.source_file)' |\
yq eval 'del(.subsets.[].name)' | cat > original-regenerated-reduced.yaml
Loading
Loading