Familiarity with the concepts covered in the following sections are highly recommended:
Getting Started
User Guide
Plugin Parts
We highly recommend becoming an expert Metagraph user before contributing to Metagraph itself.
Additionally, we highly recommend reading our GitHub repository’s README.
We use Black to format our code.
We use pre-commit to have a pre-commit Git hook that runs Black to format our code prior to committing. You can do the same by running pre-commit install at the top-level of your Metagraph checkout.
pre-commit install
We maintain our dependencies via conda.
If your proposed changes require any new dependencies, it’s necessary to update the environment.yml accordingly to avoid dependency issues for users and fellow developers.
environment.yml
We conventionally use f-string formatting rather than string formatting via ‘%’ or ‘.format()’.
‘%’
‘.format()’
These are style guidelines for how to contribute to the core plugins.
Each core plugin is stored under its own plugin directory under metagraph/plugins/.
metagraph/plugins/
The Plugin Author Guide describes 3 main plugin parts, i.e. algorithms, translators, and types.
We conventionally compartmentalize these into their own modules under the plugin directory as algorithms.py, translators.py, and types.py.
algorithms.py
translators.py
types.py
We conventionally make them available by importing them in the __init__.py of the plugin directory.
__init__.py