From e152ddaf432933d192816f0dcac75c76942516ce Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 17 May 2023 03:16:11 +0000 Subject: automatic import of python-pynetworkd3 --- .gitignore | 1 + python-pynetworkd3.spec | 586 ++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 588 insertions(+) create mode 100644 python-pynetworkd3.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..7056e23 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/PyNetworkD3-0.0.9.tar.gz diff --git a/python-pynetworkd3.spec b/python-pynetworkd3.spec new file mode 100644 index 0000000..69e53ee --- /dev/null +++ b/python-pynetworkd3.spec @@ -0,0 +1,586 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pynetworkd3 +Version: 0.0.9 +Release: 1 +Summary: Create D3 visualization networks with Python +License: MIT +URL: https://github.com/Hernan4444/PyNetworkD3 +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/2d/16/be104e432409b738b225d264881683b93f3dfaacf951387a7ab526a46043/PyNetworkD3-0.0.9.tar.gz +BuildArch: noarch + +Requires: python3-pyserial + +%description +

PyNetworkD3

+ +

+ + Create D3 visualization networks with Python + +

+ +

+ + + + PyPI - Version + + + + Tests + + + + Linters + + + +

+ +## Installation + +Install using `pip`! + +```sh +$ pip install pynetworkd3 +``` + +## Input JSON syntax + +``` +{ + "nodes": [ + { + "id": "id1", + "attribute 1": "value attribute 1", + "attribute 2": "value attribute 2", + (...) + "attribute N": "value attribute N", + }, + { + "id": "id2", + "attribute 1": "value attribute 1", + "attribute 2": "value attribute 2", + (...) + "attribute N": "value attribute N", + }, + (...) + ], + "links": [ + { + "source": "id1", + "target": "id2", + "attribute 1": "value attribute 1", + "attribute 2": "value attribute 2", + (...) + "attribute N": "value attribute N", + }, + (...) + ] +} +``` + +- Every dictionary in "nodes" must have the _id_ key. The other keys are optionals. + +- Every dictionary in "links" must have the _source_ and _target_ key. The other keys are optionals. Also, each id in source and target must redirect to an existing node in "nodes". + + +## Usage + +To use the library, import the `Graph` object directly and use the `export` method +to create a `.html` with the visualization. + + +```python +from PyNetworkD3 import Graph + +dataset = { + "nodes": [{"id": 1},{"id": 2},{"id": 3},{"id": 4},{"id": 5}], + "links": [ + {"source": 1, "target": 3}, + {"source": 2, "target": 3}, + {"source": 1, "target": 3}, + {"source": 5, "target": 3}, + {"source": 4, "target": 1}, + ] +} + +graph = Graph(dataset, width=300, height=200, radio=10, tooltip=["id"]) + +graph.export("output.html) +``` + +Also you can write the instance in the last line of the notebook's cell (ckeck the example in colab) to view the visualization. + + +## Developing + +This library uses `PyTest` as the test suite runner, and `PyLint`, `Flake8`, `Black`, `ISort` and `MyPy` as linters. It also uses `Poetry` as the default package manager. + +The library includes a `Makefile` that has every command you need to start developing. If you don't have it, install `Poetry` using: + +```sh +make get-poetry +``` + +Then, create a virtualenv to use throughout the development process, using: + +```sh +make build-env +``` + +Activate the virtualenv using: + +```sh +. .venv/bin/activate +``` + +Deactivate it using: + +```sh +deactivate +``` + +To add a new package, use `Poetry`: + +```sh +poetry add +``` + +To run the linters, you can use: + +```sh +# The following commands auto-fix the code +make black! +make isort! + +# The following commands just review the code +make black +make isort +make flake8 +make mypy +make pylint +``` + +To run the tests, you can use: + +```sh +make tests +``` + +## Releasing + +To make a new release of the library, `git switch` to the `master` branch and execute: + +```sh +make bump! minor +``` + +The word `minor` can be replaced with `patch` or `major`, depending on the type of release. The `bump!` command will bump the versions of the library, create a new branch, add and commit the changes. Then, just _merge_ that branch to `master`. Finally, execute a _merge_ to the `stable` branch. Make sure to update the version before merging into `stable`, as `PyPi` will reject packages with duplicated versions. + + + +%package -n python3-pynetworkd3 +Summary: Create D3 visualization networks with Python +Provides: python-pynetworkd3 +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pynetworkd3 +

PyNetworkD3

+ +

+ + Create D3 visualization networks with Python + +

+ +

+ + + + PyPI - Version + + + + Tests + + + + Linters + + + +

