Phasme
Graph with ASP made easy.
Use cases
Write an ASP graph into gexf
phasme convert data.lp target.gexf
Rewrite a gml graph with normalized node names
phasme convert data.gml --normalized
Extract the biggest cc, write it anonymized in gml
phasme split data.lp --biggest-first "data_cc.lp" --slice 0 1
phasme convert data_cc_1.lp target.gml --anonymized
Generate a small world graph in gml
phasme generate data.gml erdos_renyi_graph n=100 p=0.01
Packaging
pip install phasme
Will also populate your env with the executable phasme,
enabling access to the CLI.
CLI commands
CLI provides access to higher level routines.
split: split by connected component.info: give info about given graph.convert: rewrite, anonymize, normalize or convert the graph to (clean) ASP or standard format.generate: generate a graph using a given generation method.
Other examples
# split a graph by cc
python -m phasme split data.lp -o "data_{}.lp"
# get infos
python -m phasme infos data.lp --graph-properties
# there is a shitload of options
python -m phasme infos --help
# conversions between formats
python -m phasme convert data.lp data.gml --anonymize
# generation of new graphs to play with
python -m phasme generate graph.gml powerlaw_cluster_graph n=5 m=2 p=0.01
# ready-to-draw tikz visualization of ASP graph
python -m phasme convert data.lp graph-in-latex-tikz.tex
# randomize a graph, keeping the same degree distribution, using switching method
python -m phasme randomize data.lp randomized-graph.gml
Changelog
- 0.0.14
- 0.0.13
- randomize:
--per-ccoption to run it on each connected component independantly
- randomize:
- 0.0.12
- new subcommand: randomize, to build a random graph based on another
- new subcommand: extract, to extract subgraphs based on their nodes
- convert: new output format: latex/tikz
- infos: give infos on articulation points
- infos: indicate number of self loops, if any, or give property 'no loop'
Metadata
Release files for phasme 0.0.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phasme-0.0.16.tar.gz | 10.4 kB | Without provenance | Details for phasme-0.0.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phasme-0.0.16-py3-none-any.whl | Python 3 | none | any | Details for phasme-0.0.16-py3-none-any.whl |
Total release size: 24.7 kB
Release files / phasme-0.0.16.tar.gz
| Download URL | phasme-0.0.16.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9dbbbac1db400755475fb1def2763e6517e5e1ba0fa3df85693958b3453de13
|
|
BLAKE2b-256 checksum How to use checksums |
09e1693f3db4080d8a93b5ccf949bae7c1d01c1ece033ff8c9a1b7fa25eb7472
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
|
Release files / phasme-0.0.16-py3-none-any.whl
| Download URL | phasme-0.0.16-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5472b3aa2dee77a03c702badbff420acde532c796599c08ced377c898346310e
|
|
BLAKE2b-256 checksum How to use checksums |
2a9b85807455b574c1a6e4f44b3178a5869979ba6664e535f1cfa637ad914c19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
|
Security for phasme 0.0.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.