Skip to content

Commit

Permalink
update contributing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Jun 21, 2023
1 parent 7e9e157 commit d78b3ae
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ Thanks for contributing to the wq framework! Here are some guidelines to help y

## Questions

Feel free to use the issue tracker to ask questions! We don't currently have a separate mailing list or active chat tool. However, note that as wq grows we may eventually move questions to a separate tool.
Questions and ideas can be submitted to the main [wq discussion board](https://github.com/wq/wq/discussions).

## 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](https://github.com/wq/wq/issues). Otherwise, enter your issue on the repository that most closely matches the component you are using.

* [wq](https://github.com/wq/wq/issues): General API design & documentation
* [wq.app](https://github.com/wq/wq.app/issues): JavaScript client & build tool
* [wq.build](https://github.com/wq/wq.build/issues): CLI & Project build tools
* [wq.create](https://github.com/wq/wq.create/issues): `wq create` command & project templates
* [wq.db](https://github.com/wq/wq.db/issues): Web server & REST API (Django REST Framework)
* [wq.start](https://github.com/wq/wq.start/issues): `wq start` command & questions about getting started
* [xlsconv](https://github.com/wq/xlsform-converter/issues): XLSForm converter and default HTML templates
* [xlsconv](https://github.com/wq/xlsform-converter/issues): 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.

Expand All @@ -23,12 +24,12 @@ Don't worry about getting the repository exactly right - many issues span multip
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](https://github.com/wq/wq/issues/22) or [wq/wq#22](https://github.com/wq/wq/issues/22) if in a different repository).
* Failing test case fixed by the PR
* If the PR provides new functionality to wq, a separate PR updating the [wq documentation](https://github.com/wq/wq/tree/master/docs).
* If the PR provides new functionality, a separate PR updating the [wq documentation](https://github.com/wq/wq/tree/main/docs).
* Ensure the PR passes lint and unit tests. This happens automatically, but you can also run these locally with the following commands:

```bash
./runtests.sh # run the test suite
LINT=1 ./runtests.sh # run code style checking
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.
Expand All @@ -37,7 +38,7 @@ If you would like help implementing any part of your PR, feel free to enable wri

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 entire suite from PyPI, starting a test project, and then cloning the specific module you want to update. For example, to work on [wq.db](https://github.com/wq/wq.db), clone it to your account and then do something like this:
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.app](https://github.com/wq/wq.app), clone it to your account and then do something like this:

### Initial Setup
```bash
Expand All @@ -48,21 +49,28 @@ python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install wq
wq start -d test.wq.io testproject .
wq create -d test.wq.io testproject .

# Clone wq.db from fork
git clone git@github.com:[my-username]/wq.db.git
cd wq.db
git checkout -b my-wqdb-branch
# Clone wq.app from fork
git clone git@github.com:[my-username]/wq.app.git
cd wq.app
git checkout -b my-wqapp-branch
```

While wq.app is distributed as a Python wheel, it consists primarily of JavaScript and CSS files built via npm. Development of wq.app requires npm installation as well.

### Ongoing Development
```bash
cd $WORKSPACE/wq.db
vim rest/some_file.py # (make changes to wq.db)
./runtests.sh # run the test suite
LINT=1 ./runtests.sh # run code style checking
cd $WORKSPACE/wq.app
npm install # install NPM dependencies
vim packages/app/src/app.js # (make changes a wq.app source file)
npm run test # run the test suite
npm run lint # run static error checker
npm run prettier-all # run code formatter

pip install --upgrade . # overwrites PyPI wq.db with local version
python -m packages.builder # Regenerate SHA hashes (recommended for commit)
python -m build
pip install dist/*.whl # overwrites PyPI wq.app with local version
cd $WORKSPACE/
./deploy.sh 0.0.$RANDOM
```

0 comments on commit d78b3ae

Please sign in to comment.