File tree Expand file tree Collapse file tree 5 files changed +24
-39
lines changed Expand file tree Collapse file tree 5 files changed +24
-39
lines changed Original file line number Diff line number Diff line change 2121 run : |
2222 pip install -e .[dev]
2323
24+ - name : Check nbs are clean
25+ run : ./scripts/check_nbs_clean.sh
26+ shell : bash
27+
2428 - name : Run flake8
2529 run : nbqa flake8 nbs/*.ipynb
2630
Original file line number Diff line number Diff line change 11name : Publish package to TestPypi
22
33on :
4- push :
5- branches : ["main" ]
4+ release :
5+ types : [published ]
66jobs :
77 publish :
88 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1- name : CI
1+ name : Tests
22on : [workflow_dispatch, pull_request, push]
33
44jobs :
Original file line number Diff line number Diff line change 137137 "execution_count" : null ,
138138 "id" : " 8cabce32" ,
139139 "metadata" : {},
140- "outputs" : [
141- {
142- "data" : {
143- "text/plain" : [
144- " Card(rank=1, suit='spades')"
145- ]
146- },
147- "execution_count" : null ,
148- "metadata" : {},
149- "output_type" : " execute_result"
150- }
151- ],
140+ "outputs" : [],
152141 "source" : [
153142 " #| exec_doc\n " ,
154143 " #| code-fold: false\n " ,
171160 "execution_count" : null ,
172161 "id" : " 45aa3d73" ,
173162 "metadata" : {},
174- "outputs" : [
175- {
176- "data" : {
177- "text/plain" : [
178- " [Card(rank=1, suit='spades')]"
179- ]
180- },
181- "execution_count" : null ,
182- "metadata" : {},
183- "output_type" : " execute_result"
184- }
185- ],
163+ "outputs" : [],
186164 "source" : [
187165 " #| exec_doc\n " ,
188166 " [card for card in hand]"
193171 "execution_count" : null ,
194172 "id" : " 1b8584bd" ,
195173 "metadata" : {},
196- "outputs" : [
197- {
198- "data" : {
199- "text/plain" : [
200- " 0"
201- ]
202- },
203- "execution_count" : null ,
204- "metadata" : {},
205- "output_type" : " execute_result"
206- }
207- ],
174+ "outputs" : [],
208175 "source" : [
209176 " #| exec_doc\n " ,
210177 " hand.discard() # type: ignore\n " ,
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # set -x
4+
5+ nbdev_clean --clear_all
6+
7+ GIT_STATUS_FAILED (){
8+ git status -uno -s | grep ' .*\.ipynb'
9+ }
10+
11+ if GIT_STATUS_FAILED; then
12+ echo " !! ::error:: Detected notebooks that are not cleaned."
13+ false ;
14+ fi
You can’t perform that action at this time.
0 commit comments