{"id":14977417,"url":"https://github.com/chbrown/nbfilter","last_synced_at":"2026-03-05T19:43:40.463Z","repository":{"id":57445106,"uuid":"138437402","full_name":"chbrown/nbfilter","owner":"chbrown","description":"Filter .ipynb (nbformat) files to improve integration with version control systems (VCS)","archived":false,"fork":false,"pushed_at":"2018-09-26T17:29:14.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-21T19:45:59.549Z","etag":null,"topics":["git","git-filter","ipynb","jupyter","jupyter-notebook","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chbrown.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-23T22:22:44.000Z","updated_at":"2019-03-06T04:36:52.000Z","dependencies_parsed_at":"2022-09-26T17:30:46.183Z","dependency_job_id":null,"html_url":"https://github.com/chbrown/nbfilter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/chbrown/nbfilter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chbrown%2Fnbfilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chbrown%2Fnbfilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chbrown%2Fnbfilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chbrown%2Fnbfilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chbrown","download_url":"https://codeload.github.com/chbrown/nbfilter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chbrown%2Fnbfilter/sbom","scorecard":{"id":275143,"data":{"date":"2025-08-11","repo":{"name":"github.com/chbrown/nbfilter","commit":"64ead04e15e660a1681761069ad473d0c00efdef"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T14:13:42.061Z","repository_id":57445106,"created_at":"2025-08-17T14:13:42.061Z","updated_at":"2025-08-17T14:13:42.061Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286079811,"owners_count":27282121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-26T02:00:06.075Z","response_time":193,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","git-filter","ipynb","jupyter","jupyter-notebook","python"],"created_at":"2024-09-24T13:55:37.167Z","updated_at":"2025-11-26T19:02:47.877Z","avatar_url":"https://github.com/chbrown.png","language":"Python","readme":"# `nbfilter`\n\n[![PyPI version](https://badge.fury.io/py/nbfilter.svg)](https://pypi.org/project/nbfilter/)\n\nFilter `.ipynb` ([`nbformat`](https://github.com/jupyter/nbformat)) files to improve integration with version control systems (VCS), specifically git.\n\n\n## Setup\n\nInstall from [PyPI](https://pypi.python.org/pypi/nbfilter):\n\n```sh\npip install nbfilter\n```\n\n### Use from the command line:\n\n```sh\npython -m nbfilter.clean \u003c research.ipynb | sponge research.ipynb\n```\n\n\n### Integrate into `git`:\n\nFrom your repository's root directory:\n\nRun the following command to define a filter called `ipynbfilter` in your `.git/config` settings:\n```sh\ngit config filter.ipynbfilter.clean 'python -m nbfilter.clean'\n```\n\nThen run one of the following command sequences to trigger it for all files with the `.ipynb` extension:\n```sh\nprintf '*.ipynb filter=ipynbfilter\\n' \u003e\u003e .gitattributes # Apply filter for all contributors\ngit add .gitattributes\n```\n_or_:\n```sh\nprintf '*.ipynb filter=ipynbfilter\\n' \u003e\u003e .git/info/attributes # Apply filter for just me\n```\n\nTo apply it to files that are already under source control (for example, so that diffing subsequent changes produces more intelligible results):\n```sh\ngit add --renormalize . # (re-)apply filters to all files currently under source control\n```\n_or_:\n```sh\ngit add --renormalize research.ipynb # (re-)apply filters to a single file\n```\n\n\n## References / alternatives\n\n* Min RK's [`nbstripout` gist](https://gist.github.com/minrk/6176788) that started it all (licensed as \"Public Domain\").\n  \u003e git pre-commit hook for stripping output from IPython notebooks\n* [`nbstripout`](https://github.com/kynan/nbstripout) is a [PyPI-published](https://pypi.org/project/nbstripout/) package that provides all its functionality through a `nbstripout` console script.\n\n* StackOverflow question: [Using IPython notebooks under version control](https://stackoverflow.com/q/18734739)\n* [Making Git and Jupyter Notebooks play nice](http://timstaley.co.uk/posts/making-git-and-jupyter-notebooks-play-nice/)\n  uses [`jq`](https://stedolan.github.io/jq/) instead of Python to do the JSON modifications, for the sake of speed.\n* [Jupyter notebooks and version control](http://droettboom.com/blog/2018/01/18/diffable-jupyter-notebooks/)\n  discusses alternatives to the `.ipynb` file format that would natively improve `git diff`'ing\n  (specifically, YAML with some additional constraints).\n\n\n## License\n\nCopyright (c) 2018 Christopher Brown. [MIT Licensed](LICENSE.txt).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchbrown%2Fnbfilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchbrown%2Fnbfilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchbrown%2Fnbfilter/lists"}