Skip to content

Add example fields function #219#220

Merged
Ludee merged 9 commits intodevelopfrom
feature-219-example
Nov 13, 2024
Merged

Add example fields function #219#220
Ludee merged 9 commits intodevelopfrom
feature-219-example

Conversation

@Ludee
Copy link
Copy Markdown
Member

@Ludee Ludee commented Nov 12, 2024

Summary of the discussion

The schema.json only provides a single example. We have a nice example available in the previous versions. There is only the nullable missing. We could add some extra code to extend the example and add it to the example.json. We are missing a better example for the table resources schema.

Originally posted by @jh-RLI in #216 (comment)

Type of change (CHANGELOG.md)

Added

  • Add example fields function (#220)

Workflow checklist

Automation

Closes #219

PR-Assignee

  • 🐙 Follow the workflow in CONTRIBUTING.md
  • 📝 Update the CHANGELOG.md
  • 📙 Update the documentation
  • 🐙 Assign a reviewer to the PR

Reviewer

  • 🐙 Follow the Reviewer Guidelines
  • 🐙 Provided feedback and show sufficient appreciation for the work done

@Ludee Ludee added part: documentation 📖 Improvements or additions to documentation type: enhancement ⚙️ Improvement of an existing feature labels Nov 12, 2024
@Ludee Ludee requested a review from jh-RLI November 12, 2024 23:21
@Ludee Ludee self-assigned this Nov 12, 2024
@Ludee Ludee marked this pull request as ready for review November 12, 2024 23:24
Copy link
Copy Markdown
Contributor

@jh-RLI jh-RLI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once the changes with the UTF-8 encoding is done please regenerate the example :)

Comment thread metadata/v20/v20/build_source/scripts/example_fields.json Outdated
Comment thread metadata/v20/v20/build_source/scripts/generate_example_from_schema.py Outdated
Comment thread metadata/v20/v20/build_source/scripts/generate_example_from_schema.py Outdated
@jh-RLI
Copy link
Copy Markdown
Contributor

jh-RLI commented Nov 13, 2024

Hm for some reason my requested changes do not resolve the issue with the unexpected symbol in special strings.

@jh-RLI
Copy link
Copy Markdown
Contributor

jh-RLI commented Nov 13, 2024

Okay i think you might have some issue on your machine, maybe you open this BOM in the json. When i use the script to regenerate the example.json the symbols are correct. Still, there appears to be a strange issue with the metadata import that is raised after the generation is complete.

#The generation is done and then this exception is raised:

ntology/oeo/OEO_00000350'}], 'valueReference': [{'value': None, 'name': None, '@id': None}]}, {'name': 'geom', 'description': 'Geometry', 'type': 'geometry(Point, 4326)', 'nullable': True, 'unit': None, 'isAbout': [{'name': 'spatial region', '@id': 'https://openenergy-platform.org/ontology/oeo/BFO_0000006'}], 'valueReference': [{'value': None, 'name': None, '@id': None}]}]' in metadata/v20/v20/example.json
Traceback (most recent call last):
  File "/home/jh/github/oemetadata/metadata/v20/v20/build_source/scripts/generate_example_from_schema.py", line 262, in <module>
    test_oemetadata_schema_should_validate_oemetadata_example(json_data)
  File "/home/jh/github/oemetadata/metadata/v20/v20/build_source/scripts/generate_example_from_schema.py", line 214, in test_oemetadata_schema_should_validate_oemetadata_example
    from metadata.v20.v20.schema import OEMETADATA_V20_SCHEMA
ModuleNotFoundError: No module named 'metadata.v20'

@Ludee Ludee merged commit 8bcf4ef into develop Nov 13, 2024
@Ludee Ludee deleted the feature-219-example branch November 13, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part: documentation 📖 Improvements or additions to documentation type: enhancement ⚙️ Improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing a better example for the table resources schema

2 participants