An implementation of the MBO scheme on graphs.
To install Graph MBO, run this command in your terminal:
$ pip install -U graph-mbo
This is the preferred method to install Graph MBO, as it will always install the most recent stable release.
If you don't have pip installed, these installation instructions can guide you through the process.
>>> import networkx as nx
>>> from graph_mbo import graph_mbo
>>> G = nx.karate_club_graph()
>>> adj = nx.convert_matrix.to_numpy_matrix(G)
>>> u = graph_mbo(adj, pseudospectral=False, symmetric=True, signless=False)
If you use our work in an academic setting, please cite our paper:
TODO: readthedocs For more information, read the docs.
See CONTRIBUTING.md for information related to developing the code.
master
is for the most up-to-date development, very rarely should you directly commit to this branch. Your day-to-day work should exist on branches separate frommaster
. It is recommended to commit to development branches and make pull requests to master.3. Even if it is just yourself working on the repository, make a pull request from your working branch tomaster
so that you can ensure your commits don't break the development head. GitHub Actions will run on every push to any branch or any pull request from any branch to any other branch.4. It is recommended to use "Squash and Merge" commits when committing PR's. It makes each set of changes tomaster
atomic and as a side effect naturally encourages small well defined PR's.
-
Create an initial release to test.PyPI and PyPI.
- Follow This PyPA tutorial, starting from the "Generating distribution archives" section.
-
Create a blank github repository (without a README or .gitignore) and push the code to it.
-
Create an account on codecov.io and link it with your GitHub account. Code coverage should be updated automatically when you commit to
master
. -
Add branch protections to
master
- Go to your GitHub repository's settings and under the
Branches
tab, clickAdd rule
and select the settings you believe best. - Recommendations:
- Require status checks to pass before merging
- Go to your GitHub repository's settings and under the
-
Setup readthedocs. Create an account on readthedocs.org and link it to your GitHub account.
- Go to your account page and select "Import a Project".
- Select the desired GitHub repository from the list, refreshing first if it is not present.
- Go to the admin panel of the new project and make some changes to the "advanced settings":
- Enable "Show version warning"
- Enter "rtd-reqs.txt" into the "Requirements file" field
- Enable "Install Project"
- Enable "Use system packages"
- Make sure to click save at the bottom when you are finished editing the settings
-
Delete these setup instructions from
README.md
when you are finished with them.