Ensure Clean Jupyter Notebooks
ActionsTags
(2)This GitHub action enforces rules on certain cells and metadata in Jupyter Notebooks.
Because Jupyter notebooks contain metadata such as outputs
and execution_count
, they do not lend themselves well to versioning unless the unnecessary information has first been removed.
This GitHub action can ensure that CI tests fail unless Jupyter notebooks have been appropriately linted prior to being pushed to the repository.
Add the following step to your GitHub action:
- uses: ResearchSoftwareActions/[email protected]
All of the following are checked by default:
The Jupyter outputs
field is a list of outputs from each cell.
These can include binary data.
By default the action will fail if outputs
is not an empty list ([]
).
The Jupyter execution_count
field is an integer counting the number of cell executions.
By default the action will fail if execution_count
is not null
.
This action takes one optional argument (disable-checks
) that specifies which checks, supplied as a comma separated list, should be disabled.
The full list of checks are:
outputs
disable checks relating to cell outputsexecution_count
disable checks relating to execution count
- uses: ResearchSoftwareActions/[email protected]
with:
disable-checks: outputs,execution_count
Ensure Clean Jupyter Notebooks is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.