rolling-pin 0.11.0__py3-none-any.whl → 0.11.1__py3-none-any.whl

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.
@@ -8,6 +8,7 @@ import re
8
8
 
9
9
  from lunchbox.enforce import Enforce
10
10
  from pandas import DataFrame
11
+ import lunchbox.tools as lbt
11
12
  import yaml
12
13
 
13
14
  from rolling_pin.blob_etl import BlobETL
@@ -268,7 +269,9 @@ class ConformETL:
268
269
  data.apply(lambda x: rpt.copy_file(x.source, x.target), axis=1)
269
270
 
270
271
  # copy lines
271
- data['text'] = data.source.apply(rpt.read_text)
272
+ data['text'] = data.source.apply(lambda x: lbt.try_(rpt.read_text, x, 'error'))
273
+ readable_mask = data.text.apply(lambda x: isinstance(x, str))
274
+ data.loc[~readable_mask, 'text'] = ''
272
275
  rules = list(filter(lambda x: x['group'] in groups, self._line_rules))
273
276
  for rule in rules:
274
277
  mask = data.groups.apply(lambda x: rule['group'] in x)
@@ -281,4 +284,4 @@ class ConformETL:
281
284
  replace_value=rule.get('replace', None),
282
285
  )
283
286
  )
284
- data.apply(lambda x: rpt.write_text(x.text, x.target), axis=1)
287
+ data[readable_mask].apply(lambda x: rpt.write_text(x.text, x.target), axis=1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rolling-pin
3
- Version: 0.11.0
3
+ Version: 0.11.1
4
4
  Summary: A library of generic tools for ETL work and visualization of JSON blobs and python repositories
5
5
  License: MIT
6
6
  Keywords: ETL,blob,dependency,graph,svg,networkx,transform,code metrics,dependency diagram,build system
@@ -2,14 +2,14 @@ rolling_pin/__init__.py,sha256=R_g0FYses--dTmvbZLtFFI-FPn4og6p8zmkEesYmN1A,511
2
2
  rolling_pin/blob_etl.py,sha256=79eEeCZwPeJ8XwMlLp9-MywDwC-HlqMK-MJhksLrPdU,20712
3
3
  rolling_pin/command.py,sha256=xaM3Zp516sS2iF8RWb6qwGpc_IYmIkwtzJ2vDK9zPZo,6477
4
4
  rolling_pin/conform_config.py,sha256=W-Ps6FPuZ7SOxFOfEjIo2MZac1vCRuVky6samSZPQkw,2630
5
- rolling_pin/conform_etl.py,sha256=VyHAKVvdOtjx6Fy8dWn6XMfNh9OFgBbidyDUnSl3Zl4,9594
5
+ rolling_pin/conform_etl.py,sha256=uWYg8yw6kilatdvt7qt_0AaQl0UsVFUC-IaIXMoDezA,9786
6
6
  rolling_pin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  rolling_pin/radon_etl.py,sha256=0rxFSnv2z41vKFe35XqCHSnnjT9qNNjouaCcIYkcHgI,18252
8
8
  rolling_pin/repo_etl.py,sha256=Q6W-_4hTNh3nj5o9eTz5d7HuH5Kf9Uew8W9UD52dCJ0,21041
9
9
  rolling_pin/toml_etl.py,sha256=fyioQTfqFW1e15qZ8F64sX379V5JzNlBKBuC5IPIgIo,4350
10
10
  rolling_pin/tools.py,sha256=bLZGXDg5DuV59RxiVjLIwTAr83X5nMBElvR7w0mEnx8,19179
11
- rolling_pin-0.11.0.dist-info/entry_points.txt,sha256=nbMiJnGLhp49xrtx1pjK8sJiBrwkpj2kq-ezp8Zfyyk,56
12
- rolling_pin-0.11.0.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
13
- rolling_pin-0.11.0.dist-info/METADATA,sha256=zPXaZMwd0OLU7NPIYjaA_U3vOF7PWwOjFEHuwzN2h44,20678
14
- rolling_pin-0.11.0.dist-info/licenses/LICENSE,sha256=Z61vsRc9ZyRu0Tm3TkYgIeKDjUJCR3dT0hJonw9Q3i4,1067
15
- rolling_pin-0.11.0.dist-info/RECORD,,
11
+ rolling_pin-0.11.1.dist-info/entry_points.txt,sha256=nbMiJnGLhp49xrtx1pjK8sJiBrwkpj2kq-ezp8Zfyyk,56
12
+ rolling_pin-0.11.1.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
13
+ rolling_pin-0.11.1.dist-info/METADATA,sha256=JlogGX5mw9klf4_W01f8wClLSndq92FdkswWpTlGw04,20678
14
+ rolling_pin-0.11.1.dist-info/licenses/LICENSE,sha256=Z61vsRc9ZyRu0Tm3TkYgIeKDjUJCR3dT0hJonw9Q3i4,1067
15
+ rolling_pin-0.11.1.dist-info/RECORD,,