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

Strip output_type=stderr only, with keep_output? #175

Open
indigoviolet opened this issue Nov 7, 2022 · 5 comments
Open

Strip output_type=stderr only, with keep_output? #175

indigoviolet opened this issue Nov 7, 2022 · 5 comments
Labels
help wanted state:waiting Waiting for response for reporter type:enhancement
Milestone

Comments

@indigoviolet
Copy link

indigoviolet commented Nov 7, 2022

Is there a way to configure nbstripout to strip certain types of output?

A workaround is jq 'del(.cells[] | select(.cell_type=="code") | .outputs[] | select(.name=="stderr"))', but it would be nice to do this sort of thing in nbstripout directly

@kynan
Copy link
Owner

kynan commented Nov 9, 2022

I don't understand what exactly you're asking for?

@kynan kynan added the state:waiting Waiting for response for reporter label Nov 9, 2022
@indigoviolet
Copy link
Author

❯ jq -c '.cells[] |select(.cell_type=="code")| .outputs[] | {"name": .name, "output_type": .output_type}' company_data.ipynb | sort | uniq
{"name":null,"output_type":"display_data"}
{"name":null,"output_type":"error"}
{"name":null,"output_type":"execute_result"}
{"name":"stderr","output_type":"stream"}
{"name":"stdout","output_type":"stream"}

I see many different types of output in a single notebook (multiple types for a single cell --- stderr, stdout, error, result etc), and would like control over which are stripped and which are kept, above and beyond the keep_output tag which keeps all outputs if present.

@kynan
Copy link
Owner

kynan commented Nov 12, 2022

Gotcha. Do you have an example notebook that could be used to test this @indigoviolet ?

@kynan
Copy link
Owner

kynan commented Feb 5, 2023

@indigoviolet Do you have an example notebook that could be used to test this?

@kynan
Copy link
Owner

kynan commented Nov 16, 2024

@indigoviolet Are you still interested in this feature? Would you be happy to work on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted state:waiting Waiting for response for reporter type:enhancement
Projects
None yet
Development

No branches or pull requests

2 participants