GithubHelp home page GithubHelp logo

dannygoodall / py3minepi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from py3minepi/py3minepi-legacy

0.0 2.0 0.0 3.18 MB

Porting Minecraft Pi to Python 3

License: Other

Shell 9.50% Python 90.50%

py3minepi's Introduction

README

Build status Coverage Code Health

Minecraft: Pi Edition is awesome.

However it uses Python 2. We're moving it to Python 3 (without any official approval) and offering it for download here.

We hope this makes people's lives easier.

Goals

  • [x] Python 3
  • [ ] TESTS (pytest, tox, flake8, coverage)
  • [ ] More intuitive API focusing on getting some mining done and hiding implementation details
  • [ ] Backwards compatibility with the existing codebase (with __init__ foo) so existing scripts will continue to work
  • [ ] Connection backends (socket, in memory for testing)
  • [ ] Clever socket usage so disconnects can be dealt with
  • [ ] Make the code base more readable and thus maintainable
  • [ ] A CI test suite running an rPi emulator (with Travis)
  • [ ] Improve code documentation both in the code base and with a RTD page
  • [ ] Find missing functions that are in the java API but not described in the python API

Coding Guidelines

All code (except legacy API compatibility code) should adhere to PEP8 with some exceptions:

  • Try to keep your line length below 80, but if it looks better then use up to 99 characters per line.
  • You can ignore the following three PEP8 rules: E126 (continuation line over-indented for hanging indent), E127 (continuation line over-indented for visual indent), E128 (continuation line under-indented for visual indent).

You can check the code style for example by using flake8.

Some other things you should keep in mind:

  • Function names should mirror ingame commands where possible.
  • Group imports into three groups: First stdlib imports, then third party imports, then local imports. Put an empty line between each group.
  • Backwards compatibility must be maintained unless you have a very compelling reason.
  • KISS!

For backwards compatibility with Python 2, please insert this header in every Python module:

# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import, unicode_literals

Testing

Testing for py3minepi is set up using Tox and pytest. Violations of the coding guidelines are counted as test fails.

The only requirement to run the tests is tox:

$ pip install tox

Running tests

To run the tests on all supported Python versions, simply issue

$ tox

To test only a single Python version, use the -e parameter:

$ tox -e py32

To see the test coverage, use the cov testenv (which uses Python 3.2 by default):

$ tox -e cov

All Python versions you need to test on need to be installed of course.

Links

py3minepi's People

Contributors

doismellburning avatar ghickman avatar lurimax-north avatar hashbangstudio avatar dbrgn avatar jonathanfine avatar bennuttall avatar pozorvlak avatar

Watchers

James Cloos avatar Danny Goodall avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.