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

JSON-LD trials #455

Closed
wants to merge 4 commits into from
Closed

Conversation

VladimirAlexiev
Copy link

@mristin
Copy link
Contributor

mristin commented Mar 20, 2024

@VladimirAlexiev as far as I can see, you haven't committed any changes to the generator?

If I understand correctly, you want to manually change the JSON-LD instead of generating it? If so, then this repository is the wrong place. The aas-core-codegen is a transpiler. Please have a look at this module which implements the generation of JSON-LD from a formalized meta-model:
https://github.com/aas-core-works/aas-core-codegen/blob/main/aas_core_codegen/jsonld/main.py

@VladimirAlexiev
Copy link
Author

Hi @mristin !
I don't want to change the context manually, that's why my patched version is called context-fixed.jsonld
and the trials in the README use this URL to access the context: https://rawgit2.com/VladimirAlexiev/aas-core-codegen/main/test_data/jsonld_context/context-fixed.jsonld .

Please merge the "trials" folder. It serves to document the round-tripping attempts, and the need for 2 changes to context.

@mristin
Copy link
Contributor

mristin commented Mar 21, 2024

@VladimirAlexiev

Hi @mristin ! I don't want to change the context manually, that's why my patched version is called context-fixed.jsonld [...]

Please double-check, have you forgotten maybe to add files to the commit? I only see changes to test_data/, but no changes to aas_core_codegen/json_ld/.

The test_data/ are the golden test files recorded during the unit tests. There is no point in changing them manually.

@VladimirAlexiev
Copy link
Author

@mristin Move context-fixed.jsonld into trials/ and move that folder wherever it belongs best.
Cheers!

@mristin
Copy link
Contributor

mristin commented Mar 21, 2024

@VladimirAlexiev if there are no changes to the generator(s), then these files and documents simply don't belong to this repository.

I suggest you either 1) create a separate repository, or 2) sync with the corresponding IDTA workgroup and put the files in their shared folder.

@mristin mristin closed this Mar 21, 2024
@VladimirAlexiev
Copy link
Author

VladimirAlexiev commented Mar 25, 2024

@mristin So you have examples, and you have context, but you don't want to include examples of how the context works?
That's strange. How can you ensure the context (and possible future extensions of it) work as intended, except by exercising the examples?

Let me give an example from another standardization effort:
An important part of the work on the GS1 EPCIS semantic representation was hundreds of examples.
I generated JSON -> Turtle -> Diagrams, and we made sure the Turtle and Diagrams looked ok, and had what they were supposed to have.

In this way I diagnosed hundreds of problems in the proposed Context. See one big cluster in gs1/EPCIS#307.

@mristin
Copy link
Contributor

mristin commented Mar 25, 2024

@VladimirAlexiev I'm not saying that the examples are unnecessary -- this repository is simply not the place for them. This repository contains the code for automatic generation of different artefacts based on a formalized meta-model (not necessarily an AAS meta-model!).

The examples you submitted are not the test data of the generators, but of the generated artefacts. They should live wherever you put the artefacts.

Think of aas-core-codegen as a compiler. You do not put the unit tests for your source code in the compiler's repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants