reactor: GitHub Action for improved notebook file handling#212
reactor: GitHub Action for improved notebook file handling#212kunalagra wants to merge 8 commits intokynan:mainfrom
Conversation
|
Testing Performed at:- https://github.com/kunalagra/nbstripout-action-test |
|
Are you sure your revised action actually works with spaces in filenames? In this run I see
|
That is indeed correct. It seems to have been missed by me. The action works when the file is part of glob matching and not passes as filename to the input of the action as the input does split by spaces. Run - https://github.com/kunalagra/nbstripout-action-test/actions/runs/22976128179/job/66705053665 I think the ideal solution would be to pass them as multi line string instead of the current space based filename to the action? Would also update README to reflect the change. |
OK, I have no particular opinion here. Any behaviour changes, please update the README :) |
|
Have fixed it. Test Run - https://github.com/kunalagra/nbstripout-action-test/actions/runs/23116895718/job/67143929616 I see similar patterns across some repo too like - https://github.com/actions/upload-artifact?tab=readme-ov-file#upload-using-multiple-paths-and-exclusions & |
|
@kunalagra thanks you very much for the suggested changes, are you aware if we can add testing cases for the repo's action, alike at your branch? Maybe it's an overkill but I've never bothered adding auto-testing for an action before and was curious. Also, if you are aware of any channels we could promote the |
|
We could definitely add tests for the action. Since the repo already has e2e notebooks I think we can have GitHub Action that would run on those and define cases? Let me check on this.
I am not aware of such channels. Maybe Data Science/ML subreddits or groups? Need to look into. |
|
@kynan have added the test action that will use the repo's path to action file. Also have copied files and renamed them to confirm the workflow. |
This PR refactors the GitHub composite action in action.yml to make notebook detection and verification safer and more robust across common runner environments.
Fixes #211
What Changed
**/*.ipynbreliably.INPUT_*) for clearer script logic.xargs -0with null-delimited file paths.pathsextra-keyskeep-outputkeep-countstrip-init-cells