This guide will tell how to contribute to pyGOD at the beginning stage. This guide may change subject to the development process. Part of this guide is from DGL docs.
You are welcome to contribute to this exciting project:
- Please first check Issue lists for "help wanted" tag and comment the one you are interested. We will assign the issue to you.
- Fork the main branch and add your improvement/modification/fix.
- Create a pull request to dev branch and follow the pull request template PR template
- Automatic tests will be triggered. Make sure all tests are passed. Please make sure all added modules are accompanied by proper test functions.
- To make sure the code has the same style and standard, please refer to gcnae.py and dominant.py, for example.
For python codes, we generally follow the PEP8 style guide. The python comments follow NumPy style python docstrings.
We tweak it a little from the standard. For example, following variable names are accepted:
i,j,k
: for loop variablesu,v
: for representing nodese
: for representing edgesg
: for representing graphfn
: for representing functionsn,m
: for representing sizesw,x,y
: for representing weight, input, output tensors_
: for unused variables
To prevent the problems induced by inconsistent versions of dependencies, following requirements are suggested.
- python>=3.6
- torch>=1.10.1
- torch_geometry>=2.0.3
Please follow the installation guide for more details.
To contribute a new model, simply
- Make a new file with the name of your model (say
awesome-gnn.py
) within the directorypygod/models
. - Populate it with your work, a minimal example file to demonstrate its effectiveness, such like dominant example.
- Add a corresponding test file. See test repo for example.
- Run the entire test folder to make sure nothing is broken locally.
- Make a pull request once you are done to the dev branch. Brief explain your development.
- We will review your PR if the tests are successful :)