Path of Exile Wiki:PyPoE

From Path of Exile Wiki
Revision as of 17:43, 26 September 2015 by >OmegaK2 (OmegaK2 moved page User:OmegaK2/PyPoE to PyPoE: I think it's fine for this to reside in the main name space)
Jump to navigation Jump to search

PyPoE is a python 3 based collection of development tools to work with Path of Exile developed by User:OmegaK2.

It is currently in a development alpha, which means it is neither feature complete nor well-tested and subject to frequent changes.

Overview

Goals of the Project

  • provide a mostly complete and stable python3 api to work with Path of Exile and it's files
  • have a stable and useful UI binding to browse the files
  • provide CLI tools for extracting files for convince
  • provide utilities to publish the data on the Path of Exile wiki

Features

  • Development Library
  • Graphical User Interface (UI or GUI)
  • Command Line Interface (CLI)

Installation

These installation instructions are currently aimed at development builds.

Prerequisites

Python 3.4

Windows:

  • Navigate to https://www.python.org/downloads/ and download the latest version of python 3.4
  • Install and follow the instructions on screen
  • In particular make sure the Python executable as well as the scripts folder are located in the %PATH% variable

Linux:

  • Ubuntu/Debian: apt-get install python3

Git

Windows:

  • Navigate to https://git-scm.com/ and download the latest version of git
  • Make sure git is added to the %PATH% variable on windows

Linux:

  • Ubuntu/Debian: apt-get install pip

QT4 (UI only, Linux only)

See http://pyside.readthedocs.org/en/latest/building/linux.html for details.


Installing PyPoE

It is highly recommended to use the development build if no stable release is available, so updates from git apply to the install.

Linux:

  • On many distributions, python and pip can link to either version 2 or version 3 depending on the system defaults, instead consider using
    • python3 instead of python
    • pip3 instead of pip

Navigating to the folder

  • Open a command line (Windows: cmd.exe )
  • Navigate to the folder you want to have PyPoE installed to/from
  • Run git clone https://github.com/OmegaK2/PyPoE/tree/dev/
  • Go into the checkout folder where setup.py resides

Running pip

To use the development install (it makes the files editable), specify -e.

By default, PyPoE only installs the dependencies for the core (PyPoE.poe). However, there are additional packages available:

Group description
ui GUI support
cli CLI support
cli-wikibot Support for the --wiki option in the wiki exporter
dev Development libraries (i.e. for tests & generating documentation)

The base command for installing is:

pip install -e .

If you wish to add any extra packges, add them in a comma-separated list in brackets behind the dot:

pip install -e .[ui,cli,cli-wikibot,dev]

Reporting an issue

First, make sure the issue isn't known already:

If not, post an issue on github and provide the following

  • title: short description of the bug
  • detailed description of the bug
  • if available, provide the relevant traceback
  • if available, provide the relevant code that caused the bug (i.e. if your own code)

You can also submit pull requests that to help fix bugs, I'll review (and possibly) edit them. You agree they'll placed under the MIT license. Also see Contributing

Contributing

Everyone is generally welcome to contribute to the project.

There are basically 3 ways to do so:

  • Feature requests & reporting issues
  • Sending pull requests
  • Becoming a dev

Pull requests

You're welcome to send a pull request on github for features or changes you think that should be in PyPoE.

Please keep a few things in mind:

  • the code in the request should be well behaved and a proper fix or addition
  • the change should be under the MIT license
  • if it's an entirely new feature, it may debatable whether it is has a place in PyPoE
  • the submitted code should:
    • be well behaved and a proper fix or addition
    • be PEP8 compatible (minus the line-length)
    • include changes in the respective tests or new tests
    • validate against existing tests (if tests were changed, validate against those)
  • backwards incompatible changes are more suited for the dev branch

So for example:

  • Likely to be accepted
    • general improvements to existing code of UI, CLI or API
    • new, well-behaved features that extend the existing functional
    • support for missing file formats
    • updated dat.specification.ini
    • additional tests
  • Likely to be rejected
    • changes unrelated to the goal of the project
    • refusal of making the change itself available under MIT license
    • changes with poor coding style

Become a dev

If you want to become an active developer and meet the requirements please contact me. I'll manually unlock people for access to the repo.

Notes:

  • If you just want to contribute a few changes, there is no need to become a dev and you can send pull requests instead.
  • If you just want your own repo, just fork the project on github

Requirements:

  • You should
    • have a good amount of experience with developing in Python 3
    • be willing to actively contribute, i.e. making changes on your own, working on the TODOs
    • be fluent in English (written); no you don't have to be a perfect speaker, but you're English should be good enough to have no issues with communication
    • be available in the IRC channel
  • I'll want to see some pieces of code you've written; a good history of pull requests will suffice, otherwise:
    • another open source project you've been involved in,
    • some private things you've written but are willing to let me have a look at

It would be extra helpful, if you:

  • have experience with C/C++ and writing embedded python libraries with C/API
  • have a lot of experience with Path of Exile [for the api]
  • are experienced with using Mediawiki [for exporter]
  • speak other languages fluently or natively [for translating the project]
  • are adept with reverse engineering [to help with api]

Structure

Folder Description
/ The root folder of the project
/PyPoE/ The root python folder
/PyPoE/_data/ Shared data used by the other files. For example, the specifications for the .dat files reside there.
/PyPoE/poe The core API to work with Path of Exile; this will be of primary interest to other developers that want to use the API.
/PyPoE/shared Core libraries and functions that are not specific to path of exile
/PyPoE/cli Libraries and functions for the command line interface of PyPoE
/PyPoE/ui Libraries and functions for the QT4 based user interface of PyPoE
/scripts/ Collection of scripts intended to be invoked from the command line.
/tests/ pytest based tests for the library and scripts