nbdevAuto 0.0.112__tar.gz → 0.0.130__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdevAuto
3
- Version: 0.0.112
3
+ Version: 0.0.130
4
4
  Summary: automating nbdev
5
5
  Home-page: https://github.com/bthek1/nbdevAuto
6
6
  Author: Benedict Thekkel
@@ -17,8 +17,9 @@ Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: License :: OSI Approved :: Apache Software License
18
18
  Requires-Python: >=3.7
19
19
  Description-Content-Type: text/markdown
20
- Provides-Extra: dev
21
20
  License-File: LICENSE
21
+ Requires-Dist: graphviz
22
+ Provides-Extra: dev
22
23
 
23
24
  # Nbdev Automation Library
24
25
 
@@ -0,0 +1 @@
1
+ __version__ = "0.0.130"
@@ -27,6 +27,8 @@ d = { 'settings': { 'branch': 'main',
27
27
  'nbdevAuto/functions.py'),
28
28
  'nbdevAuto.functions.download_search_images': ( 'functions.html#download_search_images',
29
29
  'nbdevAuto/functions.py'),
30
+ 'nbdevAuto.functions.graph': ('functions.html#graph', 'nbdevAuto/functions.py'),
31
+ 'nbdevAuto.functions.graph.__init__': ('functions.html#graph.__init__', 'nbdevAuto/functions.py'),
30
32
  'nbdevAuto.functions.kaggle_competition_download': ( 'functions.html#kaggle_competition_download',
31
33
  'nbdevAuto/functions.py'),
32
34
  'nbdevAuto.functions.kaggle_dataset_download': ( 'functions.html#kaggle_dataset_download',
@@ -3,10 +3,9 @@
3
3
  # %% auto 0
4
4
  __all__ = ['read_from_file', 'download_pic', 'create_searches_folder', 'download_search_image', 'download_search_images',
5
5
  'verify_pics', 'resize_pics', 'create_data_folder', 'classify_images', 'kaggle_competition_download',
6
- 'kaggle_dataset_download']
6
+ 'kaggle_dataset_download', 'graph']
7
7
 
8
8
  # %% ../nbs/00_Functions.ipynb 5
9
- #|code-fold: true
10
9
  def read_from_file(file_path):
11
10
  from fastbook import search_images_ddg
12
11
  from fastdownload import download_url
@@ -24,7 +23,6 @@ def read_from_file(file_path):
24
23
  return countries
25
24
 
26
25
  # %% ../nbs/00_Functions.ipynb 7
27
- #|code-fold: true
28
26
  def download_pic(
29
27
  image:str, #image description
30
28
  n_images:int=1,
@@ -80,7 +78,6 @@ def download_pic(
80
78
  return Image.open(image_path).to_thumb(256,256)
81
79
 
82
80
  # %% ../nbs/00_Functions.ipynb 10
83
- #|code-fold: true
84
81
  def create_searches_folder(folder_path, searches, show_progress:bool=False):
85
82
  from tqdm.notebook import tqdm
86
83
  print("Create folder")
@@ -90,7 +87,6 @@ def create_searches_folder(folder_path, searches, show_progress:bool=False):
90
87
  if show_progress == True: print(f'created {i} folder')
91
88
 
92
89
  # %% ../nbs/00_Functions.ipynb 11
93
- #|code-fold: true
94
90
  def download_search_image(folder_path,
95
91
  item,
96
92
  before,
@@ -121,7 +117,6 @@ def download_search_image(folder_path,
121
117
 
122
118
 
123
119
  # %% ../nbs/00_Functions.ipynb 12
124
- #|code-fold: true
125
120
  def download_search_images(folder_path,
126
121
  searches,
127
122
  before,
@@ -137,7 +132,6 @@ def download_search_images(folder_path,
137
132
 
138
133
 
139
134
  # %% ../nbs/00_Functions.ipynb 13
140
- #|code-fold: true
141
135
  def verify_pics(folder_path,
142
136
  ):
143
137
  from fastai.vision.all import verify_images, get_image_files
@@ -149,7 +143,6 @@ def verify_pics(folder_path,
149
143
  print(f"Number of images failed: {len(failed)}")
150
144
 
151
145
  # %% ../nbs/00_Functions.ipynb 14
152
- #|code-fold: true
153
146
  def resize_pics(folder_path,
154
147
  searches,
155
148
  max_size=400,
@@ -168,7 +161,6 @@ def resize_pics(folder_path,
168
161
  if show == True: print(f"resizing images for: {k}")
169
162
 
170
163
  # %% ../nbs/00_Functions.ipynb 15
171
- #|code-fold: true
172
164
  def create_data_folder(
173
165
  folder_path:str,
174
166
  searches:tuple,
@@ -209,7 +201,6 @@ def create_data_folder(
209
201
 
210
202
 
211
203
  # %% ../nbs/00_Functions.ipynb 18
212
- #|code-fold: true
213
204
  def classify_images(learn, img):
214
205
  'image classifer'
215
206
  from fastai.vision.all import PILImage
@@ -220,7 +211,6 @@ def classify_images(learn, img):
220
211
  return dict(zip(categories, rounded_probs))
221
212
 
222
213
  # %% ../nbs/00_Functions.ipynb 20
223
- #|code-fold: true
224
214
  def kaggle_competition_download(name:str, folderpath:str = './Data'):
225
215
  'download competition files from kaggle'
226
216
  import os
@@ -239,7 +229,6 @@ def kaggle_competition_download(name:str, folderpath:str = './Data'):
239
229
  zipfile.ZipFile(f'{path}/{name}.zip').extractall(path)
240
230
 
241
231
  # %% ../nbs/00_Functions.ipynb 21
242
- #|code-fold: true
243
232
  def kaggle_dataset_download(user:str,
244
233
  name:str,
245
234
  folderpath:str = './Data'):
@@ -257,3 +246,43 @@ def kaggle_dataset_download(user:str,
257
246
  import zipfile,kaggle
258
247
  kaggle.api.dataset_download_files(dataset = f'{user}/{name}', path = path)
259
248
  zipfile.ZipFile(f'{path}/{name}.zip').extractall(path)
249
+
250
+ # %% ../nbs/00_Functions.ipynb 23
251
+ from graphviz import Digraph
252
+
253
+ # %% ../nbs/00_Functions.ipynb 24
254
+ class graph(Digraph):
255
+ def __init__(self, *args, **kwargs):
256
+ # Call the superclass's __init__ method using super() and pass all arguments
257
+ super().__init__(*args, **kwargs)
258
+ self.primary = '#fdfcdc'
259
+ self.secondary = '#fcbf49'
260
+ self.third = '#f77f00'
261
+ self.fourth = '#d62828'
262
+ self.fifth = '#003049'
263
+
264
+
265
+ self.graph_attr.update(style='rounded,filled',
266
+ rankdir='LR',
267
+ compound='true',
268
+ fillcolor=self.fourth,
269
+ fontcolor=self.fifth,
270
+ penwidth = '0',
271
+ fontname = "Helvetica,Arial,sans-serif")
272
+
273
+ self.node_attr.update(style='rounded,filled',
274
+ size='8,5', shape='box',
275
+ width='1.5',
276
+ fillcolor=self.secondary,
277
+ fontcolor=self.fifth,
278
+ penwidth = '0',
279
+ fontname = "Helvetica,Arial,sans-serif")
280
+
281
+ self.edge_attr.update(arrowhead='vee',
282
+ arrowsize='1',
283
+ color=self.fifth,
284
+ len='1.00',
285
+ fontname = "Helvetica,Arial,sans-serif",
286
+ penwidth='1')
287
+ self.graph_attr.update()
288
+
@@ -4,7 +4,6 @@
4
4
  __all__ = ['PDFreader']
5
5
 
6
6
  # %% ../nbs/02_PDF_reader.ipynb 5
7
- #|code-fold: true
8
7
  class PDFreader:
9
8
  ''' Function for reading and displaying pdf files
10
9
  ex. path = './Data/<file>.pdf'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdevAuto
3
- Version: 0.0.112
3
+ Version: 0.0.130
4
4
  Summary: automating nbdev
5
5
  Home-page: https://github.com/bthek1/nbdevAuto
6
6
  Author: Benedict Thekkel
@@ -17,8 +17,9 @@ Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: License :: OSI Approved :: Apache Software License
18
18
  Requires-Python: >=3.7
19
19
  Description-Content-Type: text/markdown
20
- Provides-Extra: dev
21
20
  License-File: LICENSE
21
+ Requires-Dist: graphviz
22
+ Provides-Extra: dev
22
23
 
23
24
  # Nbdev Automation Library
24
25
 
@@ -0,0 +1,3 @@
1
+ graphviz
2
+
3
+ [dev]
@@ -1,7 +1,7 @@
1
1
  [DEFAULT]
2
2
  repo = nbdevAuto
3
3
  lib_name = nbdevAuto
4
- version = 0.0.112
4
+ version = 0.0.130
5
5
  min_python = 3.7
6
6
  license = apache2
7
7
  black_formatting = False
@@ -32,7 +32,7 @@ allowed_cell_metadata_keys =
32
32
  jupyter_hooks = True
33
33
  clean_ids = True
34
34
  clear_all = False
35
- requirements =
35
+ requirements = graphviz
36
36
  conda_requirements =
37
37
  dev_requirements =
38
38
  console_scripts =
@@ -1 +0,0 @@
1
- __version__ = "0.0.112"
@@ -1,2 +0,0 @@
1
-
2
- [dev]
File without changes
File without changes
File without changes
File without changes
File without changes