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

File_Engine: added Compute JSON Write and Read methods #130

Merged
merged 13 commits into from
Jan 18, 2022

Conversation

alelom
Copy link
Member

@alelom alelom commented Jan 17, 2022

@alelom alelom added the type:feature New capability or enhancement label Jan 17, 2022
@alelom alelom self-assigned this Jan 17, 2022
@alelom alelom requested a review from pawelbaran January 17, 2022 15:45
File_Engine/Convert/ToJsonArray.cs Outdated Show resolved Hide resolved
File_Engine/File_Engine.csproj Outdated Show resolved Hide resolved
Copy link
Member

@pawelbaran pawelbaran left a comment

Choose a reason for hiding this comment

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

Looks good in general, however I have one concern on top of @FraserGreenroyd's comments: I think the file extension constraint requiring .json is too strict:

  • it will not allow to save ISettings to .cfg file
  • it may not allow valid files with uppercase extension (easy to fix with ToLower method)

@alelom
Copy link
Member Author

alelom commented Jan 18, 2022

it may not allow valid files with uppercase extension (easy to fix with ToLower method)

Added ToLower() in both checks of the extension.

it will not allow to save ISettings to .cfg file

Cfg files have their own syntax depending on context and require a different treatment. Happy to discuss. I would consider that a completely separate feature from this. This still allows to write settings.json files a la VSCode.

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.

The CSProj change doesn't appear to have been pushed? The CSProj file will also need other compliance settings set, so might be easier to get BHoMBot to do it?

Still unsure why we have a ToJsonArray here as well as in Serialiser_Engine?

Also, documentation is missing for the new methods, but I'll run the bot's compliance to give a report of exactly what's needed 😄

I agree with the discussion on Cfg being it's own problem - happy to discuss solutions for that that work for the use cases we have.

File_Engine/Convert/ToJsonArray.cs Outdated Show resolved Hide resolved
File_Engine/Compute/WriteToJsonFile.cs Outdated Show resolved Hide resolved
File_Engine/Compute/WriteToJsonFile.cs Outdated Show resolved Hide resolved
File_Engine/Compute/WriteToJsonFile.cs Outdated Show resolved Hide resolved
File_Engine/Compute/WriteToJsonFile.cs Outdated Show resolved Hide resolved
File_Engine/Compute/WriteToJsonFile.cs Outdated Show resolved Hide resolved
@FraserGreenroyd
Copy link
Contributor

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 18, 2022

@FraserGreenroyd to confirm, the following checks are now queued:

  • code-compliance
  • documentation-compliance
  • project-compliance
  • branch-compliance
  • dataset-compliance
  • copyright-compliance

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 18, 2022

@FraserGreenroyd to confirm, the following checks are now queued:

  • code-compliance
  • documentation-compliance
  • project-compliance
  • branch-compliance
  • dataset-compliance
  • copyright-compliance

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 now, thanks @alelom 😄 will let @pawelbaran do a review too before merging

Copy link
Member

@pawelbaran pawelbaran left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

@pawelbaran
Copy link
Member

@BHoMBot check null-handling
@BHoMBot check core
@BHoMBot check installer
@BHoMBot check serialisation
@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 18, 2022

@pawelbaran to confirm, the following checks are now queued:

  • null-handling
  • core
  • installer
  • serialisation
  • versioning

@alelom alelom merged commit 9d11a15 into main Jan 18, 2022
@alelom alelom deleted the File_Engine-#129-ComputeWriteReadJson branch January 18, 2022 11:53
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.

File_Engine: add Compute Write and Read methods for quick json writing/reading
3 participants