Skip to content

fix: json validation error with markdown cells#1986

Merged
johanneskoester merged 3 commits intosnakemake:mainfrom
prs513rosewood:fix/nbformat-json-validation
Dec 6, 2022
Merged

fix: json validation error with markdown cells#1986
johanneskoester merged 3 commits intosnakemake:mainfrom
prs513rosewood:fix/nbformat-json-validation

Conversation

@prs513rosewood
Copy link
Contributor

@prs513rosewood prs513rosewood commented Dec 1, 2022

Description

This should fix #718. The cleanup routine after editing a notebook would add the "outputs" attribute to all cells in the notebook, which would cause the JSON validation of nbconvert to fail for cells where no output is expected.

I've also added a cleanup of the "execution_count" property, which should make SCM management of the notebook easier (execution count of cells is prompt to frequent changes in interactive sessions). I can remove it if that change is superfluous.

Finally, I think #1032 can be safely closed, I have not encountered it with recent versions of snakemake.

QC

  • The PR contains a test case for the changes or the changes are already covered by an existing test case.
  • The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

Setting a null execution count makes it easier to manage the saved notebook in a
SCM repository.
@prs513rosewood
Copy link
Contributor Author

It looks like tests are failing due to a failed deployment of slurm. I don't really know what to do about that.

@johanneskoester
Copy link
Contributor

Should be fixed with the merge I just did

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@johanneskoester johanneskoester merged commit 6c26f75 into snakemake:main Dec 6, 2022
@prs513rosewood prs513rosewood deleted the fix/nbformat-json-validation branch December 6, 2022 18:32
johanneskoester added a commit that referenced this pull request Dec 13, 2022
🤖 I have created a release *beep* *boop*
---


##
[7.19.0](v7.18.2...v7.19.0)
(2022-12-13)


### Features

* add keyword to gridftp remote provide to specify the number or disable
usage of multiple data stream
([#1974](#1974))
([3e6675d](3e6675d))
* provide information about temp, pipe, and service files in --summary
([#1977](#1977))
([c7c7776](c7c7776))
* native SLURM support (--slurm, see docs)
([#1015](#1015))
([c7ea059](c7ea059))


### Bug Fixes

* avoid logfile writing in case of dryrun; better hints in case of
incomplete checkpoints
([#1994](#1994))
([a022705](a022705))
* handle case where zenodo deposition does not return files
([#2004](#2004))
([b63c4a7](b63c4a7))
* issue [#1882](#1882)
WorkflowError: Metadata can't be created as it already exists (Windows)
([#1971](#1971))
([d4484e6](d4484e6))
* json validation error with markdown cells
([#1986](#1986))
([6c26f75](6c26f75))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdown cells in edited notebook have invalid "outputs"

2 participants