Note: This document contains contribution guidelines for the Elementary CLI. If you wish to contribute to the Elementary dbt package, please refer to the dbt package contribution guidelines.
git clone https://github.com/elementary-data/elementary.git
cd elementary
python3 -m venv venv
source venv/bin/activate
pip install -r dev-requirements.txt
pip install -e .
You're done. Running edr
will now run the code in your local repository.
If you're looking for things to help with, browse our issue tracker!
In particular, look for:
You do not need to ask for permission to work on any of these issues. Just fix the issue yourself and open a pull request.
To get help fixing a specific issue, it's often best to comment on the issue itself. You're much more likely to get help if you provide details about what you've tried and where you've looked. Slack can also be a good place to ask for help.
Even more excellent than a good bug report is a fix for a bug, or the implementation of a much-needed new feature. We'd love to have your contributions.
We use the usual GitHub pull-request flow, which may be familiar to you if you've contributed to other projects on GitHub. For the mechanics, view this guide.
If your change will be a significant amount of work to write, we highly recommend starting by opening an issue laying out what you want to do. That lets a conversation happen early in case other contributors disagree with what you'd like to do or have ideas that will help you do it.
The best pull requests are focused, clearly describe what they're for and why they're correct, and contain tests for whatever changes they make to the code's behavior. As a bonus these are easiest for someone to review, which helps your pull request get merged quickly!
For every PR we merge, we require our unit-tests to pass successfully. We also encourage you to add new unit-tests for any new functionality you added.
The tests are located under the tests/unit
directory, and written using the
py-test framework.
In order to run them, please follow these steps:
- Install dependencies:
# Run in the root directory of the repository
pip install -r dev-requirements.txt
- Run the tests:
cd tests
py.test -vvv --target <your_target>
We use several pre-commit hooks in order to ensure code quality. These will also run in the CI, but we also recommend to install them locally using the following command (requires installing the dev-requirements as shown in the previous section):
# Run in the root directory of the repository
pre-commit install