diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-dash-cytoscape.spec | 646 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 648 insertions, 0 deletions
@@ -0,0 +1 @@ +/dash_cytoscape-0.3.0.tar.gz diff --git a/python-dash-cytoscape.spec b/python-dash-cytoscape.spec new file mode 100644 index 0000000..cba8c9a --- /dev/null +++ b/python-dash-cytoscape.spec @@ -0,0 +1,646 @@ +%global _empty_manifest_terminate_build 0 +Name: python-dash-cytoscape +Version: 0.3.0 +Release: 1 +Summary: A Component Library for Dash aimed at facilitating network visualization in Python, wrapped around Cytoscape.js +License: MIT +URL: https://dash.plotly.com/cytoscape +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/47/45/dd3752058d5a7f853c17d7b292db1311be884e32e4d90bbbebf3b4944e05/dash_cytoscape-0.3.0.tar.gz +BuildArch: noarch + +Requires: python3-dash + +%description +# Dash Cytoscape [](https://github.com/plotly/dash-cytoscape/blob/master/LICENSE) [](https://pypi.org/project/dash-cytoscape/) +[](https://circleci.com/gh/plotly/dash-cytoscape) + +A Dash component library for creating interactive and customizable networks in Python, wrapped around [Cytoscape.js](http://js.cytoscape.org/). + + + +* 🌟 [Medium Article](https://medium.com/@plotlygraphs/introducing-dash-cytoscape-ce96cac824e4) +* 📣 [Community Announcement](https://community.plotly.com/t/announcing-dash-cytoscape/19095) +* 💻 [Github Repository](https://github.com/plotly/dash-cytoscape) +* 📚 [User Guide](https://dash.plotly.com/cytoscape) +* 🗺 [Component Reference](https://dash.plotly.com/cytoscape/reference) +* 📺 [Webinar Recording](https://www.youtube.com/watch?v=snXcIsCMQgk) + +## Getting Started in Python + +### Prerequisites + +Make sure that dash and its dependent libraries are correctly installed: +```commandline +pip install dash +``` + +If you want to install the latest versions, check out the [Dash docs on installation](https://dash.plotly.com/installation). + +### Usage + +Install the library using `pip`: + +``` +pip install dash-cytoscape +``` + +Create the following example inside an `app.py` file: + +```python +import dash +import dash_cytoscape as cyto +import dash_html_components as html + +app = dash.Dash(__name__) +app.layout = html.Div([ + cyto.Cytoscape( + id='cytoscape', + elements=[ + {'data': {'id': 'one', 'label': 'Node 1'}, 'position': {'x': 50, 'y': 50}}, + {'data': {'id': 'two', 'label': 'Node 2'}, 'position': {'x': 200, 'y': 200}}, + {'data': {'source': 'one', 'target': 'two','label': 'Node 1 to 2'}} + ], + layout={'name': 'preset'} + ) +]) + +if __name__ == '__main__': + app.run_server(debug=True) +``` + + + +### External layouts + +You can also add external layouts. Use the `cyto.load_extra_layouts()` function to get started: + +```python +import dash +import dash_cytoscape as cyto +import dash_html_components as html + +cyto.load_extra_layouts() + +app = dash.Dash(__name__) +app.layout = html.Div([ + cyto.Cytoscape(...) +]) +``` + +Calling `cyto.load_extra_layouts()` also enables generating SVG images. + + +## Getting Started in R + +### Prerequisites + +```R +install.packages(c("devtools", "dash")) +``` +### Usage + +Install the library using devtools: + +``` +devtools::install_github("plotly/dash-cytoscape") +``` + +Create the following example inside an `app.R` file: + +```R +library(dash) +library(dashHtmlComponents) +library(dashCytoscape) + +app <- Dash$new() + +app$layout( + htmlDiv( + list( + cytoCytoscape( + id = 'cytoscape-two-nodes', + layout = list('name' = 'preset'), + style = list('width' = '100%', 'height' = '400px'), + elements = list( + list('data' = list('id' = 'one', 'label' = 'Node 1'), 'position' = list('x' = 75, 'y' = 75)), + list('data' = list('id' = 'two', 'label' = 'Node 2'), 'position' = list('x' = 200, 'y' = 200)), + list('data' = list('source' = 'one', 'target' = 'two')) + ) + ) + ) + ) +) + +app$run_server() +``` + +## Documentation + +The [Dash Cytoscape User Guide](https://dash.plotly.com/cytoscape/) contains everything you need to know about the library. It contains useful examples, functioning code, and is fully interactive. You can also use the [component reference](https://dash.plotly.com/cytoscape/reference/) for a complete and concise specification of the API. + +To learn more about the core Dash components and how to use callbacks, view the [Dash documentation](https://dash.plotly.com/). + +For supplementary information about the underlying Javascript API, view the [Cytoscape.js documentation](http://js.cytoscape.org/). + +## Contributing + +Make sure that you have read and understood our [code of conduct](CODE_OF_CONDUCT.md), then head over to [CONTRIBUTING](CONTRIBUTING.md) to get started. + +### Testing + +Instructions on how to run [tests](CONTRIBUTING.md#tests) are given in [CONTRIBUTING.md](CONTRIBUTING.md). + +## License + +Dash, Cytoscape.js and Dash Cytoscape are licensed under MIT. Please view [LICENSE](LICENSE) for more details. + +## Contact and Support + +See https://plotly.com/dash/support for ways to get in touch. + +## Acknowledgments + +Huge thanks to the Cytoscape Consortium and the Cytoscape.js team for their contribution in making such a complete API for creating interactive networks. This library would not have been possible without their massive work! + +The Pull Request and Issue Templates were inspired from the +[scikit-learn project](https://github.com/scikit-learn/scikit-learn). + +## Gallery + +### Dynamically expand elements +[Code](usage-elements.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-elements) + + +### Interactively update stylesheet +[Code](usage-stylesheet.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-stylesheet) + + +### Automatically generate interactive phylogeny trees +[Code](demos/usage-phylogeny.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-phylogeny/) + + +### Create your own stylesheet +[Code](usage-advanced.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-advanced) + + +### Use event callbacks +[Code](usage-events.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-events) + + +### Use external layouts +[Code](demos/usage-elements-extra.py) + + +### Use export graph as image +[Code](demos/usage-image-export.py) + + +### Make graph responsive +[Code](demos/usage-responsive-graph.py) + + +For an extended gallery, visit the [demos' readme](demos/README.md). + + + + +%package -n python3-dash-cytoscape +Summary: A Component Library for Dash aimed at facilitating network visualization in Python, wrapped around Cytoscape.js +Provides: python-dash-cytoscape +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-dash-cytoscape +# Dash Cytoscape [](https://github.com/plotly/dash-cytoscape/blob/master/LICENSE) [](https://pypi.org/project/dash-cytoscape/) +[](https://circleci.com/gh/plotly/dash-cytoscape) + +A Dash component library for creating interactive and customizable networks in Python, wrapped around [Cytoscape.js](http://js.cytoscape.org/). + + + +* 🌟 [Medium Article](https://medium.com/@plotlygraphs/introducing-dash-cytoscape-ce96cac824e4) +* 📣 [Community Announcement](https://community.plotly.com/t/announcing-dash-cytoscape/19095) +* 💻 [Github Repository](https://github.com/plotly/dash-cytoscape) +* 📚 [User Guide](https://dash.plotly.com/cytoscape) +* 🗺 [Component Reference](https://dash.plotly.com/cytoscape/reference) +* 📺 [Webinar Recording](https://www.youtube.com/watch?v=snXcIsCMQgk) + +## Getting Started in Python + +### Prerequisites + +Make sure that dash and its dependent libraries are correctly installed: +```commandline +pip install dash +``` + +If you want to install the latest versions, check out the [Dash docs on installation](https://dash.plotly.com/installation). + +### Usage + +Install the library using `pip`: + +``` +pip install dash-cytoscape +``` + +Create the following example inside an `app.py` file: + +```python +import dash +import dash_cytoscape as cyto +import dash_html_components as html + +app = dash.Dash(__name__) +app.layout = html.Div([ + cyto.Cytoscape( + id='cytoscape', + elements=[ + {'data': {'id': 'one', 'label': 'Node 1'}, 'position': {'x': 50, 'y': 50}}, + {'data': {'id': 'two', 'label': 'Node 2'}, 'position': {'x': 200, 'y': 200}}, + {'data': {'source': 'one', 'target': 'two','label': 'Node 1 to 2'}} + ], + layout={'name': 'preset'} + ) +]) + +if __name__ == '__main__': + app.run_server(debug=True) +``` + + + +### External layouts + +You can also add external layouts. Use the `cyto.load_extra_layouts()` function to get started: + +```python +import dash +import dash_cytoscape as cyto +import dash_html_components as html + +cyto.load_extra_layouts() + +app = dash.Dash(__name__) +app.layout = html.Div([ + cyto.Cytoscape(...) +]) +``` + +Calling `cyto.load_extra_layouts()` also enables generating SVG images. + + +## Getting Started in R + +### Prerequisites + +```R +install.packages(c("devtools", "dash")) +``` +### Usage + +Install the library using devtools: + +``` +devtools::install_github("plotly/dash-cytoscape") +``` + +Create the following example inside an `app.R` file: + +```R +library(dash) +library(dashHtmlComponents) +library(dashCytoscape) + +app <- Dash$new() + +app$layout( + htmlDiv( + list( + cytoCytoscape( + id = 'cytoscape-two-nodes', + layout = list('name' = 'preset'), + style = list('width' = '100%', 'height' = '400px'), + elements = list( + list('data' = list('id' = 'one', 'label' = 'Node 1'), 'position' = list('x' = 75, 'y' = 75)), + list('data' = list('id' = 'two', 'label' = 'Node 2'), 'position' = list('x' = 200, 'y' = 200)), + list('data' = list('source' = 'one', 'target' = 'two')) + ) + ) + ) + ) +) + +app$run_server() +``` + +## Documentation + +The [Dash Cytoscape User Guide](https://dash.plotly.com/cytoscape/) contains everything you need to know about the library. It contains useful examples, functioning code, and is fully interactive. You can also use the [component reference](https://dash.plotly.com/cytoscape/reference/) for a complete and concise specification of the API. + +To learn more about the core Dash components and how to use callbacks, view the [Dash documentation](https://dash.plotly.com/). + +For supplementary information about the underlying Javascript API, view the [Cytoscape.js documentation](http://js.cytoscape.org/). + +## Contributing + +Make sure that you have read and understood our [code of conduct](CODE_OF_CONDUCT.md), then head over to [CONTRIBUTING](CONTRIBUTING.md) to get started. + +### Testing + +Instructions on how to run [tests](CONTRIBUTING.md#tests) are given in [CONTRIBUTING.md](CONTRIBUTING.md). + +## License + +Dash, Cytoscape.js and Dash Cytoscape are licensed under MIT. Please view [LICENSE](LICENSE) for more details. + +## Contact and Support + +See https://plotly.com/dash/support for ways to get in touch. + +## Acknowledgments + +Huge thanks to the Cytoscape Consortium and the Cytoscape.js team for their contribution in making such a complete API for creating interactive networks. This library would not have been possible without their massive work! + +The Pull Request and Issue Templates were inspired from the +[scikit-learn project](https://github.com/scikit-learn/scikit-learn). + +## Gallery + +### Dynamically expand elements +[Code](usage-elements.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-elements) + + +### Interactively update stylesheet +[Code](usage-stylesheet.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-stylesheet) + + +### Automatically generate interactive phylogeny trees +[Code](demos/usage-phylogeny.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-phylogeny/) + + +### Create your own stylesheet +[Code](usage-advanced.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-advanced) + + +### Use event callbacks +[Code](usage-events.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-events) + + +### Use external layouts +[Code](demos/usage-elements-extra.py) + + +### Use export graph as image +[Code](demos/usage-image-export.py) + + +### Make graph responsive +[Code](demos/usage-responsive-graph.py) + + +For an extended gallery, visit the [demos' readme](demos/README.md). + + + + +%package help +Summary: Development documents and examples for dash-cytoscape +Provides: python3-dash-cytoscape-doc +%description help +# Dash Cytoscape [](https://github.com/plotly/dash-cytoscape/blob/master/LICENSE) [](https://pypi.org/project/dash-cytoscape/) +[](https://circleci.com/gh/plotly/dash-cytoscape) + +A Dash component library for creating interactive and customizable networks in Python, wrapped around [Cytoscape.js](http://js.cytoscape.org/). + + + +* 🌟 [Medium Article](https://medium.com/@plotlygraphs/introducing-dash-cytoscape-ce96cac824e4) +* 📣 [Community Announcement](https://community.plotly.com/t/announcing-dash-cytoscape/19095) +* 💻 [Github Repository](https://github.com/plotly/dash-cytoscape) +* 📚 [User Guide](https://dash.plotly.com/cytoscape) +* 🗺 [Component Reference](https://dash.plotly.com/cytoscape/reference) +* 📺 [Webinar Recording](https://www.youtube.com/watch?v=snXcIsCMQgk) + +## Getting Started in Python + +### Prerequisites + +Make sure that dash and its dependent libraries are correctly installed: +```commandline +pip install dash +``` + +If you want to install the latest versions, check out the [Dash docs on installation](https://dash.plotly.com/installation). + +### Usage + +Install the library using `pip`: + +``` +pip install dash-cytoscape +``` + +Create the following example inside an `app.py` file: + +```python +import dash +import dash_cytoscape as cyto +import dash_html_components as html + +app = dash.Dash(__name__) +app.layout = html.Div([ + cyto.Cytoscape( + id='cytoscape', + elements=[ + {'data': {'id': 'one', 'label': 'Node 1'}, 'position': {'x': 50, 'y': 50}}, + {'data': {'id': 'two', 'label': 'Node 2'}, 'position': {'x': 200, 'y': 200}}, + {'data': {'source': 'one', 'target': 'two','label': 'Node 1 to 2'}} + ], + layout={'name': 'preset'} + ) +]) + +if __name__ == '__main__': + app.run_server(debug=True) +``` + + + +### External layouts + +You can also add external layouts. Use the `cyto.load_extra_layouts()` function to get started: + +```python +import dash +import dash_cytoscape as cyto +import dash_html_components as html + +cyto.load_extra_layouts() + +app = dash.Dash(__name__) +app.layout = html.Div([ + cyto.Cytoscape(...) +]) +``` + +Calling `cyto.load_extra_layouts()` also enables generating SVG images. + + +## Getting Started in R + +### Prerequisites + +```R +install.packages(c("devtools", "dash")) +``` +### Usage + +Install the library using devtools: + +``` +devtools::install_github("plotly/dash-cytoscape") +``` + +Create the following example inside an `app.R` file: + +```R +library(dash) +library(dashHtmlComponents) +library(dashCytoscape) + +app <- Dash$new() + +app$layout( + htmlDiv( + list( + cytoCytoscape( + id = 'cytoscape-two-nodes', + layout = list('name' = 'preset'), + style = list('width' = '100%', 'height' = '400px'), + elements = list( + list('data' = list('id' = 'one', 'label' = 'Node 1'), 'position' = list('x' = 75, 'y' = 75)), + list('data' = list('id' = 'two', 'label' = 'Node 2'), 'position' = list('x' = 200, 'y' = 200)), + list('data' = list('source' = 'one', 'target' = 'two')) + ) + ) + ) + ) +) + +app$run_server() +``` + +## Documentation + +The [Dash Cytoscape User Guide](https://dash.plotly.com/cytoscape/) contains everything you need to know about the library. It contains useful examples, functioning code, and is fully interactive. You can also use the [component reference](https://dash.plotly.com/cytoscape/reference/) for a complete and concise specification of the API. + +To learn more about the core Dash components and how to use callbacks, view the [Dash documentation](https://dash.plotly.com/). + +For supplementary information about the underlying Javascript API, view the [Cytoscape.js documentation](http://js.cytoscape.org/). + +## Contributing + +Make sure that you have read and understood our [code of conduct](CODE_OF_CONDUCT.md), then head over to [CONTRIBUTING](CONTRIBUTING.md) to get started. + +### Testing + +Instructions on how to run [tests](CONTRIBUTING.md#tests) are given in [CONTRIBUTING.md](CONTRIBUTING.md). + +## License + +Dash, Cytoscape.js and Dash Cytoscape are licensed under MIT. Please view [LICENSE](LICENSE) for more details. + +## Contact and Support + +See https://plotly.com/dash/support for ways to get in touch. + +## Acknowledgments + +Huge thanks to the Cytoscape Consortium and the Cytoscape.js team for their contribution in making such a complete API for creating interactive networks. This library would not have been possible without their massive work! + +The Pull Request and Issue Templates were inspired from the +[scikit-learn project](https://github.com/scikit-learn/scikit-learn). + +## Gallery + +### Dynamically expand elements +[Code](usage-elements.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-elements) + + +### Interactively update stylesheet +[Code](usage-stylesheet.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-stylesheet) + + +### Automatically generate interactive phylogeny trees +[Code](demos/usage-phylogeny.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-phylogeny/) + + +### Create your own stylesheet +[Code](usage-advanced.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-advanced) + + +### Use event callbacks +[Code](usage-events.py) | [Demo](https://dash-gallery.plotly.host/cytoscape-events) + + +### Use external layouts +[Code](demos/usage-elements-extra.py) + + +### Use export graph as image +[Code](demos/usage-image-export.py) + + +### Make graph responsive +[Code](demos/usage-responsive-graph.py) + + +For an extended gallery, visit the [demos' readme](demos/README.md). + + + + +%prep +%autosetup -n dash-cytoscape-0.3.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-dash-cytoscape -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.0-1 +- Package Spec generated @@ -0,0 +1 @@ +401b957a956c78e4b23f92023f3e928a dash_cytoscape-0.3.0.tar.gz |