From 234fd400b71b8a283513a61034aaf18fc2ad53d0 Mon Sep 17 00:00:00 2001 From: Sepand Haghighi Date: Sun, 9 Oct 2022 14:16:40 +0330 Subject: [PATCH 1/9] Test (#120) * fix : set Python 3.8 for tests * doc : CHANGELOG updated --- .github/workflows/test.yml | 6 +++--- CHANGELOG.md | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9fe46cc..fdcf9837 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,17 +37,17 @@ jobs: - name: Version check run: | python otherfile/version_check.py - if: matrix.python-version == 3.7 + if: matrix.python-version == 3.8 - name: Other tests run: | python -m vulture pyrgg/ otherfile/ setup.py --min-confidence 65 --exclude=__init__.py --sort-by-size python -m bandit -r pyrgg -s B311,B403 python -m pydocstyle -v --match-dir=pyrgg - if: matrix.python-version == 3.7 + if: matrix.python-version == 3.8 - name: Codecov run: | codecov - if: matrix.python-version == 3.7 && matrix.os == 'ubuntu-latest' + if: matrix.python-version == 3.8 && matrix.os == 'ubuntu-latest' - name: cProfile run: | python -m cProfile -s cumtime otherfile/pyrgg_profile.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fa1499f..4c6921c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Test system modified ## [1.2] - 2022-09-07 ### Added - Anaconda workflow From c299b3f657de8426e9d0be24d62debdd2e9a1c83 Mon Sep 17 00:00:00 2001 From: Sepand Haghighi Date: Fri, 11 Nov 2022 13:29:31 +0330 Subject: [PATCH 2/9] Python 3.11 Support (#122) * fix : Python 3.11 added to test.yml * doc : CHANGELOG updated --- .github/workflows/test.yml | 2 +- CHANGELOG.md | 1 + setup.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fdcf9837..838060f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10.0] + python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10.0, 3.11.0] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c6921c5..9215befd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] ### Changed - Test system modified +- `Python 3.11` added to `test.yml` ## [1.2] - 2022-09-07 ### Added - Anaconda workflow diff --git a/setup.py b/setup.py index 828e0135..081c0eeb 100644 --- a/setup.py +++ b/setup.py @@ -71,6 +71,7 @@ def read_description(): 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Intended Audience :: Developers', 'Intended Audience :: Education', 'Intended Audience :: End Users/Desktop', From 708d3b5057dfb82e8beab9ea8be5b9e8c2a93e40 Mon Sep 17 00:00:00 2001 From: Sepand Haghighi Date: Sun, 13 Nov 2022 09:24:06 +0330 Subject: [PATCH 3/9] CLI (#124) * fix : console entry points updated * fix : tests updated * doc : CHANGELOG updated * fix : test flag modified * fix : autopep8 --- .github/workflows/test.yml | 3 ++- CHANGELOG.md | 1 + pyrgg/__main__.py | 39 +++++++++++++++++++++++++------------- setup.py | 5 ++++- 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 838060f4..9ebe348d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,8 @@ jobs: python setup.py install - name: First test run: | - python -m pyrgg test + pyrgg test + pyrgg --version - name: Test requirements Installation run: | python otherfile/requirements-splitter.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 9215befd..3101ff3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Test system modified - `Python 3.11` added to `test.yml` +- CLI mode updated ## [1.2] - 2022-09-07 ### Added - Anaconda workflow diff --git a/pyrgg/__main__.py b/pyrgg/__main__.py index b61a816f..afa8b53a 100644 --- a/pyrgg/__main__.py +++ b/pyrgg/__main__.py @@ -5,6 +5,7 @@ from pyrgg.params import * import time import sys +import argparse import doctest from art import tprint @@ -103,20 +104,28 @@ def run(): line(40) -if __name__ == "__main__": - tprint("Pyrgg", "larry3d") - tprint("v" + PYRGG_VERSION) - description_print() - args = sys.argv - if len(args) > 1: - if args[1].upper() == "TEST": - error_flag = doctest.testfile("test.py", verbose=False)[0] - sys.exit(error_flag) - else: - print("Bad Input!") - print("Test (Run doctest)") - print("Without arg --> Normal Run") +def main(): + """ + CLI main function. + + :return: None + """ + parser = argparse.ArgumentParser() + parser.add_argument('--version', help='version', nargs="?", const=1) + parser.add_argument('test', help='test', nargs="?", const=1) + args = parser.parse_args() + if args.version: + print(PYRGG_VERSION) + elif args.test: + print("Testing ...") + error_flag = doctest.testfile("test.py", verbose=False)[0] + if error_flag == 0: + print("Done!") + sys.exit(error_flag) else: + tprint("Pyrgg", "larry3d") + tprint("v" + PYRGG_VERSION) + description_print() EXIT_FLAG = False while not EXIT_FLAG: run() @@ -124,3 +133,7 @@ def run(): input("Press [R] to restart Pyrgg or any other key to exit.")) if INPUTINDEX.upper() != "R": EXIT_FLAG = True + + +if __name__ == "__main__": + main() diff --git a/setup.py b/setup.py index 081c0eeb..8bf58557 100644 --- a/setup.py +++ b/setup.py @@ -86,4 +86,7 @@ def read_description(): 'Topic :: Scientific/Engineering :: Physics', ], license='MIT', -) + entry_points={ + 'console_scripts': [ + 'pyrgg = pyrgg.__main__:main', + ]}) From 2d0df9999c0f95ed050bde0f0ba4b1e0f24609fd Mon Sep 17 00:00:00 2001 From: Sepand Haghighi Date: Wed, 16 Nov 2022 11:07:41 +0330 Subject: [PATCH 4/9] GraphViz Format (#125) * feat : graph viewer format added * fix : minor edit in dot_maker function * fix : tests updated * fix : dev-requirements.txt updated * fix : autopep8 * doc : README updated * doc : sample links updated * doc : CHANGELOG updated * doc : README updated * doc : CHANGELOG updated --- CHANGELOG.md | 3 ++ README.md | 18 +++++++++++ dev-requirements.txt | 1 + pyrgg/__main__.py | 3 +- pyrgg/graph_gen.py | 72 ++++++++++++++++++++++++++++++++++++++++++ pyrgg/params.py | 2 ++ test/graph_gen_test.py | 49 ++++++++++++++++++++++++++++ 7 files changed, 147 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3101ff3f..61ab3937 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Graphviz(DOT) format ### Changed - Test system modified - `Python 3.11` added to `test.yml` - CLI mode updated +- `dev-requirements.txt` updated ## [1.2] - 2022-09-07 ### Added - Anaconda workflow diff --git a/README.md b/README.md index d7809094..8753123f 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,8 @@ You can also join our discord server - [Sample 2-GML](https://www.dropbox.com/s/5gt5udezy56mlz9/1000.gml?dl=0) (1000 Vertices , 2.4MB) - [Sample 1-GEXF](https://www.dropbox.com/s/kgx8xl9j0dpk4us/100.gexf?dl=0) (100 Vertices , 63KB) - [Sample 2-GEXF](https://www.dropbox.com/s/7a380kf35buvusr/1000.gexf?dl=0) (1000 Vertices , 6.4MB) +- [Sample 1-Graphviz](https://www.dropbox.com/s/ukev1hi4kguomri/100.gv?dl=0) (100 Vertices , 11KB) +- [Sample 2-Graphviz](https://www.dropbox.com/s/vpvvliz96mdea1p/1000.gv?dl=0) (1000 Vertices , 106KB) @@ -492,6 +494,20 @@ You can also join our discord server ``` +- [Graphviz(.gv)](https://graphviz.org/doc/info/lang.html) + ``` + graph example + { + node1 -- node2 [weight=W1]; + node3 -- node4 [weight=W2]; + node1 -- node3 [weight=W3]; + . + . + . + } + ``` + * [Online Visualization](https://dreampuf.github.io/GraphvizOnline/) + - [Pickle(.p)](https://docs.python.org/3.5/library/pickle.html) (Binary Format) @@ -572,6 +588,8 @@ If you use pyrgg in your research, please cite the [JOSS paper](http://joss.theo
11- Chakrabarti, Deepayan, Yiping Zhan, and Christos Faloutsos. "R-MAT: A recursive model for graph mining." Proceedings of the 2004 SIAM International Conference on Data Mining. Society for Industrial and Applied Mathematics, 2004.
12- Zhong, Jianlong, and Bingsheng He. "An overview of medusa: simplified graph processing on gpus." ACM SIGPLAN Notices 47.8 (2012): 283-284.
+ +
13- Ellson, John, et al. "Graphviz and dynagraph—static and dynamic graph drawing tools." Graph drawing software. Springer, Berlin, Heidelberg, 2004. 127-148.
## Show Your Support diff --git a/dev-requirements.txt b/dev-requirements.txt index 376a2e53..cf7474eb 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,6 +3,7 @@ pyyaml==6.0 codecov>=2.0.15 scipy>=1.2.0 networkx>=2.1 +pydot>=1.2.4 pytest>=4.3.1 pytest-cov>=2.6.1 setuptools>=40.8.0 diff --git a/pyrgg/__main__.py b/pyrgg/__main__.py index afa8b53a..7c687591 100644 --- a/pyrgg/__main__.py +++ b/pyrgg/__main__.py @@ -24,7 +24,8 @@ 12: gl_maker, 13: gdf_maker, 14: gml_maker, - 15: gexf_maker} + 15: gexf_maker, + 16: dot_maker} def gen_graph(input_dict, file_name): diff --git a/pyrgg/graph_gen.py b/pyrgg/graph_gen.py index 771ddecf..e4d48d8f 100644 --- a/pyrgg/graph_gen.py +++ b/pyrgg/graph_gen.py @@ -1000,3 +1000,75 @@ def gexf_maker( buf.write(" " * 4 + "\n") buf.write("") return edge_number + + +def dot_maker( + file_name, + min_weight, + max_weight, + vertices, + min_edge, + max_edge, + sign, + direct, + self_loop, + multigraph): + """ + Create output file in Dot Format. + + :param file_name: file name + :type file_name: str + :param min_weight: weight min range + :type min_weight: int + :param max_weight: weight max range + :type max_weight: int + :param vertices: number of vertices + :type vertices: int + :param min_edge: minimum number of edges (connected to each vertex) + :type min_edge: int + :param max_edge: maximum number of edges (connected to each vertex) + :type max_edge: int + :param sign: weight sign flag + :type sign: bool + :param direct: directed and undirected graph flag + :type direct: bool + :param self_loop: self loop flag + :type self_loop: bool + :param multigraph: multigraph flag + :type multigraph: bool + :return: edge_number as int + """ + edge_dic, weight_dic, edge_number = edge_gen( + vertices, + min_weight, + max_weight, + min_edge, + max_edge, + sign, + direct, + self_loop, + multigraph) + header = "{0} {1}" + linker = "--" + if direct: + header = header.format("digraph", file_name) + linker = "->" + else: + header = header.format("graph", file_name) + + with open(file_name + ".gv", "w") as buf: + buf.write(header + " {") + for key, edge_val in edge_dic.items(): + for j, value in enumerate(edge_val): + buf.write( + "\n" + + str(key) + + " " + + linker + + " " + + str(value) + + " [weight={}]".format( + weight_dic[key][j]) + + ";") + buf.write("\n}") + return edge_number diff --git a/pyrgg/params.py b/pyrgg/params.py index f5e54931..950750a8 100644 --- a/pyrgg/params.py +++ b/pyrgg/params.py @@ -24,6 +24,7 @@ 13- GDF(.gdf) 14- GML(.gml) 15- GEXF(.gexf) + 16- DOT(.gv) """ ), "weight": "- Unweighted[0] or Weighted[1]", @@ -58,6 +59,7 @@ 13: ".gdf", 14: ".gml", 15: ".gexf", + 16: ".gv" } diff --git a/test/graph_gen_test.py b/test/graph_gen_test.py index b00c9060..c0125831 100644 --- a/test/graph_gen_test.py +++ b/test/graph_gen_test.py @@ -1699,6 +1699,51 @@ 7,7,-100.525 10,10,-181.752 +>>> import pydot +>>> random.seed(4) +>>> dot_maker('testfile',0,50,30,0,4,True,True,False,False) +37 +>>> file=open('testfile.gv','r') +>>> g1 = pydot.graph_from_dot_data(file.read()) +>>> type(g1[0]) + +>>> g1[0].get_type() +'digraph' +>>> len(g1[0].get_edge_list()) +37 +>>> random.seed(4) +>>> dot_maker('testfile2',0,50,30,0,4,True,False,False,False) +37 +>>> file=open('testfile2.gv','r') +>>> g2 = pydot.graph_from_dot_data(file.read()) +>>> type(g2[0]) + +>>> g2[0].get_type() +'graph' +>>> len(g2[0].get_edge_list()) +37 +>>> random.seed(4) +>>> dot_maker('testfile3',0,50,30,0,4,True,False,False,True) +40 +>>> file=open('testfile3.gv','r') +>>> g3 = pydot.graph_from_dot_data(file.read()) +>>> type(g3[0]) + +>>> g3[0].get_type() +'graph' +>>> len(g3[0].get_edge_list()) +40 +>>> random.seed(4) +>>> dot_maker('testfile4',1,1,30,0,4,True,False,False,True) +42 +>>> file=open('testfile4.gv','r') +>>> g4 = pydot.graph_from_dot_data(file.read()) +>>> type(g4[0]) + +>>> g4[0].get_type() +'graph' +>>> len(g4[0].get_edge_list()) +42 >>> file.close() >>> os.remove('testfile.csv') >>> os.remove('testfile.gml') @@ -1747,6 +1792,10 @@ >>> os.remove('testfile3.p') >>> os.remove('testfile3.wel') >>> os.remove('testfile3.yaml') +>>> os.remove('testfile.gv') +>>> os.remove('testfile2.gv') +>>> os.remove('testfile3.gv') +>>> os.remove('testfile4.gv') >>> os.remove('logfile.log') """ From 8c2eb8b0b0e719e48c4982d9880162ffbc9079ea Mon Sep 17 00:00:00 2001 From: Sepand Haghighi Date: Thu, 17 Nov 2022 07:17:14 +0330 Subject: [PATCH 5/9] Todo list (#126) * doc : TODO.md added * doc : CHANGELOG updated --- CHANGELOG.md | 1 + README.md | 37 +------------------------------------ TODO.md | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 36 deletions(-) create mode 100644 TODO.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 61ab3937..98d7ea49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `Python 3.11` added to `test.yml` - CLI mode updated - `dev-requirements.txt` updated +- To-do list moved to `TODO.md` ## [1.2] - 2022-09-07 ### Added - Anaconda workflow diff --git a/README.md b/README.md index 8753123f..ef4f67f0 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ * [Installation](https://github.com/sepandhaghighi/pyrgg#installation) * [Usage](https://github.com/sepandhaghighi/pyrgg#usage) * [Issues & Bug Reports](https://github.com/sepandhaghighi/pyrgg#issues--bug-reports) - * [Todo](https://github.com/sepandhaghighi/pyrgg#todo) + * [Todo](https://github.com/sepandhaghighi/pyrgg/blob/master/TODO.md) * [Sample Files](https://github.com/sepandhaghighi/pyrgg#sample-files) * [Example of Usage](https://github.com/sepandhaghighi/pyrgg#example-of-usage) * [Supported Formats](https://github.com/sepandhaghighi/pyrgg#supported-formats) @@ -135,41 +135,6 @@ You can also join our discord server Discord Channel - -## TODO -- [x] Formats - - [x] DIMACS - - [x] JSON - - [x] YAML - - [x] Pickle - - [x] CSV - - [x] TSV - - [x] WEL - - [x] ASP - - [x] TGF - - [x] UCINET DL - - [x] GML - - [x] GDF - - [x] Matrix Market - - [x] Graph Line - - [x] GEXF -- [ ] Sizes - - [x] Small - - [x] Medium - - [ ] Large -- [x] Weighted Graph - - [x] Signed Weights -- [x] Unweighted Graph -- [x] Dense Graph -- [x] Sparse Graph -- [x] Directed Graph -- [x] Self loop -- [x] Parallel Arc -- [ ] Multithreading -- [ ] GUI -- [ ] Erdős–Rényi model -- [ ] Tree - ## Sample Files - [Sample 1-DIMACS](https://www.dropbox.com/s/i80tnwuuv4iyqet/100.gr.gz?dl=0) (100 Vertices , 3KB) - [Sample 2-DIMACS](https://www.dropbox.com/s/lqk42pwu7o4xauv/1000.gr.gz?dl=0) (1000 Vertices , 13KB) diff --git a/TODO.md b/TODO.md new file mode 100644 index 00000000..308fc5ce --- /dev/null +++ b/TODO.md @@ -0,0 +1,36 @@ +## TODO + +- [x] Formats + - [x] DIMACS + - [x] JSON + - [x] YAML + - [x] Pickle + - [x] CSV + - [x] TSV + - [x] WEL + - [x] ASP + - [x] TGF + - [x] UCINET DL + - [x] GML + - [x] GDF + - [x] Matrix Market + - [x] Graph Line + - [x] GEXF + - [x] Graphviz +- [ ] Sizes + - [x] Small + - [x] Medium + - [ ] Large +- [x] Weighted Graph + - [x] Signed Weights +- [x] Unweighted Graph +- [x] Dense Graph +- [x] Sparse Graph +- [x] Directed Graph +- [x] Self loop +- [x] Parallel Arc +- [ ] Config file +- [ ] Multithreading +- [ ] GUI +- [ ] Erdős–Rényi model +- [ ] Tree \ No newline at end of file From f32ac62aeb633302863ccbd3bcec8ad5934a1ca7 Mon Sep 17 00:00:00 2001 From: Sepand Haghighi Date: Fri, 18 Nov 2022 12:13:22 +0330 Subject: [PATCH 6/9] Samples (#127) * doc : SAMPLES.md added * doc : CHANGELOG updated * doc : minor edit in README.md * doc : CHANGELOG updated * doc : SAMPLES.md removed * doc : reorder README sections * doc : minor edit in README.md Usage section * doc : minor edit in Trivial Graph Format link title --- CHANGELOG.md | 1 + README.md | 138 ++++++++++++++++++++++++--------------------------- 2 files changed, 65 insertions(+), 74 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98d7ea49..ebbd08d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Graphviz(DOT) format ### Changed - Test system modified +- `README.md` modified - `Python 3.11` added to `test.yml` - CLI mode updated - `dev-requirements.txt` updated diff --git a/README.md b/README.md index ef4f67f0..c696e735 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,10 @@ * [Overview](https://github.com/sepandhaghighi/pyrgg#overview) * [Installation](https://github.com/sepandhaghighi/pyrgg#installation) * [Usage](https://github.com/sepandhaghighi/pyrgg#usage) - * [Issues & Bug Reports](https://github.com/sepandhaghighi/pyrgg#issues--bug-reports) - * [Todo](https://github.com/sepandhaghighi/pyrgg/blob/master/TODO.md) - * [Sample Files](https://github.com/sepandhaghighi/pyrgg#sample-files) - * [Example of Usage](https://github.com/sepandhaghighi/pyrgg#example-of-usage) * [Supported Formats](https://github.com/sepandhaghighi/pyrgg#supported-formats) + * [Example of Usage](https://github.com/sepandhaghighi/pyrgg#example-of-usage) * [Similar Works](https://github.com/sepandhaghighi/pyrgg#similar-works) + * [Issues & Bug Reports](https://github.com/sepandhaghighi/pyrgg#issues--bug-reports) * [Dependencies](https://github.com/sepandhaghighi/pyrgg#dependencies) * [Contribution](https://github.com/sepandhaghighi/pyrgg/blob/master/.github/CONTRIBUTING.md) * [References](https://github.com/sepandhaghighi/pyrgg#references) @@ -36,6 +34,7 @@ * [Authors](https://github.com/sepandhaghighi/pyrgg/blob/master/AUTHORS.md) * [License](https://github.com/sepandhaghighi/pyrgg/blob/master/LICENSE) * [Show Your Support](https://github.com/sepandhaghighi/pyrgg#show-your-support) + * [Todo](https://github.com/sepandhaghighi/pyrgg/blob/master/TODO.md) * [Changelog](https://github.com/sepandhaghighi/pyrgg/blob/master/CHANGELOG.md) * [Code of Conduct](https://github.com/sepandhaghighi/pyrgg/blob/master/.github/CODE_OF_CONDUCT.md) @@ -115,7 +114,10 @@ Pyrgg will likely run on a modern dual core PC. Typical configuration is: Note that it may run on lower end equipment though good performance is not guaranteed. -## Usage +## Usage +- Open `CMD` (Windows) or `Terminal` (UNIX) +- Run `pyrgg` or `python -m pyrgg` (or run `PYRGG.exe`) +- Enter data
@@ -124,72 +126,6 @@ Note that it may run on lower end equipment though good performance is not guara
-## Issues & Bug Reports - -Just fill an issue and describe it. We'll check it ASAP! -or send an email to [info@pyrgg.ir](mailto:info@pyrgg.ir "info@pyrgg.ir"). - -You can also join our discord server - - - Discord Channel - - -## Sample Files -- [Sample 1-DIMACS](https://www.dropbox.com/s/i80tnwuuv4iyqet/100.gr.gz?dl=0) (100 Vertices , 3KB) -- [Sample 2-DIMACS](https://www.dropbox.com/s/lqk42pwu7o4xauv/1000.gr.gz?dl=0) (1000 Vertices , 13KB) -- [Sample 3-DIMACS](https://www.dropbox.com/s/93dp8cjs6lnu83u/1000000.gr.gz?dl=0) (1000000 Vertices , 7MB) -- [Sample 4-DIMACS](https://www.dropbox.com/s/rrxdc4wt0ldonfk/5000000.gr.gz?dl=0) (5000000 Vertices , 37MB) -- [Sample 1-JSON](https://www.dropbox.com/s/yvevoyb8559nytb/100.json?dl=0) (100 Vertices , 26KB) -- [Sample 2-JSON](https://www.dropbox.com/s/f6kljlch7p2rfhy/1000.json?dl=0) (1000 Vertices , 494KB) -- [Sample 1-CSV](https://www.dropbox.com/s/dmld0eadftnatr5/100.csv?dl=0) (100 Vertices , 3KB) -- [Sample 2-CSV](https://www.dropbox.com/s/juxah4nwamzdegr/1000.csv?dl=0) (1000 Vertices , 51KB) -- [Sample 1-TSV](https://www.dropbox.com/s/j3zgs4kx2paxe75/100.tsv?dl=0) (100 Vertices , 29KB) -- [Sample 2-TSV](https://www.dropbox.com/s/ykagmjgwlpim6dq/1000.tsv?dl=0) (1000 Vertices , 420KB) -- [Sample 1-WEL](https://www.dropbox.com/s/moie1xb2wj90y33/100.wel?dl=0) (100 Vertices , 5KB) -- [Sample 2-WEL](https://www.dropbox.com/s/h6pohl60okhdnt7/1000.wel?dl=0) (1000 Vertices , 192KB) -- [Sample 1-YAML](https://www.dropbox.com/s/9seljohtoqjzjzy/30.yaml?dl=0) (30 Vertices , 6KB) -- [Sample 2-YAML](https://www.dropbox.com/s/wtfh38rgmn29npi/100.yaml?dl=0) (100 Vertices , 35KB) -- [Sample 1-LP](https://www.dropbox.com/s/4bufa1m4uamv48z/100.lp?dl=0) (100 Vertices , 7KB) -- [Sample 2-LP](https://www.dropbox.com/s/w79fh1qva64namw/1000.lp?dl=0) (1000 Vertices , 76KB) -- [Sample 1-Pickle](https://www.dropbox.com/s/4s8zt9i13z39gts/100.p?dl=0) (100 Vertices , 12KB) -- [Sample 2-Pickle](https://www.dropbox.com/s/fzurqu5au0p1b54/1000.p?dl=0) (1000 Vertices , 340KB) -- [Sample 1-TGF](https://www.dropbox.com/s/tehb6f3gz2o5v9c/100.tgf?dl=0) (100 Vertices , 4KB) -- [Sample 2-TGF](https://www.dropbox.com/s/9mjeq4w973189cc/1000.tgf?dl=0) (1000 Vertices , 61KB) -- [Sample 1-UCINET DL](https://www.dropbox.com/s/82wrl86uowwjud2/100.dl?dl=0) (100 Vertices , 8KB) -- [Sample 2-UCINET DL](https://www.dropbox.com/s/kbzbsy47uvfqdsi/1000.dl?dl=0) (1000 Vertices , 729KB) -- [Sample 1-MTX](https://www.dropbox.com/s/ztw3vg0roups82q/100.mtx?dl=0) (100 Vertices , 59KB) -- [Sample 2-MTX](https://www.dropbox.com/s/skjjvbbzrpvryl4/1000.mtx?dl=0) (1000 Vertices , 1.8MB) -- [Sample 1-GL](https://www.dropbox.com/s/obmmb5nw1lca9z3/100.gl?dl=0) (100 Vertices , 17KB) -- [Sample 2-GL](https://www.dropbox.com/s/intufsbudnmfv8m/1000.gl?dl=0) (1000 Vertices , 2.4MB) -- [Sample 1-GDF](https://www.dropbox.com/s/7dqox0f8e1f859s/100.gdf?dl=0) (100 Vertices , 21KB) -- [Sample 2-GDF](https://www.dropbox.com/s/xabjzpp0p5sr4b9/1000.gdf?dl=0) (1000 Vertices , 690KB) -- [Sample 1-GML](https://www.dropbox.com/s/g9uvywn1fwt9aq7/100.gml?dl=0) (100 Vertices , 120KB) -- [Sample 2-GML](https://www.dropbox.com/s/5gt5udezy56mlz9/1000.gml?dl=0) (1000 Vertices , 2.4MB) -- [Sample 1-GEXF](https://www.dropbox.com/s/kgx8xl9j0dpk4us/100.gexf?dl=0) (100 Vertices , 63KB) -- [Sample 2-GEXF](https://www.dropbox.com/s/7a380kf35buvusr/1000.gexf?dl=0) (1000 Vertices , 6.4MB) -- [Sample 1-Graphviz](https://www.dropbox.com/s/ukev1hi4kguomri/100.gv?dl=0) (100 Vertices , 11KB) -- [Sample 2-Graphviz](https://www.dropbox.com/s/vpvvliz96mdea1p/1000.gv?dl=0) (1000 Vertices , 106KB) - - - - -## Example of Usage - - -- Generate synthetic data for graph processing frameworks (some of them mentioned here) performance-analysis - - [Medusa](https://github.com/JianlongZhong/Medusa "Medusa") - - [Totem](https://github.com/netsyslab/Totem "Totem") - - [Frog](https://github.com/AndrewStallman/Frog "Frog") - - [CuSha](https://github.com/farkhor/CuSha "CuSha") -
- -

Fig. 1. Rand Graph Generation

-
- -- Generate synthetic data for graph benchmark suite like [GAP](https://github.com/sbeamer/gapbs) - - ## Supported Formats - [DIMACS(.gr)](http://www.diag.uniroma1.it/challenge9/format.shtml) @@ -203,6 +139,10 @@ You can also join our discord server a ``` + * [Sample 1](https://www.dropbox.com/s/i80tnwuuv4iyqet/100.gr.gz?dl=0) (100 Vertices , 3KB) + * [Sample 2](https://www.dropbox.com/s/lqk42pwu7o4xauv/1000.gr.gz?dl=0) (1000 Vertices , 13KB) + * [Sample 3](https://www.dropbox.com/s/93dp8cjs6lnu83u/1000000.gr.gz?dl=0) (1000000 Vertices , 7MB) + * [Sample 4](https://www.dropbox.com/s/rrxdc4wt0ldonfk/5000000.gr.gz?dl=0) (5000000 Vertices , 37MB) - [CSV(.csv)](https://en.wikipedia.org/wiki/Comma-separated_values) ``` ,, @@ -213,6 +153,8 @@ You can also join our discord server ,, ``` + * [Sample 1](https://www.dropbox.com/s/dmld0eadftnatr5/100.csv?dl=0) (100 Vertices , 3KB) + * [Sample 2](https://www.dropbox.com/s/juxah4nwamzdegr/1000.csv?dl=0) (1000 Vertices , 51KB) - [TSV(.tsv)](https://en.wikipedia.org/wiki/Tab-separated_values) ``` @@ -224,6 +166,8 @@ You can also join our discord server ``` + * [Sample 1](https://www.dropbox.com/s/j3zgs4kx2paxe75/100.tsv?dl=0) (100 Vertices , 29KB) + * [Sample 2](https://www.dropbox.com/s/ykagmjgwlpim6dq/1000.tsv?dl=0) (1000 Vertices , 420KB) - [JSON(.json)](https://en.wikipedia.org/wiki/JSON) @@ -270,6 +214,8 @@ You can also join our discord server } } ``` + * [Sample 1](https://www.dropbox.com/s/yvevoyb8559nytb/100.json?dl=0) (100 Vertices , 26KB) + * [Sample 2](https://www.dropbox.com/s/f6kljlch7p2rfhy/1000.json?dl=0) (1000 Vertices , 494KB) - [YAML(.yaml)](https://en.wikipedia.org/wiki/YAML) ``` graph: @@ -302,6 +248,8 @@ You can also join our discord server weighted: true ``` + * [Sample 1](https://www.dropbox.com/s/9seljohtoqjzjzy/30.yaml?dl=0) (30 Vertices , 6KB) + * [Sample 2](https://www.dropbox.com/s/wtfh38rgmn29npi/100.yaml?dl=0) (100 Vertices , 35KB) - [Weighted Edge List(.wel)](http://www.cs.cmu.edu/~pbbs/benchmarks/graphIO.html) ``` @@ -312,6 +260,8 @@ You can also join our discord server ``` + * [Sample 1](https://www.dropbox.com/s/moie1xb2wj90y33/100.wel?dl=0) (100 Vertices , 5KB) + * [Sample 2](https://www.dropbox.com/s/h6pohl60okhdnt7/1000.wel?dl=0) (1000 Vertices , 192KB) - [ASP(.lp)](https://www.mat.unical.it/aspcomp2013/MaximalClique) ``` node(1). @@ -325,7 +275,9 @@ You can also join our discord server . edge(head_n,tail_n,weight_n). ``` -- [Trivial_Graph_Format(.tgf)](https://en.wikipedia.org/wiki/Trivial_Graph_Format) + * [Sample 1](https://www.dropbox.com/s/4bufa1m4uamv48z/100.lp?dl=0) (100 Vertices , 7KB) + * [Sample 2](https://www.dropbox.com/s/w79fh1qva64namw/1000.lp?dl=0) (1000 Vertices , 76KB) +- [Trivial Graph Format(.tgf)](https://en.wikipedia.org/wiki/Trivial_Graph_Format) ``` 1 . @@ -339,6 +291,8 @@ You can also join our discord server . n k weight_n ``` + * [Sample 1](https://www.dropbox.com/s/tehb6f3gz2o5v9c/100.tgf?dl=0) (100 Vertices , 4KB) + * [Sample 2](https://www.dropbox.com/s/9mjeq4w973189cc/1000.tgf?dl=0) (1000 Vertices , 61KB) - [UCINET DL Format(.dl)](https://sites.google.com/site/ucinetsoftware/home) ``` dl @@ -351,6 +305,8 @@ You can also join our discord server . n k weight_n ``` + * [Sample 1](https://www.dropbox.com/s/82wrl86uowwjud2/100.dl?dl=0) (100 Vertices , 8KB) + * [Sample 2](https://www.dropbox.com/s/kbzbsy47uvfqdsi/1000.dl?dl=0) (1000 Vertices , 729KB) - [Matrix Market(.mtx)](https://math.nist.gov/MatrixMarket/formats.html) ``` %%MatrixMarket matrix coordinate real general @@ -361,6 +317,8 @@ You can also join our discord server . ``` + * [Sample 1](https://www.dropbox.com/s/ztw3vg0roups82q/100.mtx?dl=0) (100 Vertices , 59KB) + * [Sample 2](https://www.dropbox.com/s/skjjvbbzrpvryl4/1000.mtx?dl=0) (1000 Vertices , 1.8MB) - Graph Line(.gl) ``` : : ... : @@ -370,6 +328,8 @@ You can also join our discord server . : : ... : ``` + * [Sample 1](https://www.dropbox.com/s/obmmb5nw1lca9z3/100.gl?dl=0) (100 Vertices , 17KB) + * [Sample 2](https://www.dropbox.com/s/intufsbudnmfv8m/1000.gl?dl=0) (1000 Vertices , 2.4MB) - GDF(.gdf) ``` @@ -388,6 +348,8 @@ You can also join our discord server . node_n,node_2,weight_n ``` + * [Sample 1](https://www.dropbox.com/s/7dqox0f8e1f859s/100.gdf?dl=0) (100 Vertices , 21KB) + * [Sample 2](https://www.dropbox.com/s/xabjzpp0p5sr4b9/1000.gdf?dl=0) (1000 Vertices , 690KB) - [GML(.gml)](https://en.wikipedia.org/wiki/Graph_Modelling_Language) ``` @@ -436,6 +398,8 @@ You can also join our discord server ] ] ``` + * [Sample 1](https://www.dropbox.com/s/g9uvywn1fwt9aq7/100.gml?dl=0) (100 Vertices , 120KB) + * [Sample 2](https://www.dropbox.com/s/5gt5udezy56mlz9/1000.gml?dl=0) (1000 Vertices , 2.4MB) - [GEXF(.gexf)](https://github.com/gephi/gexf/wiki/Basic-Concepts#network-topology) ``` @@ -458,6 +422,8 @@ You can also join our discord server ``` + * [Sample 1](https://www.dropbox.com/s/kgx8xl9j0dpk4us/100.gexf?dl=0) (100 Vertices , 63KB) + * [Sample 2](https://www.dropbox.com/s/7a380kf35buvusr/1000.gexf?dl=0) (1000 Vertices , 6.4MB) - [Graphviz(.gv)](https://graphviz.org/doc/info/lang.html) ``` @@ -471,17 +437,41 @@ You can also join our discord server . } ``` + * [Sample 1](https://www.dropbox.com/s/ukev1hi4kguomri/100.gv?dl=0) (100 Vertices , 11KB) + * [Sample 2](https://www.dropbox.com/s/vpvvliz96mdea1p/1000.gv?dl=0) (1000 Vertices , 106KB) * [Online Visualization](https://dreampuf.github.io/GraphvizOnline/) - [Pickle(.p)](https://docs.python.org/3.5/library/pickle.html) (Binary Format) - + * [Sample 1](https://www.dropbox.com/s/4s8zt9i13z39gts/100.p?dl=0) (100 Vertices , 12KB) + * [Sample 2](https://www.dropbox.com/s/fzurqu5au0p1b54/1000.p?dl=0) (1000 Vertices , 340KB) + + +## Example of Usage + +- Generate synthetic data for graph processing frameworks (some of them mentioned here) performance-analysis + - [Medusa](https://github.com/JianlongZhong/Medusa "Medusa") + - [Totem](https://github.com/netsyslab/Totem "Totem") + - [Frog](https://github.com/AndrewStallman/Frog "Frog") + - [CuSha](https://github.com/farkhor/CuSha "CuSha") +- Generate synthetic data for graph benchmark suite like [GAP](https://github.com/sbeamer/gapbs) ## Similar Works - [Random Modular Network Generator](https://github.com/prathasah/random-modular-network-generator) Generates random graphs with tunable strength of community structure -- [randomGraph](https://github.com/sdghafouri/randomGraph) very simple random graph generator in matlab +- [randomGraph](https://github.com/sdghafouri/randomGraph) very simple random graph generator in MATLAB - [Graph1](https://github.com/Saptaparni/Graph1) Random Graph Generator with Max capacity paths (C++) +## Issues & Bug Reports + +Just fill an issue and describe it. We'll check it ASAP! +or send an email to [info@pyrgg.ir](mailto:info@pyrgg.ir "info@pyrgg.ir"). + +You can also join our discord server + + + Discord Channel + + ## Dependencies From f7da0615cd8a1c434c614c2e01e87394e8086fe7 Mon Sep 17 00:00:00 2001 From: Sadra Sabouri <43045767+sadrasabouri@users.noreply.github.com> Date: Thu, 24 Nov 2022 19:19:48 +0330 Subject: [PATCH 7/9] Asciinema Instruction Video Updated (#128) * update : asciinema video updated. (#101) * fix : minor issue fixed. * log : changes logged. (#101) * edit : video edited. --- CHANGELOG.md | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebbd08d1..b0802beb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Graphviz(DOT) format ### Changed +- asciinema instruction video - Test system modified - `README.md` modified - `Python 3.11` added to `test.yml` diff --git a/README.md b/README.md index c696e735..7c0171b2 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Note that it may run on lower end equipment though good performance is not guara
- +
From 4d1e01dad3ea11a9cf60df53e11fa1602302df78 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 24 Nov 2022 19:28:58 +0330 Subject: [PATCH 8/9] rel : migrate to version 1.3 --- CHANGELOG.md | 6 ++++-- README.md | 8 ++++---- otherfile/Version.rc | 8 ++++---- otherfile/meta.yaml | 2 +- otherfile/version_check.py | 2 +- pyrgg/params.py | 2 +- setup.py | 4 ++-- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0802beb..e56619e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [1.3] - 2022-11-30 ### Added - Graphviz(DOT) format ### Changed -- asciinema instruction video +- [asciinema](asciinema.org) instruction video updated - Test system modified - `README.md` modified - `Python 3.11` added to `test.yml` @@ -157,7 +158,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - JSON format - README -[Unreleased]: https://github.com/sepandhaghighi/pyrgg/compare/v1.2...dev +[Unreleased]: https://github.com/sepandhaghighi/pyrgg/compare/v1.3...dev +[1.3]: https://github.com/sepandhaghighi/pyrgg/compare/v1.2...v1.3 [1.2]: https://github.com/sepandhaghighi/pyrgg/compare/v1.1...v1.2 [1.1]: https://github.com/sepandhaghighi/pyrgg/compare/v1.0...v1.1 [1.0]: https://github.com/sepandhaghighi/pyrgg/compare/v0.9...v1.0 diff --git a/README.md b/README.md index 7c0171b2..b9fdd3ea 100644 --- a/README.md +++ b/README.md @@ -87,14 +87,14 @@ Pyrgg target audiences are computer scientists who study graph algorithms and gr ## Installation ### Source Code -- Download [Version 1.2](https://github.com/sepandhaghighi/pyrgg/archive/v1.2.zip) or [Latest Source ](https://github.com/sepandhaghighi/pyrgg/archive/dev.zip) +- Download [Version 1.3](https://github.com/sepandhaghighi/pyrgg/archive/v1.3.zip) or [Latest Source ](https://github.com/sepandhaghighi/pyrgg/archive/dev.zip) - `pip install -r requirements.txt` or `pip3 install -r requirements.txt` (Need root access) - `python3 setup.py install` or `python setup.py install` (Need root access) ### PyPI - Check [Python Packaging User Guide](https://packaging.python.org/installing/) -- `pip install pyrgg==1.2` or `pip3 install pyrgg==1.2` (Need root access) +- `pip install pyrgg==1.3` or `pip3 install pyrgg==1.3` (Need root access) ### Conda @@ -102,8 +102,8 @@ Pyrgg target audiences are computer scientists who study graph algorithms and gr - `conda install -c sepandhaghighi pyrgg` (Need root access) ### Exe Version (Only Windows) -- Download [Exe-Version 1.2](https://github.com/sepandhaghighi/pyrgg/releases/download/v1.2/PYRGG-1.2.exe) -- Run `PYRGG-1.2.exe` +- Download [Exe-Version 1.3](https://github.com/sepandhaghighi/pyrgg/releases/download/v1.3/PYRGG-1.3.exe) +- Run `PYRGG-1.3.exe` ### System Requirements Pyrgg will likely run on a modern dual core PC. Typical configuration is: diff --git a/otherfile/Version.rc b/otherfile/Version.rc index 28bee795..27bb826c 100644 --- a/otherfile/Version.rc +++ b/otherfile/Version.rc @@ -1,7 +1,7 @@ VSVersionInfo( ffi=FixedFileInfo( - filevers=(1, 2, 0, 0), - prodvers=(1, 2, 0, 0), + filevers=(1, 3, 0, 0), + prodvers=(1, 3, 0, 0), mask=0x3f, flags=0x0, OS=0x40004, @@ -16,12 +16,12 @@ VSVersionInfo( u'040904B0', [StringStruct(u'CompanyName', u'PyRGG Development Team'), StringStruct(u'FileDescription', u'PYRGG.exe'), - StringStruct(u'FileVersion', u'1.2.0.0'), + StringStruct(u'FileVersion', u'1.3.0.0'), StringStruct(u'InternalName', u'PYRGG.exe'), StringStruct(u'LegalCopyright', u'Copyright (c) 2022 PyRGG Development Team'), StringStruct(u'OriginalFilename', u'PYRGG.exe'), StringStruct(u'ProductName', u'PYRGG'), - StringStruct(u'ProductVersion', u'1, 2, 0, 0')]) + StringStruct(u'ProductVersion', u'1, 3, 0, 0')]) ]), VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) ] diff --git a/otherfile/meta.yaml b/otherfile/meta.yaml index 546bf667..f5382313 100644 --- a/otherfile/meta.yaml +++ b/otherfile/meta.yaml @@ -1,5 +1,5 @@ {% set name = "pyrgg" %} -{% set version = "1.2" %} +{% set version = "1.3" %} package: name: {{ name|lower }} diff --git a/otherfile/version_check.py b/otherfile/version_check.py index 12d565b6..941968bc 100644 --- a/otherfile/version_check.py +++ b/otherfile/version_check.py @@ -4,7 +4,7 @@ import sys import codecs Failed = 0 -VERSION = "1.2" +VERSION = "1.3" VERSION_1 = VERSION.split(".")[0] VERSION_2 = str(int(float(VERSION) * 10 - int(VERSION_1) * 10)) diff --git a/pyrgg/params.py b/pyrgg/params.py index 950750a8..9468a1ae 100644 --- a/pyrgg/params.py +++ b/pyrgg/params.py @@ -63,7 +63,7 @@ } -PYRGG_VERSION = "1.2" +PYRGG_VERSION = "1.3" PYRGG_TEST_MODE = False diff --git a/setup.py b/setup.py index 8bf58557..f174a005 100644 --- a/setup.py +++ b/setup.py @@ -44,14 +44,14 @@ def read_description(): setup( name='pyrgg', packages=['pyrgg'], - version='1.2', + version='1.3', description='Python Random Graph Generator', long_description=read_description(), long_description_content_type='text/markdown', author='PyRGG Development Team', author_email='info@pyrgg.ir', url='https://github.com/sepandhaghighi/pyrgg', - download_url='https://github.com/sepandhaghighi/pyrgg/tarball/v1.2', + download_url='https://github.com/sepandhaghighi/pyrgg/tarball/v1.3', keywords='random graph python3 python generator graph-process generator DIMACS JSON YAML Pickle CSV TSV WEL ASP TGF UCINET', project_urls={ 'Webpage': 'https://www.pyrgg.ir', From fb9ee1d6fb582692d32f6df48f38bde79aa348c8 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 24 Nov 2022 19:36:06 +0330 Subject: [PATCH 9/9] fix : link bug fixed --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e56619e9..881011cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Graphviz(DOT) format ### Changed -- [asciinema](asciinema.org) instruction video updated +- [asciinema](https://asciinema.org) instruction video updated - Test system modified - `README.md` modified - `Python 3.11` added to `test.yml`