Skip to content

Developer Quick Start

riQQ edited this page Jul 1, 2021 · 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 .
  4. 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. ./setup.py install

Start contributing

Great, you're now all set and ready to contribute to Fireplace. Please take a look at CONTRIBUTING.md before you start coding. If you need any help or would like to participate in the development discussions, simply join #Hearthsim on Freenode.