{"id":19320490,"url":"https://github.com/aluriak/phasme","last_synced_at":"2026-03-03T17:33:12.560Z","repository":{"id":57435776,"uuid":"126090710","full_name":"Aluriak/phasme","owner":"Aluriak","description":"(ASP) graph handling made easy","archived":false,"fork":false,"pushed_at":"2019-11-08T10:55:06.000Z","size":66,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-08T09:38:00.192Z","etag":null,"topics":["answer-set-programming","graph","graph-theory","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aluriak.png","metadata":{"files":{"readme":"README.mkd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-20T22:29:25.000Z","updated_at":"2022-11-01T09:55:51.000Z","dependencies_parsed_at":"2022-09-01T16:51:58.887Z","dependency_job_id":null,"html_url":"https://github.com/Aluriak/phasme","commit_stats":null,"previous_names":["aluriak/grasp"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2Fphasme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2Fphasme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2Fphasme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aluriak%2Fphasme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aluriak","download_url":"https://codeload.github.com/Aluriak/phasme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223902895,"owners_count":17222450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["answer-set-programming","graph","graph-theory","python"],"created_at":"2024-11-10T01:29:14.764Z","updated_at":"2026-03-03T17:33:12.511Z","avatar_url":"https://github.com/Aluriak.png","language":"Python","readme":"# Phasme\nGraph with ASP made easy.\n\n\n\n## Use cases\n\n### Write an ASP graph into gexf\n\n    phasme convert data.lp target.gexf\n\n### Rewrite a gml graph with normalized node names\n\n    phasme convert data.gml --normalized\n\n### Extract the biggest cc, write it anonymized in gml\n\n    phasme split data.lp --biggest-first \"data_cc.lp\" --slice 0 1\n    phasme convert data_cc_1.lp target.gml --anonymized\n\n### Generate a small world graph in gml\n\n    phasme generate data.gml erdos_renyi_graph n=100 p=0.01\n\n\n## Packaging\n\n    pip install phasme\n\nWill also populate your env with the executable `phasme`,\nenabling access to the CLI.\n\n\n## CLI commands\nCLI provides access to higher level [routines](phasme/routines.py).\n\n- `split`: split by connected component.\n- `info`: give info about given graph.\n- `convert`: rewrite, anonymize, normalize or convert the graph to (clean) ASP or standard format.\n- `generate`: generate a graph using a given generation method.\n\u003c!-- - `compress`: produce the powergraph compression of given graph as a bubble file --\u003e\n\u003c!-- - ``:  --\u003e\n\n### Other examples\n\n    # split a graph by cc\n    python -m phasme split data.lp -o \"data_{}.lp\"\n\n    # get infos\n    python -m phasme infos data.lp --graph-properties\n\n    # there is a shitload of options\n    python -m phasme infos --help\n\n    # conversions between formats\n    python -m phasme convert data.lp data.gml --anonymize\n\n    # generation of new graphs to play with\n    python -m phasme generate graph.gml powerlaw_cluster_graph n=5 m=2 p=0.01\n\n    # ready-to-draw tikz visualization of ASP graph\n    python -m phasme convert data.lp graph-in-latex-tikz.tex\n\n    # randomize a graph, keeping the same degree distribution, using switching method\n    python -m phasme randomize data.lp randomized-graph.gml\n\n\n## Changelog\n\n- 0.0.14\n- 0.0.13\n    - randomize: `--per-cc` option to run it on each connected component independantly\n- 0.0.12\n    - new subcommand: *randomize*, to build a random graph based on another\n    - new subcommand: *extract*, to extract subgraphs based on their nodes\n    - convert: new output format: latex/tikz\n    - infos: give infos on articulation points\n    - infos: indicate number of self loops, if any, or give property 'no loop'\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faluriak%2Fphasme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faluriak%2Fphasme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faluriak%2Fphasme/lists"}