NREL / BuildingMOTIF

Building Metadata OnTology Interoperability Framework (BuildingMOTIF)
https://buildingmotif.readthedocs.io/
Other
48 stars 6 forks source link

Model validation UI + manifest-aware validation #236

Closed gtfierro closed 1 year ago

gtfierro commented 1 year ago

Supersedes #214 (now closed)

TODOs:

gtfierro commented 1 year ago

@haneslinger I've included https://github.com/NREL/BuildingMOTIF/pull/228 and #214 into a new branch which has also had develop merged in. I've also added the feature where calling Model.validate(None) (with no shape collections) defaults to the model's manifest. I can change the signature of validate to be variadic if you want, that way we can just do Model.validate(); this would break existing code, but it's an easy fix.

I've fixed a couple of the API Library tests that were failing before. I still need to address how the model validation call happens from the API

gtfierro commented 1 year ago

@haneslinger I've also implemented a version of the model validate endpoint that's included in this PR w/ some passing tests. Let me know what you think!

gtfierro commented 1 year ago

I can't get the docker compose to work for me.. the db config seems off...

buildingmotif-db   | 2023-04-04 13:21:01.217 UTC [4632] FATAL:  role "root" does not exist

We can talk about it later.

PR is still a draft so it's not ready for review!

gtfierro commented 1 year ago

@haneslinger I believe I've faithfully replicated your shape selector code with libraries, but I'm getting an error in the AngularJS frontend code and I'm having a hard time tracking down why it is happening. The console error is "Cannot find control with unspecified name attribute", but searching online just reveals a bunch of people playing whack-a-mole with different fixes; installing the DevTools extension in Chrome didn't even give me more insight. Would you be able to take a look? As far as I can tell, it has something to do with generating the list correct FormControl objects in the component's HTML

haneslinger commented 1 year ago

Fixed it. Can't tell you exactly why this works... something something lazy lookup, I think?

gtfierro commented 1 year ago

Fixed it. Can't tell you exactly why this works... something something lazy lookup, I think?

Thanks! I'll continue with this -- I don't think I've correctly hooked the validate UI to the endpoint yet

gtfierro commented 1 year ago

Should be ready for review now, @haneslinger -- learned more about Angular to get some of the UI work done (though my work could definitely be improved...)

image

TShapinsky commented 1 year ago

@TShapinsky look at the docker stuff.

gtfierro commented 1 year ago

i think we've got it

I had one question on a piece of your feedback. Can you take a look when you get a chance? Thanks! Then we can (finally!) merge :)