Skip to content

TCK - Value Domain issue #576

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

Open
NicoLaval opened this issue Apr 24, 2025 · 7 comments
Open

TCK - Value Domain issue #576

NicoLaval opened this issue Apr 24, 2025 · 7 comments
Labels

Comments

@NicoLaval
Copy link
Collaborator

Hello,

Externalization of examples enables to build and run TCK.

When value domains are involved, information is missing.

For instance, for this script, the value domain definition is textual, and therefore difficult to support in the TCK creation script.

What do you think @antonio-olleros? How are you dealing with?

@antonio-olleros
Copy link
Contributor

I agree this is a problem... We lack a standard way to provide value domains as input, the same with data structures... And we need to define one. This is related, I think, to the work on fomalising a JSON format for providing the data structures (@vpinna80 )

@NicoLaval
Copy link
Collaborator Author

@vpinna80 @antonio-olleros @hadrienk what do you think about adding a value_domains.json files in examples folders (only when needed) like:

[
  {
    "name": "myGeoValueDomain",
    "type": "String",
    "values": ["AF", "BS", "FJ", "GA", "KH", "MO", "PK", "QA", "UG"]
  },
  ...
]

?

@vpinna80
Copy link
Collaborator

vpinna80 commented Apr 24, 2025

My opinion, that I pointed out several times now, is that the JSON schema already has a way to declare valuedomains as codelists.
We just need to switch from "one json for dataset" to "one json for example", and from them generate "single structure files" that can be integrated in the HTML/PDF documentation.
The generation of single files from the complete "example json" will be much easier than the other way around as it is now (no information would have to be inferred or manually added).

For example. in the folder in E&E repo for the examples of the check_hierarchy operator, which requires the VD_1 valuedomain, you can look at ex_1.json which is the json file for the example, compliant with the current json schema.

The json files for all the examples the E&E uses were generated with a bash script from the files @antonio-olleros provided, but the valuedomains have been added manually from the documentation (I inferred from the data some valuedomains which were missing a definition).

@antonio-olleros
Copy link
Contributor

Well, I would not mix the two discussions! I think that whether the json admits value domains is completely separate to having one json for example, which in my view is much more complex than what we have now!

@NicoLaval
Copy link
Collaborator Author

Agree @antonio-olleros, I think we have a simple and efficient basis, instead of making an "earthquake", it would be easier to go step by step, by simply improving what already exists, and when this already allows us to run all the tests, we can look into building a new version if necessary.

@vpinna80
Copy link
Collaborator

Changing the current way of generating json files was an idea, but having only one json in TCK for each example (on one json for multiple examples) is the only way to guarantee that the generated metadata is compliant with the VTL current information model.

You know where I'm going... With multiple files, you can't exclude redefintion of variables. In fact, that was the case when I was consuming the current json files and I had to manually change the type.

@antonio-olleros
Copy link
Contributor

Yes, but the discussion on the IM is an open issue, as far as I remember... I still need to provide the exmaples... I've been under the water, but I hope I will be able to provide them by next week

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

No branches or pull requests

3 participants