Skip to content

Latest commit

 

History

History
94 lines (65 loc) · 3.09 KB

File metadata and controls

94 lines (65 loc) · 3.09 KB

Building and Testing RDS-Python

This document describes how to set up your development environment to build and test RDS-Python. It also explains the basic mechanics of using git.

See the contribution guidelines if you'd like to contribute to RDS-Python.

Prerequisite Software

Before you can build and test RDS-Python, you must install and configure the following products on your development machine:

Getting the Sources

Fork and clone the RDS-Python repository:

  1. Login to your GitHub account or create one by following the instructions given here.
  2. Fork the RDS-Python repository.
  3. Clone your fork of the RDS-Python repository and define an upstream remote pointing back to the RDS-Python repository that you forked in the first place.
# Clone your GitHub repository:
git clone git@github.com:<github username>/rds-python.git

# Go to the RDS-Python directory:
cd rds-python

# Add the main RDS-Python repository as an upstream remote to your repository:
git remote add upstream https://github.com/mtna/rds-python.git

Installing Python Modules

Next, install the Python modules needed to test RDS-Python:

# Install RDS-Python project dependencies
pip install pytest
pip install black
pip install pyflakes

Building

To build RDS-Python run:

python setup.py build
  • Results are put in the dist/ folder.

Running Tests Locally

Pytest is used as the primary tool for testing RDS-Python.

You should execute all test suites before submitting a PR to GitHub:

  • pytest

All the tests are executed on our Continuous Integration infrastructure. PRs can only be merged if the code is formatted properly and all tests are passing.

Formatting your source code

RDS-Python uses black to format the source code. If the source code is not properly formatted, the CI will fail and the PR cannot be merged.

You can automatically format your code by running:

  • black {source_file_or_directory}

Linting/verifying your Source Code

You can check that your code is properly formatted and adheres to coding style by running:

  • pyflakes {source_file_or_directory}