Skip to main content
Ctrl+K

ComPWA policy

  • Common Partial Wave Analysis
  • GitHub
  • check-dev-files
  • API
    • check_dev_files
      • pixi
      • binder
      • black
      • citation
      • commitlint
      • conda
      • cspell
      • dependabot
      • deprecated
      • direnv
      • editorconfig
      • github_labels
      • github_workflows
      • gitpod
      • jupyter
      • mypy
      • nbstripout
      • precommit
      • prettier
      • pyproject
      • pyright
      • pytest
      • pyupgrade
      • readthedocs
      • release_drafter
      • ruff
      • toml
      • tox
      • update_lock
      • uv
      • vscode
    • utilities
      • precommit
        • getters
        • setters
        • struct
      • pyproject
        • getters
        • setters
      • cfg
      • executor
      • match
      • notebook
      • python
      • readme
      • toml
      • vscode
      • yaml
    • colab_toc_visible
    • errors
    • fix_nbformat_version
    • remove_empty_tags
    • self_check
    • set_nb_cells
    • set_nb_display_name
  • Changelog
  • Upcoming features
  • Help developing
  • Repository
  • Show source
  • Suggest edit
  • Open issue

fix_nbformat_version

Contents

  • main()
  • set_nbformat_version()
  • remove_cell_ids()
  • check_svg_output_cells()

fix_nbformat_version#

import compwa_policy.fix_nbformat_version

Set nbformat minor version to 4.

nbformat adds random cell ids since version 5.x. This is annoying for git diffs. The solution is to set the version to v4 and removes those cell ids.

main(argv: Sequence[str] | None = None) → int[source]#
set_nbformat_version(filename: str) → None[source]#
remove_cell_ids(filename: str) → None[source]#
check_svg_output_cells(filename: str) → None[source]#

previous

errors

next

remove_empty_tags

Contents
  • main()
  • set_nbformat_version()
  • remove_cell_ids()
  • check_svg_output_cells()

By Common Partial Wave Analysis

Last updated on 18 February 2025.