+ +## Installation + +Install using `pip`! + +```sh +$ pip install pynetworkd3 +``` + +## Input JSON syntax + +``` +{ + "nodes": [ + { + "id": "id1", + "attribute 1": "value attribute 1", + "attribute 2": "value attribute 2", + (...) + "attribute N": "value attribute N", + }, + { + "id": "id2", + "attribute 1": "value attribute 1", + "attribute 2": "value attribute 2", + (...) + "attribute N": "value attribute N", + }, + (...) + ], + "links": [ + { + "source": "id1", + "target": "id2", + "attribute 1": "value attribute 1", + "attribute 2": "value attribute 2", + (...) + "attribute N": "value attribute N", + }, + (...) + ] +} +``` + +- Every dictionary in "nodes" must have the _id_ key. The other keys are optionals. + +- Every dictionary in "links" must have the _source_ and _target_ key. The other keys are optionals. Also, each id in source and target must redirect to an existing node in "nodes". + + +## Usage + +To use the library, import the `Graph` object directly and use the `export` method +to create a `.html` with the visualization. + + +```python +from PyNetworkD3 import Graph + +dataset = { + "nodes": [{"id": 1},{"id": 2},{"id": 3},{"id": 4},{"id": 5}], + "links": [ + {"source": 1, "target": 3}, + {"source": 2, "target": 3}, + {"source": 1, "target": 3}, + {"source": 5, "target": 3}, + {"source": 4, "target": 1}, + ] +} + +graph = Graph(dataset, width=300, height=200, radio=10, tooltip=["id"]) + +graph.export("output.html) +``` + +Also you can write the instance in the last line of the notebook's cell (ckeck the example in colab) to view the visualization. + + +## Developing + +This library uses `PyTest` as the test suite runner, and `PyLint`, `Flake8`, `Black`, `ISort` and `MyPy` as linters. It also uses `Poetry` as the default package manager. + +The library includes a `Makefile` that has every command you need to start developing. If you don't have it, install `Poetry` using: + +```sh +make get-poetry +``` + +Then, create a virtualenv to use throughout the development process, using: + +```sh +make build-env +``` + +Activate the virtualenv using: + +```sh +. .venv/bin/activate +``` + +Deactivate it using: + +```sh +deactivate +``` + +To add a new package, use `Poetry`: + +```sh +poetry add +``` + +To run the linters, you can use: + +```sh +# The following commands auto-fix the code +make black! +make isort! + +# The following commands just review the code +make black +make isort +make flake8 +make mypy +make pylint +``` + +To run the tests, you can use: + +```sh +make tests +``` + +## Releasing + +To make a new release of the library, `git switch` to the `master` branch and execute: + +```sh +make bump! minor +``` + +The word `minor` can be replaced with `patch` or `major`, depending on the type of release. The `bump!` command will bump the versions of the library, create a new branch, add and commit the changes. Then, just _merge_ that branch to `master`. Finally, execute a _merge_ to the `stable` branch. Make sure to update the version before merging into `stable`, as `PyPi` will reject packages with duplicated versions. + + + +%package help +Summary: Development documents and examples for pynetworkd3 +Provides: python3-pynetworkd3-doc +%description help +

PyNetworkD3

+ +

+ + Create D3 visualization networks with Python + +

+ +

+ + + + PyPI - Version + + + + Tests + + + + Linters + + + +

+ +## Installation + +Install using `pip`! + +```sh +$ pip install pynetworkd3 +``` + +## Input JSON syntax + +``` +{ + "nodes": [ + { + "id": "id1", + "attribute 1": "value attribute 1", + "attribute 2": "value attribute 2", + (...) + "attribute N": "value attribute N", + }, + { + "id": "id2", + "attribute 1": "value attribute 1", + "attribute 2": "value attribute 2", + (...) + "attribute N": "value attribute N", + }, + (...) + ], + "links": [ + { + "source": "id1", + "target": "id2", + "attribute 1": "value attribute 1", + "attribute 2": "value attribute 2", + (...) + "attribute N": "value attribute N", + }, + (...) + ] +} +``` + +- Every dictionary in "nodes" must have the _id_ key. The other keys are optionals. + +- Every dictionary in "links" must have the _source_ and _target_ key. The other keys are optionals. Also, each id in source and target must redirect to an existing node in "nodes". + + +## Usage + +To use the library, import the `Graph` object directly and use the `export` method +to create a `.html` with the visualization. + + +```python +from PyNetworkD3 import Graph + +dataset = { + "nodes": [{"id": 1},{"id": 2},{"id": 3},{"id": 4},{"id": 5}], + "links": [ + {"source": 1, "target": 3}, + {"source": 2, "target": 3}, + {"source": 1, "target": 3}, + {"source": 5, "target": 3}, + {"source": 4, "target": 1}, + ] +} + +graph = Graph(dataset, width=300, height=200, radio=10, tooltip=["id"]) + +graph.export("output.html) +``` + +Also you can write the instance in the last line of the notebook's cell (ckeck the example in colab) to view the visualization. + + +## Developing + +This library uses `PyTest` as the test suite runner, and `PyLint`, `Flake8`, `Black`, `ISort` and `MyPy` as linters. It also uses `Poetry` as the default package manager. + +The library includes a `Makefile` that has every command you need to start developing. If you don't have it, install `Poetry` using: + +```sh +make get-poetry +``` + +Then, create a virtualenv to use throughout the development process, using: + +```sh +make build-env +``` + +Activate the virtualenv using: + +```sh +. .venv/bin/activate +``` + +Deactivate it using: + +```sh +deactivate +``` + +To add a new package, use `Poetry`: + +```sh +poetry add +``` + +To run the linters, you can use: + +```sh +# The following commands auto-fix the code +make black! +make isort! + +# The following commands just review the code +make black +make isort +make flake8 +make mypy +make pylint +``` + +To run the tests, you can use: + +```sh +make tests +``` + +## Releasing + +To make a new release of the library, `git switch` to the `master` branch and execute: + +```sh +make bump! minor +``` + +The word `minor` can be replaced with `patch` or `major`, depending on the type of release. The `bump!` command will bump the versions of the library, create a new branch, add and commit the changes. Then, just _merge_ that branch to `master`. Finally, execute a _merge_ to the `stable` branch. Make sure to update the version before merging into `stable`, as `PyPi` will reject packages with duplicated versions. + + + +%prep +%autosetup -n pynetworkd3-0.0.9 + +%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-pynetworkd3 -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 17 2023 Python_Bot - 0.0.9-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..535c02e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +1185f169ffb189b0c6e1e7f4741f0cc8 PyNetworkD3-0.0.9.tar.gz -- cgit v1.2.3