Skip to content
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

Library_Engine: Update libraries to work with Datasets #1324

Merged

Conversation

IsakNaslundBh
Copy link
Contributor

Issues addressed by this PR

Closes #1286

Test files

To Test, the following can be placed in the Dataset folder on Appdata. These are not finalised datasets yet, but just contructed for testing:
SectionProperties_DataSets.zip

Simple GH testfile
https://burohappold.sharepoint.com/:f:/s/BHoM/ErnA5fNcgJ9Dohk_eyWUZ7EBR_zd4Lp16Azw_-al3BepCA?e=6FE2Bv

Would also encourage to test that current libraries work as expected and to generate a new one using Dataset to test the functionality.

Changelog

  • Library_Engine now assumes data stored in 1 Dataset per json file
  • Still supporting previous format with a list of BHoMObjects
  • Added Source method to extract Source from Library in Dataset

Additional comments

Copy link
Contributor

@FraserGreenroyd FraserGreenroyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, test works well @IsakNaslundBh

Have made a comment on the code, more of a question really, am happy to not hold up the PR based on it.

}
catch
{
AddDeserialisationEvent(name, oM.Reflection.Debugging.EventType.Warning, "Failed to deserialise at least one item in the dataset named " + name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be helpful to state which entry has failed to deserialise?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presume it could be useful, but two points:

  1. As it failed to deserialise, I will not really have anything to look at for a generic case to state what it was. As in, failing to deserialise means I dont have a BHoMObject to take name or similar from to display. Could paste the whole string out or something like that, but not sure how useful that would be?
  2. In general when we raise multiples of the same error, it generally feels as it is more clogging the UI than helping out + at least GH has a maximum error count of 15.

Please let me know if you are ok with this, or want me to update!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with that, it makes sense to me, happy to go ahead with merging without changes 😄

@FraserGreenroyd
Copy link
Contributor

/azp run BHoM_Engine.CheckInstaller

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@FraserGreenroyd
Copy link
Contributor

@IsakNaslundBh will let you decide to merge based on my review or wait for others or addressing my comment as appropriate, but all checks are happy 😄

@IsakNaslundBh IsakNaslundBh merged commit 88a7689 into master Nov 25, 2019
@IsakNaslundBh IsakNaslundBh deleted the Library_Engine-#1286-UpdateLibrariesToWorkWithDatasets branch November 25, 2019 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Library_Engine: Update Library method to work with Dataset object rather than flat list of obejcts
2 participants