Skip to content

Developer Quick Start

Jerome Leclanche edited this page Nov 18, 2015 · 24 revisions

Fireplace is mainly a Python project, so setting up a development environment should be straightforward if you are familiar with normal Python tools, but there are a couple of wrinkles to be aware of.

Alternatively, you can use a Docker image that comes with everything pre-installed or create your own.

Instructions

  1. Install Python 3.4 or above, as well as pip, and git. It's also generally useful to set up (and activate) a venv at this time.
  2. Clone the repository locally, e.g. git clone https://github.com/jleclanche/fireplace.git
  3. Install requirements: from the root of the repository pip install -r requirements.txt
  4. Run bootstrap (on Windows, requires Powershell). This downloads and initializes card definitions.
  5. Check that everything works: from tests directory, run py.test (alternatively use python -m pytest). A successful run looks like:
============================= test session starts =============================
platform win32 -- Python 3.5.0, pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: C:\Users\liuji\Google Drive\GitHubVisualStudio\fireplace, inifile:
collected 371 items

test_exceptions.py ....................
test_hero_powers.py ......
test_interactions.py .
test_main.py .........................................................................
......................................................................................
......................................................................................
test_mechanics.py ...........................
test_selector.py ..

========================= 371 passed in 18.09 seconds =========================

The python-hearthstone dependency is unversioned, so if you run into issues, try upgrading it with pip install --upgrade --force-reinstall -r requirements.txt

Installing as a Library

  1. pip install -e git+https://github.com/jleclanche/fireplace.git#egg=fireplace
  2. pip install -r src/fireplace/requirements.txt
  3. src/fireplace/bootstrap.sh