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

component_name kwarg consistency accross APIs #153

Closed
Antoinemarteau opened this issue Oct 14, 2024 · 2 comments · Fixed by #154
Closed

component_name kwarg consistency accross APIs #153

Antoinemarteau opened this issue Oct 14, 2024 · 2 comments · Fixed by #154

Comments

@Antoinemarteau
Copy link

Antoinemarteau commented Oct 14, 2024

While trying to properly export the field component names of vector / tensor fields in vtk format, I noticed possible inconsistencies:

  • the kwarg component_names is documented in the docstring of data_to_xml, but not in that of add_field_data
  • the possibility of passing kwargs is not documented in setindex!(vtk::DatasetFile, ...) (while it takes component_names)
  • using the kwarg component_names is not possible in sentindex!(pvtk::PVTKFile, ...)

Are there particular reasons why the component_names kwarg are not available everywhere?
How hard would it be to make this kwarg available "everywhere" (I can try to do it) ?

@jipolanco
Copy link
Member

I completely agree, thanks for noticing this inconsistency.

I just pushed #154 which should fix this issue. One should now be able to pass a component_names keyword argument to setindex(pvtk::PVTKFile, ...). Let me know if that works for you.

@Antoinemarteau
Copy link
Author

Thank you very much for the fast answer and implementation!
I actually figured out that we don't export fields in pvtk ATM so I canno't test on my side, but this might be useful later or for others...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants