This PR changes the representation for valves in the device. It changes both the reading from JSON and returning JSON. We replace the two interim representations of valves using the keys valveMap and valveTypeMap to be replaced by an object array on the key valves.
Motivation
Changing the valves object array will streamline the data structure and remove the need to have 2 keys for querying the JSON data. And also ensures that the data is grouped correctly. The current version requires cross-validation against the different objects with the two keys: valveTypeMap and valveMap.
Standardize Valve Representations
So far the valve representations have been varied and outside of the Parchmint Standards. The python package parchmint (v0.3.1) represents valves using indexes valveTypeMap and valveMap to support 3DuF's output formats. This will be modified in the upcoming patches to reflect the right versions.
Workarounds and Compatibility
Since the valves object array would combine the properties of the indexes valveTypeMap and valveMap, it's a fairly straightforward method to modify the existing device representations.
Detailed design
This RFC will add a new Valve object into the Parchmint Standard
Valve Representations
Summary
This PR changes the representation for valves in the device. It changes both the reading from JSON and returning JSON. We replace the two interim representations of valves using the keys
valveMap
andvalveTypeMap
to be replaced by an object array on the keyvalves
.Motivation
Changing the
valves
object array will streamline the data structure and remove the need to have 2 keys for querying the JSON data. And also ensures that the data is grouped correctly. The current version requires cross-validation against the different objects with the two keys:valveTypeMap
andvalveMap
.Standardize Valve Representations
So far the valve representations have been varied and outside of the Parchmint Standards. The python package
parchmint
(v0.3.1) represents valves using indexesvalveTypeMap
andvalveMap
to support 3DuF's output formats. This will be modified in the upcoming patches to reflect the right versions.Workarounds and Compatibility
Since the
valves
object array would combine the properties of the indexesvalveTypeMap
andvalveMap
, it's a fairly straightforward method to modify the existing device representations.Detailed design
This RFC will add a new
Valve
object into the Parchmint StandardValve
ObjectTechnical Background
Valve
objects will be used to describe the valve descriptions.Implementation
parchmint
v0.3.2 (Under Development) and above will support this RFC3DuF
v2.0 (Under Development) will support this RFCHow we teach this
Since the objects will be embedded into the libraries, there will be no need to teach this.
Drawbacks
We would need to retcon and update Parchmint Libraries
Alternatives
No other alternatives have been considered at the moment
Unresolved questions