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

Add proper parsing for all options types #1571

Open
6 of 10 tasks
mwestphal opened this issue Aug 20, 2024 · 3 comments
Open
6 of 10 tasks

Add proper parsing for all options types #1571

mwestphal opened this issue Aug 20, 2024 · 3 comments
Assignees
Labels
help wanted Please help with this issue! source:libf3d
Milestone

Comments

@mwestphal
Copy link
Contributor

mwestphal commented Aug 20, 2024

Is your feature request related to a problem? Please describe.
Options generation from .json file was added in #1471, but parsing/formating is pretty naive.

Check every single type (some have not been added yet, see #1570) and add proper parsing/formatting

  • bool
  • int
  • double
  • ratio
  • vector
  • string
  • direction (not available yet)
  • color (not available yet)
  • path (not available yet)
  • rgba_colormap (not available yet)

To add proper parsing/formating it is simply needed to:

  • Implement proper parsing in options_tools::parse for this type
  • Check that formating is correct in options_tools::format and improve it if needed
  • Add testing in TestSDKOptions.cxx
@mwestphal mwestphal added source:libf3d help wanted Please help with this issue! labels Aug 20, 2024
@mwestphal mwestphal added this to the 3.1.0 milestone Aug 20, 2024
@mwestphal mwestphal changed the title Add proper parsing for all types Add proper parsing for all options types Aug 20, 2024
mwestphal added a commit that referenced this issue Aug 20, 2024
Complete refactor of options API based on generated struct and methods from a `options.json` file.

 - Add struct and methods generation code in f3dOptions.cmake
 - Add generation in library/CMakeLists.txt
 - Add options.json containing all options
 - Add new API in options.h and implement it in options.cxx, remove old API
 - Adapt code in library and in app for the new API
 - Add options testing
 - Added a quick doc about the three APIs and in header docs
 - Add a C++11 compatibility
 - Added examples
 - Improve clang-format CI and update files accordingly
 
Will be done in other PRs:

 - Add deprecation logic in generation code: #1568
 - Rework application and simplify option logic: #1569
 - Add more options types : #1570
 - Add actual parsing for all options types: #1571
 - Add complete documentation for options and option parsing: #1572
 - Proper java and javascript bindings: #1573 #1574
 - use exception translator in python bindings: #1575
  - Improve compile-time opti in options_tools.h.in:  #1576
@snoyer
Copy link
Contributor

snoyer commented Sep 11, 2024

starting with #1616

@snoyer
Copy link
Contributor

snoyer commented Sep 15, 2024

before we move forward with the more advanced types it would be useful to move the parse and format functions out of the .h.in file somewhere they can be picked up for coverage.

@mwestphal
Copy link
Contributor Author

before we move forward with the more advanced types it would be useful to move the parse and format functions out of the .h.in file somewhere they can be picked up for coverage.

I agree, create an issue so we do not forget ? or take care of it ?

Nokse22 pushed a commit to Nokse22/f3d that referenced this issue Sep 21, 2024
Complete refactor of options API based on generated struct and methods from a `options.json` file.

 - Add struct and methods generation code in f3dOptions.cmake
 - Add generation in library/CMakeLists.txt
 - Add options.json containing all options
 - Add new API in options.h and implement it in options.cxx, remove old API
 - Adapt code in library and in app for the new API
 - Add options testing
 - Added a quick doc about the three APIs and in header docs
 - Add a C++11 compatibility
 - Added examples
 - Improve clang-format CI and update files accordingly
 
Will be done in other PRs:

 - Add deprecation logic in generation code: f3d-app#1568
 - Rework application and simplify option logic: f3d-app#1569
 - Add more options types : f3d-app#1570
 - Add actual parsing for all options types: f3d-app#1571
 - Add complete documentation for options and option parsing: f3d-app#1572
 - Proper java and javascript bindings: f3d-app#1573 f3d-app#1574
 - use exception translator in python bindings: f3d-app#1575
  - Improve compile-time opti in options_tools.h.in:  f3d-app#1576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Please help with this issue! source:libf3d
Projects
Status: To do
Development

No branches or pull requests

2 participants