Skip to content

Latest commit

 

History

History
70 lines (52 loc) · 3.2 KB

CONTRIBUTING.md

File metadata and controls

70 lines (52 loc) · 3.2 KB

Contributing Guidelines

Thanks for contributing to the wq framework! Here are some guidelines to help you get started.

Questions

Questions and ideas can be submitted to the main wq discussion board.

Bug Reports

wq is a highly modular framework and the code is split across several repositories. If you are unsure where to report an issue, feel free to use the top-level wq repository. Otherwise, enter your issue on the repository that most closely matches the component you are using.

  • wq: General API design & documentation
  • wq.app: JavaScript client & build tool
  • wq.build: CLI & Project build tools
  • wq.create: wq create command & project templates
  • wq.db: Web server & REST API (Django REST Framework)
  • xlsconv: XLSForm converter

Don't worry about getting the repository exactly right - many issues span multiple repositories and we can always reference the fix back to the original ticket.

Pull Requests

Pull requests are very welcome and will be reviewed and merged as time allows. To speed up reviews, try to include the following whenever possible:

  • Reference the issue that the PR fixes (e.g. #22 or wq/wq#22 if in a different repository).
  • Failing test case fixed by the PR
  • If the PR provides new functionality, a separate PR updating the wq documentation.
  • Ensure the PR passes lint and unit tests. This happens automatically, but you can also run these locally with the following commands:
python -m unittest discover -s tests -t . # run the test suite
flake8 # run code style checking

If you would like help implementing any part of your PR, feel free to enable write access and we'll take a look as time allows.

Development & Testing

Small changes and documentation fixes can usually be done using Github's online file editors. For larger changes, we recommend the following workflow.

Because wq is split across several repositories, we recommend installing the wq package, starting a test project, and then cloning the specific module you want to update. For example, to work on wq.db, clone it to your account and then do something like this:

Initial Setup

# Initialize workspace & test project
WORKSPACE=~/devel/
mkdir $WORKSPACE && cd $WORKSPACE
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install wq
wq create -d test.wq.io testproject .

# Clone wq.db from fork
git clone [email protected]:[my-username]/wq.db.git
cd wq.db
git checkout -b my-wqdb-branch

Ongoing Development

cd $WORKSPACE/wq.db
vim wq/db/rest/some_file.py # (make changes to wq.db)
python -m unittest discover -s tests -t . # run the test suite
flake8 # run code style checking

pip install --upgrade .  # overwrites PyPI wq.db with local version
cd $WORKSPACE/
./deploy.sh 0.0.$RANDOM