Skip to main content

Setting up a dev environment

protohaven_api

To setsetup development of protohaven_api repository:

# Clone the repository
git clone git@github.com:protohaven/protohaven_api.git

# Install dependencies
cd protohaven_api
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

# Set up developmentpre-commit onvalidation hooks
pip install pre-commit
pre-commit install

# Test your setup - you should see a YAML formatted message about proposed classes 
python3 -m protohaven_api.cli class_proposals

Run Tests

To run all python tests: pytest -vv, optionally with -k test_substring to run a specific test.

Run API server code/ and/orfrontend the

wordpress
# plugins:

In
    one
  1. Browseconsole, run this to https://github.com/protohaven/start a "minimal" Flask server without enforced access control: cd protohaven_api
  2. source
venv/bin/activate MQTT=false CORS=true UNSAFE_NO_RBAC=true flask --app protohaven_api.main run # In another console, run this to start a hot-reloading Svelte dev instance: cd protohaven_api/svelte npm install npm run dev

 

TODO describe fork, installation, use of test data, connector & env flags etc.

TODO describe svelte dev env vs python dev env

Point to the repository README for details, ensure up to date

TODO pre-commit hook setup

TODO lint & other PR checks

TODO issue tracking in Github

TODO unit and integration testing philosophy

TODO summarize the full contribution process

TODO how to set up wordpress for custom plugin experimentation

TODO how to spin up a test instance of bookstack with custom logical theme stuff installed