Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract the functional part #73

Open
ahmadsalimi opened this issue Oct 8, 2020 · 4 comments
Open

Extract the functional part #73

ahmadsalimi opened this issue Oct 8, 2020 · 4 comments

Comments

@ahmadsalimi
Copy link
Contributor

Description

I think pyrgg is now an executable script that takes the graph specifications and outputs a file containing a random graph.
What if someone wants to generate a random graph in their own code and have a graph object?
My suggestion is to divide the current program into two parts.

  1. The functional core of Random Graph Generator in which graph specifications are passed to core functions and a Graph object is returned by functions.
  2. The executable wrapper of the functional core which is same as the current interface of pyrgg, uses the functional core and stores graphs in the files.

Steps/Code to Reproduce

Maybe these steps:

  1. Extract core functions and separate them for functional core
  2. Design Graph data model and class
  3. Connect the executable part to the core part

Expected Behavior

  • If someone needs the random graph generator as a library in which its functions return randomly generated graphs, they can use the functional core of pyrgg.
  • If someone just needs to execute the code and have a random graph in a file, they can use the executable part.
@ahmadsalimi ahmadsalimi changed the title Extract Library from pyrgg Extract the functional part Oct 8, 2020
@sepandhaghighi
Copy link
Owner

sepandhaghighi commented Oct 8, 2020

@ahmadsalimi Hi
PyRGG originally designed as a CLI application.
But you are right, it will be useful to switch to an OOP approach with a wrapper to keep current usage.
Do you have any interest to work on it?

@ahmadsalimi
Copy link
Contributor Author

@ahmadsalimi Hi
PyRGG originally designed as a CLI application.
But you are right, it will be useful to switch to an OOP approach with a wrapper to keep current usage.
Do you have any interest to work on it?

@sepandhaghighi Hi Sepand,
I really appreciate your attention. Of course, I'm interested in contributing to this project.

@sepandhaghighi
Copy link
Owner

@sepandhaghighi Hi Sepand,
I really appreciate your attention. Of course, I'm interested in contributing to this project.

@ahmadsalimi But consider that this is a major edit.
I suggest before this issue work on #68 #43 #42, to warm up 💯
I'm waiting for your PRs

@ahmadsalimi
Copy link
Contributor Author

@ahmadsalimi But consider that this is a major edit.
I suggest before this issue work on #68 #43 #42, to warm up 💯
I'm waiting for your PRs

@sepandhaghighi Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants