Closed gtfierro closed 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
@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!
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!
@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
Fixed it. Can't tell you exactly why this works... something something lazy lookup, I think?
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
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...)
@TShapinsky look at the docker stuff.
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 :)
docker compose
setup, which seemed to be broken. I included the changes in this PR so that the UI can be more easily used during testingbuildingmotif.dataclasses.model.Model.validate
so that it defaults to the Model'smanifest
if no shape collections are provided. Note: to avoid backwards incompatibility, I made the argument "optional". This means that you would domy_model.validate(None)
ormy_model.validate([])
to default to the model's manifest for validation. IF we are ok with switchingModel.validate
to be variadic, then this call can be simplified tomy_model.validate()
get_all_shapes
callSupersedes #214 (now closed)
TODOs: