Skip to main content

No project description provided

Project description

gitaddnb

If you want to add a Jupyter Notebook to the git stage ensuring that:

  • all code cells have consecutive execution order
  • all code cell outputs are clean
  • all code cell execution orders are clean
  • all cell outputs on disk remain untouched

then this package is for you.

Pre-Commit

You can use this package as a pre-commit hook:

repos:
  - repo: https://github.com/pcjedi/gitaddnb
    rev: v0.1.0
    hooks:
      - id: gitaddnb

On the first Commit Attempt, this hook will fail due to changing the content of the staged Notebooks. The second try should then go through.

CLI

Installation

Install this package using pipx or pip. It comes without any dependencies.

pipx install gitaddnb

Usage

After installation, add notebooks like this:

gitaddnb notebook1.ipynb notebook2.ipynb

The notebooks will now be in the git stage, cleaned. The files in the working directory will still have your output.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitaddnb-0.1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

gitaddnb-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file gitaddnb-0.1.0.tar.gz.

File metadata

  • Download URL: gitaddnb-0.1.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for gitaddnb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 92910a6b67ede2c108f9639c5bec612bfe6534b2c7452e2eaf4e677af046d1d8
MD5 f8c0917a4866c04b2b052aa87582d746
BLAKE2b-256 65237d7eff1e7b2111ca59c13c83df04109fb265833e5a04bcf53268f0c5798d

See more details on using hashes here.

File details

Details for the file gitaddnb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gitaddnb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for gitaddnb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0edeaef0db421769538307142db3a1cf4425de7ce91f131174c12543dfa11ac4
MD5 fdcbc12f45faa0edb595b0ed0a26db20
BLAKE2b-256 65d8bd6b619122178c82bb5c980c446acfb3c6019a78018562169c608cf98cca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page