dash-flows 0.0.2__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.
- dash_flow/AnimatedCircleNode.py +37 -0
- dash_flow/AnimatedNodeEdge.py +55 -0
- dash_flow/DashFlow.py +97 -0
- dash_flow/DevTools.py +51 -0
- dash_flow/ResizableNode.py +43 -0
- dash_flow/__init__.py +87 -0
- dash_flow/_imports_.py +13 -0
- dash_flow/dash_flow.min.js +3 -0
- dash_flow/dash_flow.min.js.map +1 -0
- dash_flow/metadata.json +1 -0
- dash_flow/package-info.json +64 -0
- dash_flows-0.0.2.dist-info/LICENSE +0 -0
- dash_flows-0.0.2.dist-info/METADATA +108 -0
- dash_flows-0.0.2.dist-info/RECORD +16 -0
- dash_flows-0.0.2.dist-info/WHEEL +5 -0
- dash_flows-0.0.2.dist-info/top_level.txt +1 -0
dash_flow/metadata.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"src/lib/components/AnimatedCircleNode.js":{"description":"","displayName":"AnimatedCircleNode","methods":[],"props":{"data":{"type":{"name":"shape","value":{"label":{"name":"any","required":false}}},"required":true,"description":""}}},"src/lib/components/AnimatedNodeEdge.js":{"description":"AnimatedNodeEdge is a custom edge component that animates a node along its path.","displayName":"AnimatedNodeEdge","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID of the edge"},"data":{"type":{"name":"shape","value":{"animatedNode":{"name":"string","description":"ID of the node to animate along this edge","required":false}}},"required":false,"description":"Edge data containing the ID of the node to animate","defaultValue":{"value":"{ animatedNode: '' }","computed":false}},"sourceX":{"type":{"name":"number"},"required":false,"description":"X coordinate of the source node"},"sourceY":{"type":{"name":"number"},"required":false,"description":"Y coordinate of the source node"},"targetX":{"type":{"name":"number"},"required":false,"description":"X coordinate of the target node"},"targetY":{"type":{"name":"number"},"required":false,"description":"Y coordinate of the target node"},"sourcePosition":{"type":{"name":"string"},"required":false,"description":"Position of the source handle"},"targetPosition":{"type":{"name":"string"},"required":false,"description":"Position of the target handle"}}},"src/lib/components/DashFlow.react.js":{"description":"","displayName":"DashFlow","methods":[],"props":{"id":{"type":{"name":"string"},"required":false,"description":"The ID used to identify this component in Dash callbacks."},"nodesDraggable":{"type":{"name":"bool"},"required":false,"description":"Enable/disable node dragging behavior","defaultValue":{"value":"true","computed":false}},"nodesConnectable":{"type":{"name":"bool"},"required":false,"description":"Enable/disable the ability to make new connections between nodes","defaultValue":{"value":"true","computed":false}},"elementsSelectable":{"type":{"name":"bool"},"required":false,"description":"Enable/disable the ability to select elements","defaultValue":{"value":"true","computed":false}},"showMiniMap":{"type":{"name":"bool"},"required":false,"description":"Show/hide the minimap navigation component","defaultValue":{"value":"true","computed":false}},"showControls":{"type":{"name":"bool"},"required":false,"description":"Show/hide the control panel","defaultValue":{"value":"true","computed":false}},"showBackground":{"type":{"name":"bool"},"required":false,"description":"Show/hide the background pattern","defaultValue":{"value":"true","computed":false}},"nodes":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":true},"type":{"name":"string","required":false},"data":{"name":"object","required":true},"position":{"name":"shape","value":{"x":{"name":"number","required":true},"y":{"name":"number","required":true}},"required":true},"style":{"name":"object","required":false}}}},"required":false,"description":"Array of nodes to display in the flow","defaultValue":{"value":"[]","computed":false}},"edges":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":true},"source":{"name":"string","required":true},"target":{"name":"string","required":true},"type":{"name":"string","required":false},"data":{"name":"object","required":false},"style":{"name":"object","required":false}}}},"required":false,"description":"Array of edges defining connections between nodes","defaultValue":{"value":"[]","computed":false}},"style":{"type":{"name":"object"},"required":false,"description":"Custom CSS styles for the container div","defaultValue":{"value":"{}","computed":false}},"className":{"type":{"name":"string"},"required":false,"description":"CSS class name for the container div","defaultValue":{"value":"''","computed":false}},"showDevTools":{"type":{"name":"bool"},"required":false,"description":"Show/hide the developer tools panel","defaultValue":{"value":"false","computed":false}},"layoutOptions":{"type":{"name":"string"},"required":false,"description":"Layout options for arranging nodes using the ELK layout engine","defaultValue":{"value":"null","computed":false}},"setProps":{"type":{"name":"func"},"required":false,"description":"Dash-assigned callback that should be called to report property changes"}}},"src/lib/components/DevTools.js":{"description":"DevTools component for displaying debug information about the flow","displayName":"DevTools","methods":[],"props":{"viewport":{"type":{"name":"shape","value":{"x":{"name":"number","required":true},"y":{"name":"number","required":true},"zoom":{"name":"number","required":true}}},"required":true,"description":"Current viewport information including position and zoom level"},"nodes":{"type":{"name":"arrayOf","value":{"name":"shape","value":{"id":{"name":"string","required":true},"type":{"name":"string","required":false}}}},"required":true,"description":"Array of nodes to display information about"}}},"src/lib/components/ResizableNode.js":{"description":"ResizableNode is a custom node component that supports resizing and Dash components.","displayName":"ResizableNode","methods":[],"props":{"data":{"type":{"name":"shape","value":{"label":{"name":"any","description":"The content to display in the node. Can be a string or Dash component.","required":false}}},"required":true,"description":"The node data containing the content to display"},"selected":{"type":{"name":"bool"},"required":false,"description":"Whether the node is currently selected","defaultValue":{"value":"false","computed":false}}}}}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dash_flow",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "A Dash component library for creating interactive node-based interfaces with React Flow",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git://github.com/pip-install-python/dash-flow.git"
|
|
8
|
+
},
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/pip-install-python/dash-flow/issues"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/pip-install-python/dash-flow",
|
|
13
|
+
"main": "build/index.js",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"start": "webpack serve --config ./webpack.serve.config.js --open",
|
|
16
|
+
"validate-init": "python _validate_init.py",
|
|
17
|
+
"prepublishOnly": "npm run validate-init",
|
|
18
|
+
"build:js": "webpack --mode production",
|
|
19
|
+
"build:backends": "dash-generate-components ./src/lib/components dash_flow -p package-info.json --r-prefix 'df' --jl-prefix 'df' --ignore \\.test\\.",
|
|
20
|
+
"build:backends-activated": "(. venv/bin/activate || venv\\scripts\\activate && npm run build:backends)",
|
|
21
|
+
"build": "npm run build:js && npm run build:backends",
|
|
22
|
+
"build:activated": "npm run build:js && npm run build:backends-activated"
|
|
23
|
+
},
|
|
24
|
+
"author": "Pip Install Python <pipinstallpython@gmail.com>",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@xyflow/react": "^12.3.5",
|
|
28
|
+
"elkjs": "^0.8.2",
|
|
29
|
+
"ramda": "^0.26.1",
|
|
30
|
+
"zustand": "^4.4.7"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@babel/core": "^7.22.1",
|
|
34
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
35
|
+
"@babel/preset-env": "^7.22.2",
|
|
36
|
+
"@babel/preset-react": "^7.22.3",
|
|
37
|
+
"@plotly/dash-component-plugins": "^1.2.3",
|
|
38
|
+
"@plotly/webpack-dash-dynamic-import": "^1.2.0",
|
|
39
|
+
"ajv": "^8.12.0",
|
|
40
|
+
"ajv-keywords": "^5.1.0",
|
|
41
|
+
"babel-eslint": "^10.1.0",
|
|
42
|
+
"babel-loader": "^9.1.2",
|
|
43
|
+
"copyfiles": "^2.1.1",
|
|
44
|
+
"css-loader": "^6.8.1",
|
|
45
|
+
"eslint": "^9.15.0",
|
|
46
|
+
"eslint-config-prettier": "^6.0.0",
|
|
47
|
+
"eslint-plugin-import": "^2.18.0",
|
|
48
|
+
"eslint-plugin-react": "^7.14.2",
|
|
49
|
+
"prop-types": "^15.8.1",
|
|
50
|
+
"react": "^18.2.0",
|
|
51
|
+
"react-docgen": "^5.4.3",
|
|
52
|
+
"react-dom": "^18.2.0",
|
|
53
|
+
"schema-utils": "^4.2.0",
|
|
54
|
+
"style-loader": "^3.3.3",
|
|
55
|
+
"styled-jsx": "^5.1.6",
|
|
56
|
+
"webpack": "^5.84.1",
|
|
57
|
+
"webpack-cli": "^5.1.1",
|
|
58
|
+
"webpack-dev-server": "^4.15.0"
|
|
59
|
+
},
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=8.11.0",
|
|
62
|
+
"npm": ">=6.1.0"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: dash-flows
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: A Dash component library for creating interactive node-based interfaces with React Flow
|
|
5
|
+
Author: Pip Install Python <pipinstallpython@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Framework :: Dash
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
|
|
11
|
+
# Dash Flow
|
|
12
|
+
|
|
13
|
+
Dash Flow is a Dash component library.
|
|
14
|
+
|
|
15
|
+
A Dash component library for creating interactive node-based interfaces with React Flow
|
|
16
|
+
|
|
17
|
+
Get started with:
|
|
18
|
+
1. Install Dash and its dependencies: https://dash.plotly.com/installation
|
|
19
|
+
2. Run `python usage.py`
|
|
20
|
+
3. Visit http://localhost:8050 in your web browser
|
|
21
|
+
|
|
22
|
+
## Contributing
|
|
23
|
+
|
|
24
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md)
|
|
25
|
+
|
|
26
|
+
### Install dependencies
|
|
27
|
+
|
|
28
|
+
If you have selected install_dependencies during the prompt, you can skip this part.
|
|
29
|
+
|
|
30
|
+
1. Install npm packages
|
|
31
|
+
```
|
|
32
|
+
$ npm install
|
|
33
|
+
```
|
|
34
|
+
2. Create a virtual env and activate.
|
|
35
|
+
```
|
|
36
|
+
$ virtualenv venv
|
|
37
|
+
$ . venv/bin/activate
|
|
38
|
+
```
|
|
39
|
+
_Note: venv\Scripts\activate for windows_
|
|
40
|
+
|
|
41
|
+
3. Install python packages required to build components.
|
|
42
|
+
```
|
|
43
|
+
$ pip install -r requirements.txt
|
|
44
|
+
```
|
|
45
|
+
4. Install the python packages for testing (optional)
|
|
46
|
+
```
|
|
47
|
+
$ pip install -r tests/requirements.txt
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Write your component code in `src/lib/components/DashFlow.react.js`.
|
|
51
|
+
|
|
52
|
+
- The demo app is in `src/demo` and you will import your example component code into your demo app.
|
|
53
|
+
- Test your code in a Python environment:
|
|
54
|
+
1. Build your code
|
|
55
|
+
```
|
|
56
|
+
$ npm run build
|
|
57
|
+
```
|
|
58
|
+
2. Run and modify the `usage.py` sample dash app:
|
|
59
|
+
```
|
|
60
|
+
$ python usage.py
|
|
61
|
+
```
|
|
62
|
+
- Write tests for your component.
|
|
63
|
+
- A sample test is available in `tests/test_usage.py`, it will load `usage.py` and you can then automate interactions with selenium.
|
|
64
|
+
- Run the tests with `$ pytest tests`.
|
|
65
|
+
- The Dash team uses these types of integration tests extensively. Browse the Dash component code on GitHub for more examples of testing (e.g. https://github.com/plotly/dash-core-components)
|
|
66
|
+
- Add custom styles to your component by putting your custom CSS files into your distribution folder (`dash_flow`).
|
|
67
|
+
- Make sure that they are referenced in `MANIFEST.in` so that they get properly included when you're ready to publish your component.
|
|
68
|
+
- Make sure the stylesheets are added to the `_css_dist` dict in `dash_flow/__init__.py` so dash will serve them automatically when the component suite is requested.
|
|
69
|
+
- [Review your code](./review_checklist.md)
|
|
70
|
+
|
|
71
|
+
### Create a production build and publish:
|
|
72
|
+
|
|
73
|
+
1. Build your code:
|
|
74
|
+
```
|
|
75
|
+
$ npm run build
|
|
76
|
+
```
|
|
77
|
+
2. Create a Python distribution
|
|
78
|
+
```
|
|
79
|
+
$ python setup.py sdist bdist_wheel
|
|
80
|
+
```
|
|
81
|
+
This will create source and wheel distribution in the generated the `dist/` folder.
|
|
82
|
+
See [PyPA](https://packaging.python.org/guides/distributing-packages-using-setuptools/#packaging-your-project)
|
|
83
|
+
for more information.
|
|
84
|
+
|
|
85
|
+
3. Test your tarball by copying it into a new environment and installing it locally:
|
|
86
|
+
```
|
|
87
|
+
$ pip install dash_flow-0.0.1.tar.gz
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
4. If it works, then you can publish the component to NPM and PyPI:
|
|
91
|
+
1. Publish on PyPI
|
|
92
|
+
```
|
|
93
|
+
$ twine upload dist/*
|
|
94
|
+
```
|
|
95
|
+
2. Cleanup the dist folder (optional)
|
|
96
|
+
```
|
|
97
|
+
$ rm -rf dist
|
|
98
|
+
```
|
|
99
|
+
3. Publish on NPM (Optional if chosen False in `publish_on_npm`)
|
|
100
|
+
```
|
|
101
|
+
$ npm publish
|
|
102
|
+
```
|
|
103
|
+
_Publishing your component to NPM will make the JavaScript bundles available on the unpkg CDN. By default, Dash serves the component library's CSS and JS locally, but if you choose to publish the package to NPM you can set `serve_locally` to `False` and you may see faster load times._
|
|
104
|
+
|
|
105
|
+
5. Share your component with the community! https://community.plotly.com/c/dash
|
|
106
|
+
1. Publish this repository to GitHub
|
|
107
|
+
2. Tag your GitHub repository with the plotly-dash tag so that it appears here: https://github.com/topics/plotly-dash
|
|
108
|
+
3. Create a post in the Dash community forum: https://community.plotly.com/c/dash
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
dash_flow/AnimatedCircleNode.py,sha256=O8Hl1uUV5-K6BzaHg3oQFpYnKe-2c_uWc7hQ6IcQUdA,1165
|
|
2
|
+
dash_flow/AnimatedNodeEdge.py,sha256=SrUF0t1Lmsi62yOHkG1N0RLZzuZrJGiksfftvYUYn90,2030
|
|
3
|
+
dash_flow/DashFlow.py,sha256=063eaYxNOzfNA9ON0tYv6SLsZjpfeafMCWNXYXc3nic,3260
|
|
4
|
+
dash_flow/DevTools.py,sha256=iscbiD5iwzv99ip8UXK4srEMGx1x10oU1uZVqDhQsx8,1546
|
|
5
|
+
dash_flow/ResizableNode.py,sha256=RVKy0zySPWOXbtPlChl2reyjrQjy3mtAIZZN67N59gc,1506
|
|
6
|
+
dash_flow/__init__.py,sha256=3hvdeNp3gfS-dzPl4SaFCCmHuN5gagM4Qxf4TIZs0fw,2247
|
|
7
|
+
dash_flow/_imports_.py,sha256=yXl69IdJzBaZDBMW1AGIiLwjVhF0c9Fl6fSRn7ypDmc,317
|
|
8
|
+
dash_flow/dash_flow.min.js,sha256=QdlNc0dKG5qFldFIMtbApLviHsgSy0VHtL_lDDQNYfo,1619852
|
|
9
|
+
dash_flow/dash_flow.min.js.map,sha256=PP50jYrz2p-B-uVbtcVOhRjHhumkGHPZ154JS92iKLk,4906485
|
|
10
|
+
dash_flow/metadata.json,sha256=5CI-J4TZeBv84UsNRbr9_7E2gsMHm5CEPWn3Jpye8sc,5657
|
|
11
|
+
dash_flow/package-info.json,sha256=gTRmAs0oAUZ6oTg894oqZM7kvE2eSdqfG236XIj-ORQ,2242
|
|
12
|
+
dash_flows-0.0.2.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
dash_flows-0.0.2.dist-info/METADATA,sha256=hbisvYQYqODfYn07EiKZtAawDuGOQPlSrWXAx0CPLTw,4031
|
|
14
|
+
dash_flows-0.0.2.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
15
|
+
dash_flows-0.0.2.dist-info/top_level.txt,sha256=-9bIhbHd8_bgXvvKxyd0a4qUK8lArOX8fAgXOV5Jh5E,11
|
|
16
|
+
dash_flows-0.0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dash_flows
|