|
8 | 8 | #package : 'FAST-Python-Tools' |
9 | 9 | } |
10 | 10 |
|
| 11 | +{ #category : 'development support' } |
| 12 | +FASTPythonImporter class >> devParseAll [ |
| 13 | + "Command specific to help me develop. this is useful to know the file to parse everything and detect if this raises any error. |
| 14 | + We do not save the models to not flood the memory and allow their GC." |
| 15 | + |
| 16 | + <script> |
| 17 | + self devParseFiles: ('/Users/cyril/marius/selected_notebooks_converted' asFileReference allFiles select: [ :f | f extension = 'py' ]) |
| 18 | +] |
| 19 | + |
| 20 | +{ #category : 'development support' } |
| 21 | +FASTPythonImporter class >> devParseBatch1 [ |
| 22 | + |
| 23 | + <script> |
| 24 | + self devParseBatchNumber: '001' |
| 25 | +] |
| 26 | + |
| 27 | +{ #category : 'development support' } |
| 28 | +FASTPythonImporter class >> devParseBatchNumber: aString [ |
| 29 | + "Command specific to help me develop. this is useful to know the file to parse everything and detect if this raises any error. |
| 30 | + We do not save the models to not flood the memory and allow their GC." |
| 31 | + |
| 32 | + <script> |
| 33 | + self devParseFiles: (('/Users/cyril/marius/selected_notebooks_converted/batch_' , aString) asFileReference files select: [ :f | f extension = 'py' ]) |
| 34 | +] |
| 35 | + |
| 36 | +{ #category : 'development support' } |
| 37 | +FASTPythonImporter class >> devParseFiles: aCollection [ |
| 38 | + "Command specific to help me develop. this is useful to know the file to parse everything and detect if this raises any error. |
| 39 | + We do not save the models to not flood the memory and allow their GC.. |
| 40 | + |
| 41 | + I save as last element the time it took to run on the full batch." |
| 42 | + |
| 43 | + | result | |
| 44 | + result := OrderedCollection new. |
| 45 | + |
| 46 | + result add: [ |
| 47 | + aCollection |
| 48 | + do: [ :file | |
| 49 | + | timeToRun | |
| 50 | + timeToRun := [ self parseFile: file ] millisecondsToRun. |
| 51 | + result add: file -> timeToRun ] |
| 52 | + displayingProgress: [ :file | file pathString ] ] millisecondsToRun. |
| 53 | + |
| 54 | + result inspect |
| 55 | +] |
| 56 | + |
11 | 57 | { #category : 'parsing' } |
12 | 58 | FASTPythonImporter class >> parse: aString [ |
13 | 59 |
|
|
0 commit comments