Developers Guide
This guide is to help developers get familiar with the project. Please see developer-specific Slides, Video, and Research paper.
Development Environment
Ideally, developers should work on Ubuntu/Linux. Other operating systems are not supported inherently and may require additional steps.
To start with, install the required software and git-hooks.
The git-hooks will ensure that your commits are formatted correctly and that the tests pass before you push the commits to remote repositories.
You can also run the git-hooks manually before committing or pushing by using the run commands below. The autoupdate command will set the revisions of the git repos used in the .pre-commit-config.yaml up to date.
Be aware that the tests may take a long time to run.
If you want to skip the tests or formatting,
you can use the --no-verify
flag
on git commit
or git push
. Please use this
option with care.
There is a script to download all the docker containers used in the project. You can download them using
The docker images are large and are likely to consume about 5GB of bandwidth and 15GB of space. You will have to download the docker images on a really good network.
Development Workflow
To manage collaboration by multiple developers on the software, a development workflow is in place. Each developer should follow these steps:
- Fork of the main repository into your github account.
- Setup Code Climate and Codecov for your fork. The codecov does not require secret token for public repositories.
- Install git-hooks for the project.
- Use Fork, Branch, PR workflow.
- Work in your fork and open a PR from your working
branch to your
feature/distributed-demo
branch. The PR will run all the github actions, code climate and codecov checks. - Resolve all the issues identified in the previous step.
- If you have access to the integration server, try your working branch on the integration server.
- Once changes are verified, a PR should be made to
the
feature/distributed-demo
branch of the upstream DTaaS repository. - The PR will be merged after checks by either the project administrators or the maintainers.
Remember that every PR should be meaningful and satisfies a well-defined user story or improve the code quality.
Code Quality
The project code qualities are measured based on:
- Linting issues identified by Code Climate
- Test coverage report collected by Codecov
- Successful github actions
Code Climate
Code Climate performs static analysis, linting and style checks. Quality checks are performed by codeclimate are to ensure the best possible quality of code to add to our project.
While any new issues introduced in your code would be shown in the PR page itself, to address any specific issue, you can visit the issues or code section of the codeclimate page.
It is highly recommended that any code you add does not introduce new quality issues. If they are introduced, they should be fixed immediately using the appropriate suggestions from Code Climate, or in worst case, adding a ignore flag (To be used with caution).
Codecov
Codecov keeps track of the test coverage for the entire project. For information about testing and workflow related to that, please see the testing page.
Github Actions
The project has multiple github actions defined. All PRs and direct code commits must have successful status on github actions.