equinor / data-modelling-storage-service Goto Github PK
View Code? Open in Web Editor NEWStorage service for Data Modelling Tool
Home Page: https://pypi.org/project/dmss-api/
License: MIT License
Storage service for Data Modelling Tool
Home Page: https://pypi.org/project/dmss-api/
License: MIT License
Given there exist a package "TestData"
And "TestData" contains blueprint "ItemType"
And "ItemType" has attribute "list" of type "string"
And "ItemType" is array
Scenario: Inherited properties should be added and overwrite parent properties
Given there exist a blueprint "Role" with attributes "id, name, description"
And there exists a blueprint "Employee" with attributes "id, name, roles"
And there exists a blueprint "Programmer" with attributes "id, name, skills"
When the domain expert extends the blueprint "Programmer" with the "Employee" blueprint
Then attributes of the "Employee" blueprint are added and overwrites attributes of the "Programmer" blueprint
And so attributes of the blueprint "Programmer" becomes "id, name, skills, roles:Role"
Access control need to be enforced on the result of the search
Try to click on SverdrupAnchorReplace2021 operation.
Se end for tips on how to deploy after a pull request is merged: https://github.community/t5/GitHub-Actions/How-to-make-PHPUnit-test-and-then-if-successfully-passed-deploy/td-p/32479
not contained
Implement a feature to enable users to sort search results by properties.
Also read StorageRecipes
Scenario: View a blueprint that inherit from another blueprint
Given there exist a blueprint "Role" with properties "id, name, description"
And there exists a blueprint "Employee" with properties "id, name, roles:Role"´
And there exists a blueprint "Programmer" with properties "id, name, skills"
And the "Programmer" blueprint extends "Employee" blueprint
When the domain expert views the "Programmer" blueprint
Then the attribute values shown are "id, name, skills" # It should not shown the attributes of Employee blueprint
And extends information is shown, that "Programmer" extends "Employee"
Scenario: View an instance with a blueprint type that inherit from another blueprint
Given there exist a blueprint "Role" with properties "id, name, description"
And there exists a blueprint "Employee" with properties "id, name, roles:Role"
And there exists a blueprint "Programmer" with properties "id, name, skills"
And the "Programmer" blueprint extends "Employee" blueprint
And there exist an instance of type "Programmer" with name "Dennis Ritchie"
When the domain expert views the instance with name "Dennis Ritchie"
Then the attribute values shown are "id, name, skills, roles: Role".
Uploading(Updating) and Deleting of blobs does not work too well now.
We should come up with a better design for this.
Needs to function properly if we'r going to use it for STasks.
+ Can use users credential on the repository (Openworks etc.)
+ No need to keep storage credentials in DMSS
+ Arguably safer. Less privilege, and uses well-known-auth-schemes
- On-behalf-of will be unusably slow withouth a token cache
- Complicated, many moving parts
- Heavily dependent on repository support, or we will need to create wrappers
- Many different technologies (read only mongo vs azure blobs)
- Entities split over multiple repositories
- Hard to maintain and setup (lots of manual work)
- Hard to implement
+ Minimal performance cost (we already have to lookup each file in the lookup table)
+ Confined and managed within the DMSS system
+ Not reliant on other technologies
- Repository credentials are shared across users (possible to setup separate DS cred per user)
- Repository credentials stored in DMSS
Access | Level |
---|---|
Write | 2 |
Read | 1 |
None | 0 |
These worksflows should only run after new releases, need to adjust regexp in workflow settings.
DMT should not duplicate complicated document_service.save() function
https://github.com/Azure-Samples/ms-identity-python-webapp
uses b2c so external user can get access.
the api is public, available here:
https://api-dmss-dev.playground.radix.equinor.com/api/v1/data-sources
"gridfs.errors.FileExists: file with _id '4ec0d646-907c-4eba-9e65-24106236d61b' already exists"
Recreate:
Import an entity with a blob with a set _id.
Delete the package and import the same entity.
With concurrent API calls, the context gets set and unset with conflicts.
Need to rewrite to keep user context in the request object.
As reported by @babakommani , when multiple entities (from the same Blueprint) with an identical name exist, the search function only returns one match in the result.
The save function does not pick up on a second level uncontained entity.
how to produce:
Move logic from DMT repository to here for search.
This is a meta issue, encapsulating several issues.
The goal is to have all pointers and identifiers to documents/entities use a pathlike string.
This is necessary for the API to be friendlier to work with, have functional cross-data-source-references, be able to dump/import a large package with both contained and uncontained entities with ease. And the general "human-friendlyness" of the system.
These should be completed in the given order;
This parameter is missing
Should be a check on frontend and backend
To validate on frontend, we must expose the "valid_subtype?()" function in an endpoint
Does it make sense to have "description" as a core attribute in our code? I think not, and that it should be removed from any places where it's hard coded, and kept only as a normal attribute (often inherited from NamedEntity)
Cleanup and check that all pre-commit works as expected after the move from old repository.
The api documentation in the current state does give an overview of all endpoints and code snippets of how to communicate, which is pretty neat.
Actual usage of the api does require special knowledge of most of the endpoints.
We should add:
One should be able to post a complete nested document to updateDocument()
As a domain expert,
I want to be able to specify that a blueprint should inherit the attributes of another blueprint
so that I don't need to repeat attributes unnecessary.
self.extended_attributes: List[BlueprintAttribute] =
Scenario: Inherited properties should be added and overwrite parent properties
Given there exist a blueprint "Role" with attributes "id, name, description"
And there exists a blueprint "Employee" with attributes "id, name, roles"
And there exists a blueprint "Programmer" with attributes "id, name, skills"
When the domain expert extends the blueprint "Programmer" with the "Employee" blueprint
Then attributes of the "Employee" blueprint are added and overwrites attributes of the "Programmer" blueprint
And so attributes of the blueprint "Programmer" becomes "id, name, skills, roles:Role"
Delete schema.py/code generator code
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.