Add compliant and noncompliant examples of python/notebook-best-practice-violation@v1.0#61
Conversation
…ice-violation@v1.0
| @@ -0,0 +1,18 @@ | |||
| # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |||
There was a problem hiding this comment.
This rule detects three kinds of violations: empty cell, too many cel, as well as misplaced imports. You need to add them.
There was a problem hiding this comment.
Improved examples.
| def __CELL_EDGE__(x): | ||
| pass |
There was a problem hiding this comment.
Remove the CELL_EDGE markers
| @@ -0,0 +1,20 @@ | |||
| # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |||
There was a problem hiding this comment.
Why do we need separate files for compliant and non compliant? Can these be in the same .py file?
There was a problem hiding this comment.
to cover all three types of violation(blank cell, cell limit, misplaced imports) in one file is not possible. Is it ok if we create separate files for each example?
san2488
left a comment
There was a problem hiding this comment.
I'm not sure this will pass through the Detector Library publish correctly due to being in 2 separate files and failing linter checks. Not approving this one yet.
san2488
left a comment
There was a problem hiding this comment.
Let's discuss what we want here. In the current state, we can't publish this since the library only supports .py files.
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # {fact rule=notebook-best-practice-violation@v1.0 defects=1} | ||
| # —— Code Cell 1, Execution Count 1 —— # |
There was a problem hiding this comment.
In this example, remove all Execution Count, as this information is not needed
Write this.
# —— Code Cell 1—— #
Description of changes: