rolling-pin 0.10.0__py3-none-any.whl → 0.11.0__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.
- rolling_pin/repo_etl.py +15 -4
- {rolling_pin-0.10.0.dist-info → rolling_pin-0.11.0.dist-info}/METADATA +75 -69
- {rolling_pin-0.10.0.dist-info → rolling_pin-0.11.0.dist-info}/RECORD +6 -6
- {rolling_pin-0.10.0.dist-info → rolling_pin-0.11.0.dist-info}/WHEEL +0 -0
- {rolling_pin-0.10.0.dist-info → rolling_pin-0.11.0.dist-info}/entry_points.txt +0 -0
- {rolling_pin-0.10.0.dist-info → rolling_pin-0.11.0.dist-info}/licenses/LICENSE +0 -0
rolling_pin/repo_etl.py
CHANGED
@@ -335,17 +335,28 @@ class RepoETL():
|
|
335
335
|
return data
|
336
336
|
|
337
337
|
@staticmethod
|
338
|
-
def _to_networkx_graph(data):
|
339
|
-
# (DataFrame) -> networkx.DiGraph
|
338
|
+
def _to_networkx_graph(data, escape_chars=False):
|
339
|
+
# (DataFrame, bool) -> networkx.DiGraph
|
340
340
|
'''
|
341
341
|
Converts given DataFrame into networkx directed graph.
|
342
342
|
|
343
343
|
Args:
|
344
|
-
DataFrame: DataFrame of nodes.
|
344
|
+
data (DataFrame): DataFrame of nodes.
|
345
|
+
escape_chars (bool, optional): Escape special characters. Used to
|
346
|
+
avoid dot file errors. Default: False.
|
345
347
|
|
346
348
|
Returns:
|
347
349
|
networkx.DiGraph: Graph of nodes.
|
348
350
|
'''
|
351
|
+
# escape periods for dot file interpolation
|
352
|
+
if escape_chars:
|
353
|
+
data = data.copy()
|
354
|
+
data.node_name = data.node_name \
|
355
|
+
.fillna('') \
|
356
|
+
.apply(lambda x: re.sub(r'\.', '\\.', x))
|
357
|
+
data.dependencies = data.dependencies \
|
358
|
+
.apply(lambda x: [re.sub(r'\.', '\\.', y) for y in x])
|
359
|
+
|
349
360
|
graph = networkx.DiGraph()
|
350
361
|
data.apply(
|
351
362
|
lambda x: graph.add_node(
|
@@ -406,7 +417,7 @@ class RepoETL():
|
|
406
417
|
color_scheme = rpt.COLOR_SCHEME
|
407
418
|
|
408
419
|
# create dot graph
|
409
|
-
graph = self.
|
420
|
+
graph = self._to_networkx_graph(self._data, escape_chars=True)
|
410
421
|
dot = networkx.drawing.nx_pydot.to_pydot(graph)
|
411
422
|
|
412
423
|
# set layout orientation
|
@@ -1,28 +1,29 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: rolling-pin
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.11.0
|
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
|
7
7
|
Author-email: Alex Braun <alexander.g.braun@gmail.com>
|
8
|
-
Requires-Python: >=3.
|
8
|
+
Requires-Python: >=3.10
|
9
9
|
Classifier: Development Status :: 4 - Beta
|
10
10
|
Classifier: Intended Audience :: Developers
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
14
|
-
Classifier: Programming Language :: Python :: 3.
|
15
|
-
Classifier: Programming Language :: Python :: 3.
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
16
17
|
Classifier: Typing :: Typed
|
17
18
|
Requires-Dist: click>=8.1.3
|
18
19
|
Requires-Dist: graphviz
|
19
20
|
Requires-Dist: ipython
|
20
21
|
Requires-Dist: lunchbox
|
21
22
|
Requires-Dist: networkx
|
22
|
-
Requires-Dist: numpy
|
23
|
+
Requires-Dist: numpy>=1.23.4
|
23
24
|
Requires-Dist: pandas>=1.1.5
|
24
25
|
Requires-Dist: plotly>=5.22.0
|
25
|
-
Requires-Dist: pydot
|
26
|
+
Requires-Dist: pydot>=1.4.2
|
26
27
|
Requires-Dist: pyyaml
|
27
28
|
Requires-Dist: radon<6.0.0
|
28
29
|
Requires-Dist: schematics
|
@@ -53,7 +54,7 @@ Description-Content-Type: text/markdown
|
|
53
54
|
alt="vimeo" width="30px" height="30px"
|
54
55
|
>
|
55
56
|
</a>
|
56
|
-
<a href="
|
57
|
+
<a href="https://alexgbraun.com" rel="nofollow noreferrer">
|
57
58
|
<img src="https://i.ibb.co/fvyMkpM/logo.png"
|
58
59
|
alt="alexgbraun" width="30px" height="30px"
|
59
60
|
>
|
@@ -67,6 +68,8 @@ Description-Content-Type: text/markdown
|
|
67
68
|
[](https://pypi.org/project/rolling-pin/)
|
68
69
|
[](https://pepy.tech/project/rolling-pin)
|
69
70
|
|
71
|
+
<!-- <img id="logo" src="sphinx/images/logo.png" style="max-width: 717px"> -->
|
72
|
+
|
70
73
|
# Introduction
|
71
74
|
Rolling-pin is a library of generic tools for ETL work and visualization of JSON
|
72
75
|
blobs and python repositories
|
@@ -125,7 +128,7 @@ Run `bin/rolling-pin --help` for more help on the command line tool.
|
|
125
128
|
|
126
129
|
### Docker
|
127
130
|
1. Install [docker-desktop](https://docs.docker.com/desktop/)
|
128
|
-
2. `docker pull theNewFlesh/rolling-pin:[version]`
|
131
|
+
2. `docker pull theNewFlesh/rolling-pin:[mode]-[version]`
|
129
132
|
|
130
133
|
|
131
134
|
---
|
@@ -196,67 +199,70 @@ Its usage pattern is: `bin/rolling-pin COMMAND [-a --args]=ARGS [-h --help] [--d
|
|
196
199
|
### Commands
|
197
200
|
The following is a complete list of all available development commands:
|
198
201
|
|
199
|
-
| Command
|
200
|
-
|
|
201
|
-
| build-
|
202
|
-
| build-
|
203
|
-
| build-
|
204
|
-
| build-
|
205
|
-
|
|
206
|
-
|
|
207
|
-
| docker-build
|
208
|
-
| docker-
|
209
|
-
| docker-
|
210
|
-
| docker-
|
211
|
-
| docker-
|
212
|
-
| docker-
|
213
|
-
| docker-
|
214
|
-
| docker-
|
215
|
-
| docker-
|
216
|
-
| docker-
|
217
|
-
| docker-
|
218
|
-
| docker-
|
219
|
-
| docker-
|
220
|
-
| docker-
|
221
|
-
| docker-
|
222
|
-
| docker-
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
| library-
|
232
|
-
| library-
|
233
|
-
| library-
|
234
|
-
| library-
|
235
|
-
| library-
|
236
|
-
| library-
|
237
|
-
| library-
|
238
|
-
| library-
|
239
|
-
| library-
|
240
|
-
| library-
|
241
|
-
| library-
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
| test-
|
251
|
-
| test-
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
| version
|
256
|
-
| version-
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
202
|
+
| Command | Description |
|
203
|
+
| -------------------------- | ------------------------------------------------------------------- |
|
204
|
+
| build-edit-prod-dockerfile | Edit prod.dockefile to use local package |
|
205
|
+
| build-local-package | Generate local pip package in docker/dist |
|
206
|
+
| build-package | Build production version of repo for publishing |
|
207
|
+
| build-prod | Publish pip package of repo to PyPi |
|
208
|
+
| build-publish | Run production tests first then publish pip package of repo to PyPi |
|
209
|
+
| build-test | Build test version of repo for prod testing |
|
210
|
+
| docker-build | Build development image |
|
211
|
+
| docker-build-from-cache | Build development image from registry cache |
|
212
|
+
| docker-build-no-cache | Build development image without cache |
|
213
|
+
| docker-build-prod | Build production image |
|
214
|
+
| docker-build-prod-no-cache | Build production image without cache |
|
215
|
+
| docker-container | Display the Docker container id |
|
216
|
+
| docker-destroy | Shutdown container and destroy its image |
|
217
|
+
| docker-destroy-prod | Shutdown production container and destroy its image |
|
218
|
+
| docker-image | Display the Docker image id |
|
219
|
+
| docker-prod | Start production container |
|
220
|
+
| docker-pull-dev | Pull development image from Docker registry |
|
221
|
+
| docker-pull-prod | Pull production image from Docker registry |
|
222
|
+
| docker-push-dev | Push development image to Docker registry |
|
223
|
+
| docker-push-dev-latest | Push development image to Docker registry with dev-latest tag |
|
224
|
+
| docker-push-prod | Push production image to Docker registry |
|
225
|
+
| docker-push-prod-latest | Push production image to Docker registry with prod-latest tag |
|
226
|
+
| docker-remove | Remove Docker image |
|
227
|
+
| docker-restart | Restart container |
|
228
|
+
| docker-start | Start container |
|
229
|
+
| docker-stop | Stop container |
|
230
|
+
| docs | Generate sphinx documentation |
|
231
|
+
| docs-architecture | Generate architecture.svg diagram from all import statements |
|
232
|
+
| docs-full | Generate documentation, coverage report, diagram and code |
|
233
|
+
| docs-metrics | Generate code metrics report, plots and tables |
|
234
|
+
| library-add | Add a given package to a given dependency group |
|
235
|
+
| library-graph-dev | Graph dependencies in dev environment |
|
236
|
+
| library-graph-prod | Graph dependencies in prod environment |
|
237
|
+
| library-install-dev | Install all dependencies into dev environment |
|
238
|
+
| library-install-prod | Install all dependencies into prod environment |
|
239
|
+
| library-list-dev | List packages in dev environment |
|
240
|
+
| library-list-prod | List packages in prod environment |
|
241
|
+
| library-lock-dev | Resolve dev.lock file |
|
242
|
+
| library-lock-prod | Resolve prod.lock file |
|
243
|
+
| library-remove | Remove a given package from a given dependency group |
|
244
|
+
| library-search | Search for pip packages |
|
245
|
+
| library-sync-dev | Sync dev environment with packages listed in dev.lock |
|
246
|
+
| library-sync-prod | Sync prod environment with packages listed in prod.lock |
|
247
|
+
| library-update | Update dev dependencies |
|
248
|
+
| library-update-pdm | Update PDM |
|
249
|
+
| quickstart | Display quickstart guide |
|
250
|
+
| session-lab | Run jupyter lab server |
|
251
|
+
| session-python | Run python session with dev dependencies |
|
252
|
+
| state | State of repository and Docker container |
|
253
|
+
| test-coverage | Generate test coverage report |
|
254
|
+
| test-dev | Run all tests |
|
255
|
+
| test-fast | Test all code excepts tests marked with SKIP_SLOWS_TESTS decorator |
|
256
|
+
| test-lint | Run linting and type checking |
|
257
|
+
| test-prod | Run tests across all support python versions |
|
258
|
+
| version | Full resolution of repo: dependencies, linting, tests, docs, etc |
|
259
|
+
| version-bump-major | Bump pyproject major version |
|
260
|
+
| version-bump-minor | Bump pyproject minor version |
|
261
|
+
| version-bump-patch | Bump pyproject patch version |
|
262
|
+
| version-commit | Tag with version and commit changes to master |
|
263
|
+
| zsh | Run ZSH session inside Docker container |
|
264
|
+
| zsh-complete | Generate oh-my-zsh completions |
|
265
|
+
| zsh-root | Run ZSH session as root inside Docker container |
|
260
266
|
|
261
267
|
### Flags
|
262
268
|
|
@@ -5,11 +5,11 @@ rolling_pin/conform_config.py,sha256=W-Ps6FPuZ7SOxFOfEjIo2MZac1vCRuVky6samSZPQkw
|
|
5
5
|
rolling_pin/conform_etl.py,sha256=VyHAKVvdOtjx6Fy8dWn6XMfNh9OFgBbidyDUnSl3Zl4,9594
|
6
6
|
rolling_pin/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
rolling_pin/radon_etl.py,sha256=0rxFSnv2z41vKFe35XqCHSnnjT9qNNjouaCcIYkcHgI,18252
|
8
|
-
rolling_pin/repo_etl.py,sha256=
|
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.
|
12
|
-
rolling_pin-0.
|
13
|
-
rolling_pin-0.
|
14
|
-
rolling_pin-0.
|
15
|
-
rolling_pin-0.
|
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,,
|
File without changes
|
File without changes
|
File without changes
|