You can join (and Star!) us on on GitHub.
We welcome all forms of contributions to Actable AI, including and not limited to:
What can I work on?
We use Github to track issues, feature requests, and bugs.
To edit the Actable source code, you’ll want to checkout the repository and also build Actable from source. Follow these instructions for building a local copy of Actble AI to easily make changes.
There are a couple steps to merge a contribution.
First merge the most recent version of master into your development branch.
git remote add upstream https://github.com/Actable-AI/actableai-app.git
git pull . upstream/master
2. Make sure all existing tests and linters pass. Run setup_hooks.sh to create a git hook that will run the linter before you push your changes.
3. If introducing a new feature or patching a bug, be sure to add new test cases in the relevant file.
4. Document the code. Public functions need to be documented, and remember to provide an usage example if applicable. See doc/README.md for instructions on editing and building public documentation.
5. Address comments on your PR. During the review process you may need to address merge conflicts with other changes. To resolve merge conflicts, run git pull . upstream/master on your branch (please do not use rebase, as it is less friendly to the GitHub review tool. All commits will be squashed on merge.)
6. Reviewers will merge and approve the pull request; be sure to ping them if the pull request is getting stale.
Actable AI organization:¶Actable AI organization:¶Even though we have hooks to run unit tests automatically for each pull request, we recommend you to run unit tests locally beforehand to reduce reviewers’ burden and speedup review process.
If you are running tests for the first time, you can install the required dependencies with:
pip install -r python/requirements.txt
pytest superset/
In general, we follow the Google style guide for code in Python. However, it is more important for code to be in a locally consistent style than to strictly follow guidelines. Whenever in doubt, follow the local code style of the component.
For Python documentation, we follow a subset of the Google pydoc format. The following code snippet demonstrates the canonical Actable AI pydoc formatting:
def canonical_doc_style(param1: int, param2: str) -> bool:
"""First sentence MUST be inline with the quotes and fit on one line.
Additional explanatory text can be added in paragraphs such as this one.
Do not introduce multi-line first sentences.
Examples:
>>> # Provide code examples as possible.
>>> canonical_doc_style(41, "hello")
True
>>> # A second example.
>>> canonical_doc_style(72, "goodbye")
False
Args:
param1: The first parameter. Do not include the types in the
docstring (they should be defined only in the signature).
Multi-line parameter docs should be indented by four spaces.
param2: The second parameter.
Returns:
The return value. Do not include types here.
"""
We also have tests for code formatting and linting that need to pass before merge.
pip install -r requirements_linters.txt
You can run the following locally:
scripts/format.sh
Other recommendations:
In Python APIs, consider forcing the use of kwargs instead of positional arguments (with the * operator). Kwargs are easier to keep backwards compatible than positional arguments, e.g. imagine if you needed to deprecate “opt1” below, it’s easier with forced kwargs:
def foo_bar(file, *, opt1=x, opt2=y)
pass
For callback APIs, consider adding a **kwargs placeholder as a “forward compatibility placeholder” in case more args need to be passed to the callback in the future, e.g.:
def tune_user_callback(model, score, **future_kwargs):
pass
We identify reviewers from active contributors. Reviewers are individuals who not only actively contribute to the project and are also willing to participate in the code review of new contributions. A pull request to the project has to be reviewed by at least one reviewer in order to be merged. There is currently no formal process, but active contributors to Actable AI will be solicited by current reviewers.