ADAPT / Standard

ADAPT Standard data model issue management
https://adaptstandard.org
MIT License
8 stars 1 forks source link

RepresentationSystem & UnitSystem #3

Open knelson-farmbeltnorth opened 2 years ago

knelson-farmbeltnorth commented 2 years ago

With the refactoring of the ADM to a language-agnostic data model, there are questions of how we associate to the existing ADAPT UnitSystem and RepresentationSystem (currently only in the C# code & in XML files).

Both systems are designed as interfaces that can be overridden at implementation. This item is for tracking the migration of this interface into the generic model.

knelson-farmbeltnorth commented 2 years ago

Insofar as many components will refer to representations and units, we need a place for this as part of the ADM work. The path of least resistance would seem to be creating one or two github repos (for the two together or each separately) and maintain the source of truth in that location.

strhea commented 2 years ago

In general, I agree. While I think they need to live in separate repos, we need to acknowledge there is a one-way dependency between them. The RepresentationSystem uses the UnitSystem in describing the default/allowed units for each representation.

knelson-farmbeltnorth commented 2 years ago

I have the additions for the RepresentationSystem ready to support the deprecation of the C# enumerations, and intend to create two new Github repositories: ADAPT-Representation and ADAPT-UnitOfMeasure. The contents in each case will initially be the xml file which will represent the source of truth, and the associated xsd file. Using the XML file itself as the source of truth will enable transparency in changes via file diffs.

The C# UnitSystem and RepresentationSystem assemblies should eventually become derivative projects of the new repos.

strhea commented 2 years ago

I'd love to have the contents of both available via web service. Especially the ability to sync a subset that doesn't include all the language label overhead.

knelson-farmbeltnorth commented 2 years ago

@strhea Personally I'm inclined to script it into a SQLite database that could be queried locally instead of needing the overhead of service. As I thought about it, however, both my database and your service are derivatives we both can make and cannot be the source of truth.

The benefit of the XML file is we can diff it as a text file. If we treat the database file as a source of truth, we can't diff it. If we make a service, who hosts it, maintains it, etc. To comply with the license restrictions on ADAPT, we'd need the service to be open source, and then we are back to the question of what format the data is inside the service.

knelson-farmbeltnorth commented 2 years ago

Agreement in Oct 5 2022 meeting that exclusive of the means of delivery, the XML files will be the source of truth and placed in their own repos.