Welcome! First, many thanks if you are willing to contribute to this project. Everyone is welcome.
BGraph
and its inner-workings are explained in the Innerworkings part of the documentation.
The code is mainly split in three parts.
The builder is responsible for the logic around fetching build compilation directives. Today it is tightly coupled with AOSP. The graph part of the builder convert a soong file into an Unified Depency Graph.
It is the place where the build compilation directives files are analyzed. Today, only blueprints (Soong configuration files) are analyzed. But if you want to add the support for another kind of file, it is the place to go.
!!! note Start a Pull Request/Issue before starting to work on it as it requires some refactoring in the code.
Everything that deals with the querying and outputting results on bgraphs
is stored there.
There aren't many tests written for the project yet, and even most of the Soong Parser isn't properly tested. However, the few tests that are present are runned using the following snippet.
$ poetry install # To install with dev-dependencies
$ poetry run pytest --cov=bgraph # To run the tests
Contributions are encouraged to add tests.
The code follow a strict black formatting.
To run the linter:
$ poetry run black src tests
The code normally pass mypy checks without problems.
$ poetry run mypy src/