srstevenson / nb-clean

Clean Jupyter notebooks for version control. Remove metadata, outputs, and execution counts with Git and pre-commit support.
https://pypi.org/project/nb-clean
ISC License
135 stars 18 forks source link

Add `--remove-all-notebook-metadata` flag #163

Closed yasirroni closed 2 months ago

yasirroni commented 1 year ago

Add new argument for clean and filter "-M" or "--remove-notebook-metadata" to "remove notebook metadata.

    clean_parser.add_argument(
        "-M",
        "--remove-notebook-metadata",
        action="store_true",
        help="remove notebook metadata",
    )
codecov[bot] commented 1 year ago

Codecov Report

Base: 98.07% // Head: 97.02% // Decreases project coverage by -1.05% :warning:

Coverage data is based on head (b07f6d6) compared to base (5ddf4f7). Patch coverage: 86.66% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #163 +/- ## ========================================== - Coverage 98.07% 97.02% -1.06% ========================================== Files 3 3 Lines 156 168 +12 ========================================== + Hits 153 163 +10 - Misses 3 5 +2 ``` | [Impacted Files](https://codecov.io/gh/srstevenson/nb-clean/pull/163?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Scott+Stevenson) | Coverage Δ | | |---|---|---| | [src/nb\_clean/\_\_init\_\_.py](https://codecov.io/gh/srstevenson/nb-clean/pull/163/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Scott+Stevenson#diff-c3JjL25iX2NsZWFuL19faW5pdF9fLnB5) | `97.67% <84.61%> (-2.33%)` | :arrow_down: | | [src/nb\_clean/cli.py](https://codecov.io/gh/srstevenson/nb-clean/pull/163/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Scott+Stevenson#diff-c3JjL25iX2NsZWFuL2NsaS5weQ==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Scott+Stevenson). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Scott+Stevenson)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

srstevenson commented 1 year ago

As this is branched from #161, I'll wait until that's complete before reviewing this.

yasirroni commented 3 months ago

https://github.com/srstevenson/nb-clean/pull/161 is merged. Please review this branch. I will rebase this branch.

yasirroni commented 3 months ago

After some reading it seems current behavior of nb-clean is cleaning notebook metadata?

yasirroni commented 3 months ago

All updated. Please review.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.51%. Comparing base (b71adf0) to head (1432d1b). Report is 25 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #163 +/- ## ========================================== + Coverage 99.46% 99.51% +0.04% ========================================== Files 3 3 Lines 187 205 +18 ========================================== + Hits 186 204 +18 Misses 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

yasirroni commented 3 months ago

All resolved with 100% coverage. Please review.

srstevenson commented 2 months ago

This change is included in the nb-clean 3.3.0 release.