Skip to content

Latest commit

 

History

History
112 lines (81 loc) · 3.2 KB

CONTRIBUTING.md

File metadata and controls

112 lines (81 loc) · 3.2 KB

TabPy Contributing Guide

Environment Setup

The purpose of this guide is to enable developers of Tabpy to install the project and run it locally.

Prerequisites

These are prerequisites for an environment required for a contributor to be able to work on TabPy changes:

  • Python 3.6.5:
    • To see which version of Python you have installed, run python --version.
  • git
  • TabPy repo:
    • Get the latest TabPy repository with git clone https://github.com/tableau/TabPy.git
    • Create a new branch for your changes.
    • When changes are ready push them on github and create merge request.

Windows Specific Steps

  1. Open a windows command prompt.

  2. In the command prompt, navigate to the folder in which you would like to save your local TabPy repository.

  3. In the command prompt, enter the following commands:

    git clone https://github.com/tableau/TabPy.git
    cd TabPy

To start a local TabPy instance:

startup.cmd

To run the unit test suite:

python tests\runtests.py

Linux and Mac Specific Steps

If you have downloaded Tabpy and would like to manually install Tabpy Server not using pip then follow the steps below to run TabPy in Python virtual environment.

Documentation Updates

For any process, scripts or API changes documentation needs to be updated accordingly. Please use markdown validation tools like web-basedmarkdownlint or npm markdownlint-cli.

TOC for markdown file is built with markdown-toc:

markdownlint -i docs/server-startup.md

TabPy with Swagger

You can invoke TabPy Server API against running TabPy instance with Swagger:

  • Make CORS related changes in TabPy configuration file: update tabpy-server\state.ini file in your local repository to have the next settings:
[Service Info]
Access-Control-Allow-Origin = *
Access-Control-Allow-Headers = Origin, X-Requested-with, Content-Type
Access-Control-Allow-Methods = GET, OPTIONS, POST

Code styling

On github repo for merge request pycodestyle is used to check Python code against our style conventions. You can run install it and run locally for file where modifications were made:

pip install pycodestyle
pycodestyle <file.py>

For reported errors and warnings either fix them manually or auto-format files with autopep8:

pip install autopep8
autopep8 -i <file.py>