-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data_Engine: Adding create methods and first query methods for Table class #1289
Conversation
Data_Engine/Create/Table.cs
Outdated
|
||
/***************************************************/ | ||
|
||
[Description("")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these going to be filled? If not, we can remove them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @epignatelli , yes, need to get all of these filled in.
Data_Engine/Query/Axes.cs
Outdated
/**** Public Methods ****/ | ||
/***************************************************/ | ||
|
||
[Description("")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
Data_Engine/Create/Table.cs
Outdated
[Description("")] | ||
[Input("", "")] | ||
[Output("", "")] | ||
public static Table Table<T>(string name, string axis1Name, List<IComparable> axis1Values, string axis2Name, List<IComparable> axis2Values, List<List<T>> values, string valuesName = "Values") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is an IComparable
exactly? Can we input it from the UI side of things?
Not commenting all the rest, it's in other places as well.
@adecler , would not mind a review from you on this, especially on the Serialiser_Engine part. |
Also removing old generic argument for Axis method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The serialiser looks fine to me.
I did a back and forth to and from Json and no data was lost.
See comment on the code though.
Data_Engine/Create/Table.cs
Outdated
foreach (var kvp in properties) | ||
{ | ||
|
||
columns.Add(new DataColumn(kvp.Key, kvp.Value.GetType())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinging this! Would anyone please be able to have a look at this PR so we can get it merged. Thanks! |
Sorry @IsakNaslundBh yes I'll try and get on this today! |
/azp run BHoM.CheckCore |
No pipelines are associated with this pull request. |
/azp run BHoM_Engine.CheckCore |
Azure Pipelines successfully started running 1 pipeline(s). |
Good to know, thanks bot 🤦♂ |
@FraserGreenroyd it is the beginning of the end! 🤖 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the whole this looks ok from a code perspective - some comments in the code for tidiness as discussed @IsakNaslundBh .
Will run test scripts now.
Skynet here we come... time to build a bunker! tinfoil hat firmly placed |
Test script worked with some modifications (I think the GH file was slightly out of date to the latest code, but replacing the components worked fine for me), so am happy to approve this PR when the above code comments are addressed @IsakNaslundBh 😄 |
Thanks @FraserGreenroyd 🚀 Have fixed your white space comments. Also added a method to get all data out from the table. Added that method to the testscript as well and updated the outdated components. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM @IsakNaslundBh - good to see where this grows 😄
/azp run BHoM_Engine.CheckInstaller |
Azure Pipelines successfully started running 1 pipeline(s). |
NOTE: Depends on
BHoM/BHoM#595
Issues addressed by this PR
Closes #1285
Adding create methods and first Query methods for Tables.
Please note that the DataTable can not be serialised to Bson by default. I have code ready for this, but will need to be aligned with the work done by @adecler in #1270
Test files
https://burohappold.sharepoint.com/:f:/r/sites/BHoM/02_Current/12_Scripts/01_Test%20Scripts/BHoM_Engine/Data_Engine/Issue_1289_CreateTables?csf=1&e=KcLoUo
Changelog
List<IBHoMObject>
and one from 2D table with header values.Additional comments
@Martian42