TileDB-Py icon indicating copy to clipboard operation
TileDB-Py copied to clipboard

Fix schema.dump() so that it prints out consistently in notebooks

Open kounelisagis opened this issue 1 year ago • 1 comments

Jupyter doesn't capture the C stdout of a.schema.dump() and instead prints None. This PR uses ArraySchema::dump(FILE*) to capture the output string, and then print it in Python.

https://pybind11.readthedocs.io/en/stable/advanced/pycpp/utilities.html#capturing-standard-output-from-ostream

kounelisagis avatar May 20 '24 14:05 kounelisagis

@kounelisagis thanks for the PR!

Good code, wrong title I think -- ? This isn't 2.25.0, it's dev; and this is about restoring the dump() calls to use the new operator << ...

johnkerl avatar Jul 11 '24 13:07 johnkerl

@kounelisagis thanks for the PR!

Good code, wrong title I think -- ? This isn't 2.25.0, it's dev; and this is about restoring the dump() calls to use the new operator << ...

You are right, I am trying to figure out. In any case, this is not finalized yet and I should wait for https://github.com/TileDB-Inc/TileDB/pull/5179 to be merged. Both title and description should change.

kounelisagis avatar Jul 11 '24 13:07 kounelisagis

Reminder for myself to:

  • squash all the commits to two; one for version bump and one for the rest
  • merge without squashing those two

kounelisagis avatar Sep 10 '24 09:09 kounelisagis