-
Notifications
You must be signed in to change notification settings - Fork 4
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
Align features to cover those of old File_Adapter; renaming to File_Adapter #86
Conversation
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.
Approving from a functionality perspective. I was able to run through all provided test files and have a quick test of typical uses with success.
@michaelhoehn I have done a simple fix for a bug - mind having a quick look again to approve? thanks! |
@IsakNaslundBh would be great to get your review too |
The particular bug you talk about here seem to be fixed for me. Good to mention as well, that to properly test this against older scripts, you need to manually delete all Filing_Toolkit dlls, (oM/Engine/Adapter) from Program data as the renaming means the old ones are not overwritten. Only an issue when building from source ofc, as the installer will clean it up, but though worth mentioning |
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.
Push and pull assuming the old file adapter style, of giving a location to the file adapter itself, and just pushing BHoMObjects, seem to be working as expected.
The only word of caution would be if this is used to generate datasets. The Library_Engine has not been updated to accept real json, but is still assuming the line separated format. If the default values for the action config is used, when trying to generate a dataset, you will get something that the library engine can not handle basically.
Not saying that should be a blocker from merging this, just flagging that it needs to be communicated clearly to the development team.
@IsakNaslundBh thanks for highlighting above Have we a plan to update Library engine (and all datasets naturally) to work as valid json? This will mean ultimately we can remove this "dataset" option from the File_Adapter completely - which will simply things. |
Note that the difficulty in appending content is also that we need to check that we are appending to the same format. |
From my tests, now everything appears fixed/working as requested from last request for changes. Important changesAppending mechanismThe "appending" mechanism is now more complex as it handles what explained here. Switch from Regex to WildcardPatternAdditionally, I have switched from Usage of wildcardFurther, to simplify the code, the wildcard is only admitted for filenames, not directory names. E.g.
It is possible to admit also the second, but it would require a non negligible amount of development time. |
Appending is now working fine - raised a small comment above - but looking good now |
Co-authored-by: Al Fisher <al.fisher@burohappold.com>
Approving - issues above addressed - thanks @alelom - and both File (and historic Filing) workflows working |
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.
Happy from a CI perspective in the renaming call that the last commit only affects CI, so no functionality changes since @al-fisher last reviewed
NOTE: Depends on
BHoM/BHoM_Adapter#264
Issues addressed by this PR
Closes #79
Closes #80
Closes #85
Test files
All existing test files for File_Adapter and Filing_Toolkit must still work.
Please go through at least these:
https://burohappold.sharepoint.com/:f:/s/BHoM/Eub2dT2Mb85Dtvv0Y09T1I4B7pzFZHcVr5NCXRuAdSpGUQ?e=h2pDm8
Changelog
CreateOnly
PushType will make the adapter append content to any existing file as explained here.*
symbol, and only in the filenames. See here.Additional comments
I will need to raise that later, as there are other PRs that need merging before that.
DatasetSerialization
set totrue
. The Dataset serialisation is not proper JSON - although its extension is.json
- so by default is set tofalse
. The Library_Engine has not been updated to accept real JSON yet.This PR replaces #81 for CI to pick correct branch name.