Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start working on mutation issues in validate. #236

Closed
wants to merge 2 commits into from

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented Nov 16, 2021

Step 1 toward #235

@Carreau Carreau requested a review from MSeal November 16, 2021 01:27
@Carreau
Copy link
Member Author

Carreau commented Nov 16, 2021

cc @echarles

@echarles
Copy link
Member

@Carreau I have just looked at the code change (not tested).

  • normalize calls itself, is this intented? Should it be documented that it is a placeholder for future validations.
  • -_normalize: called by validate and logs a warning, which is good as it will inform upstream libraries of potential issues (every cell should have an id...) and does not break anything.

@Carreau
Copy link
Member Author

Carreau commented Nov 17, 2021

  • normalize calls itself, is this intented? Should it be documented that it is a placeholder for future validations.

It should have called the private _normalize. And I should have marked this as a draft.

@Carreau Carreau marked this pull request as draft November 17, 2021 15:54
@Carreau Carreau marked this pull request as ready for review November 23, 2021 17:04
@Carreau
Copy link
Member Author

Carreau commented Nov 23, 2021

Rebased, test added and cleanup.

We change the validation logic and separate the normalisation from
the validation step.

We make sure that if a notebook is normalized, it emits a warning.
In the future we will turn the warning in to an Error.

We add test for the current and an xfail test for the future behavior
Carreau added a commit to Carreau/jupyter_notebook that referenced this pull request Nov 23, 2021
See jupyter/nbformat#236 and
https://github.com/jupyter/nbformat/issue/235.

This mostly affects frontends that do not always add ids to cells,
like classic notebook, and that issue is not limited to cells ids, but
also to empty cells, that may not have/need a trusted field.

But that is another issue.
Carreau added a commit to Carreau/jupyter_notebook that referenced this pull request Nov 23, 2021
See jupyter/nbformat#236 and
https://github.com/jupyter/nbformat/issue/235.

This mostly affects frontends that do not always add ids to cells,
like classic notebook, and that issue is not limited to cells ids, but
also to empty cells, that may not have/need a trusted field.

But that is another issue.
Carreau added a commit to Carreau/jupyter_notebook that referenced this pull request Nov 23, 2021
See jupyter/nbformat#236 and
https://github.com/jupyter/nbformat/issue/235.

This mostly affects frontends that do not always add ids to cells,
like classic notebook, and that issue is not limited to cells ids, but
also to empty cells, that may not have/need a trusted field.

But that is another issue.
@Carreau Carreau closed this Jun 8, 2022
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.

2 participants