Skip to content

Extract the functional part #73

@ahmadsalimi

Description

@ahmadsalimi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions