-
Notifications
You must be signed in to change notification settings - Fork 19
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
Document command line flag corner cases more clearly #254
Conversation
Might want to hold off merging this PR in actually until this bug is resolved: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #254 +/- ##
=======================================
Coverage 99.46% 99.46%
=======================================
Files 3 3
Lines 187 187
=======================================
Hits 186 186
Misses 1 1 ☔ View full report in Codecov by Sentry. |
Thanks, @DanielTsiang, this makes things clearer! I've added a commit to give more detailed instructions about avoiding the issue you experienced in #255. Note I reverted your change to the |
- Add more examples of how to use flags with clean and check modes. - Rewrite flags section into bullet points, easier to digest information flag by flag instead of all in one long paragraph. - Reorder the flags at the table at the end to put the flag before the filename, which is neater and makes more sense.
ff4eea3
to
2f95ed5
Compare
Because `--preserve-cell-metadata` can take zero or more arguments, the argument parser assigns any positional arguments following this flag as fields to preserve rather than notebook paths to process. This means if you're not passing any custom fields to preserve, the `--preserve-cell-metadata` flag needs to appear after the paths to be processed, or the notebook path should be preceded with `--` to tell the argument parser it's not an argument to `--preserve-cell-metadata`.
In nb-clean 1.6.0, the notebook path was not a position argument but had to be passed to the `--input` flag, so the syntax given would not work.
Thanks for correcting the PR! The README.md is a lot clearer now so hopefully a lot more people will feel comfortable using this tool in the future! 🙂 |
Make README.md clearer.
Changes:
nb-clean
in the CI and you're piping notebook filenames to the command viaxargs
.