Skip to content

Commit c9c0517

Browse files
committed
Add some methods to help me dev
1 parent b9865e6 commit c9c0517

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

src/FAST-Python-Tools/FASTPythonImporter.class.st

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,52 @@ Class {
88
#package : 'FAST-Python-Tools'
99
}
1010

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+
1157
{ #category : 'parsing' }
1258
FASTPythonImporter class >> parse: aString [
1359

0 commit comments

Comments
 (0)