duality's Introduction
duality's People
duality's Issues
NHC Forecasts
It would be an interesting use case to model the NHC marine weather forecasts. A fleet of floating wind turbines could also be modeled, and the use case of response forecast could be implemented as a test case.
Ability to export a model hierarchy to a git repository
I would like the ability to define a class hierarchy in duality
, but have the ability via utilities to export these models to DTDL and upload to a GitHub repository, which can serve as a means for model governance.
Namespace generation
duality
models are represented by Python classes, so these can be composed very flexibly, because we have access to the import mechanism. However, when we export these models to DTDL for representation in ADT or another compatible backend, we need to give each model its own unique ID, which is a DTMI string.
Right now, I duality
constructs the DTMI string this way:
- prefix them all with "dtmi:"
- followed by a model-specified prefix
- followed by the class name, converted to camel_case
- followed by the version number
For example:
class MyChildModel(MyModel, model_prefix="duality:child", model_version=1):
my_string_property: str
my_int_property: int
has the id: "dtmi:duality:child:my_child_model;1"
There should be a way to auto-generate the prefixes via the inheritance hierarchy, so the following classes wouldn't need to manually specify their own prefixes:
class MyModel(MyBaseModel, model_prefix="duality", model_version=2):
my_parent_property: str
class MyChildModel(MyModel, model_prefix="duality:child", model_version=1):
my_string_property: str
my_int_property: int
The other issue is, we need a way to structure all of the models in the inheritance hierarchy in a folder structure, so that when the DTDL JSON documents are saved to a repository, they are represented by a folder structure, instead of a flat list of files. Potentially, this should just split the DTMI id string at the :
character, replacing it with a /
.
For example, "dtmi:duality:child:my_child_model;1"
-> dtmi/duality/child/dtmi:duality:child:my_child_model;1.json
.
We may also need to normalize the filenames by replacing :
and ;
with underscores.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.