An otree experiment for testing unstructured bargaining in a specific context.
The recommended way to install the project is using pixi, which manages both conda and pip dependencies across all platforms.
Install pixi following the installation instructions, then simply run:
pixi installThat's it! All dependencies will be installed automatically.
uv
Alternatively, you can use uv for a fast Python package manager.
Create the environment with Python 3.12:
uv venv --python 3.12Activate the environment:
source .venv/bin/activate # Linux/Mac
.venv/Scripts/activate # WindowsThen install the requirements:
uv pip install -r requirements.txtTo set up pre-commit hooks for code quality checks:
pixi run pre-commit-installThis will run linting and formatting checks automatically on every commit.
Without pixi
You'll need to install pre-commit manually (e.g., with pip or your package manager) and then run:
pre-commit installOpen a terminal in the project folder and run:
pixi run devWithout pixi
otree devserverThen navigate to http://localhost:8000 in your browser. You can stop the server by pressing Ctrl+c in your terminal window.
The Procfile is set up to start a production server on Heroku. Simply create an app, assign a dyno and a Postgres database, and deploy the app from this repo.
The project has a number of tests and code quality checks. Please make sure that all checks pass before merging to the main branch.
Running tests locally:
pixi run test # Run oTree tests with botsRunning linting and type checks locally:
pixi run lint # Run all linting checks (ruff, codespell, pyright)Without pixi
Make sure that pre-commit and pyright are installed and available in your PATH.
Then run:
otree test # Run oTree tests
pre-commit run --all-files # Run ruff and codespell
pyright # Run type checkingThe project is set up with GitHub Actions to run these checks automatically on every push and pull request to the main branch.
Checks performed by CI
otree testfor playing the experiment with automated botspyrightfor Python type checkingruff checkfor Python code styleruff formatfor Python code formattingcodespellfor spell checking