Skip to content
Mariano Reingart edited this page Mar 19, 2022 · 8 revisions

Quick Start Tutorial

Pre-requisites

You need to create a GitHub account and fork the project: https://docs.github.com/es/repositories/creating-and-managing-repositories/cloning-a-repository

Installation (dev environment)

Download the source code:

git clone https://github.com/PyAr/PyZombis.git
cd PyZombis

Create a virtual environment:

# linux:
virtualenv .venv
# windows:
python3 -m venv .venv

Activate the virtual environment:

# linux:
. .venv/bin/activate
# windows:
venv\bin\activate

Install the dependencies:

pip install -r requirements.txt

Finally, install End2End test framework (browsers):

python -m playwright install

Ubuntu needs some additional packages:

sudo apt-get install libatk1.0-0 libatk-bridge2.0-0 libxkbcommon0 libgbm1 libpango-1.0-0 libatspi2.0-0

Build and serve the book

You need to activate the virtual environment (previous step)

To "compile" the code and create the interactive book pages, run:

runestone build

Then you can start a minimal webserver to browse the book at http://localhost:8080/

runestone serve

Run the tests

You need to activate the virtual environment (previous step) You need to have running the webserver in background (see previous step)

pytest

Write a new E2E test:

Run the test generator to record your actions: https://playwright.dev/python/docs/codegen

playwright codegen http://localhost:8080/