diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..4c1404f --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,13 @@ +--- +engines: + fixme: + enabled: true + pep8: + enabled: true + radon: + enabled: true +ratings: + paths: + - "**.py" +exclude_paths: +- tests/**/* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1b452a9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +sudo: false +notifications: + email: false +language: python +env: + - TOX_ENV=py27 + - TOX_ENV=coveralls +install: + - pip install tox +script: + - tox -e $TOX_ENV \ No newline at end of file diff --git a/README.md b/README.md index e98f1ee..ea1297b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,12 @@ ### G A L A X Y -[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors) +[![Build Status](https://travis-ci.org/matt-bernhardt/galaxy.svg)](https://travis-ci.org/matt-bernhardt/galaxy) [![Coverage Status](https://coveralls.io/repos/matt-bernhardt/galaxy/badge.svg?branch=master&service=github)](https://coveralls.io/github/matt-bernhardt/galaxy?branch=master) [![Code Climate](https://codeclimate.com/github/matt-bernhardt/galaxy/badges/gpa.svg)](https://codeclimate.com/github/matt-bernhardt/galaxy) [![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors) We are attempting to rebuild a computer game from the 80s, Galaxy, in Python. + +More information about this project is at [http://matt-bernhardt.github.io/galaxy/](http://matt-bernhardt.github.io/galaxy/). + +[The original game is preserved at the Internet Archive](https://archive.org/details/a2_Galaxy_1981_Avalon_Hill) + ## Contributors Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): @@ -12,4 +17,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! \ No newline at end of file +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! diff --git a/battle.py b/galaxy/battle.py similarity index 100% rename from battle.py rename to galaxy/battle.py diff --git a/fleets.py b/galaxy/fleets.py similarity index 100% rename from fleets.py rename to galaxy/fleets.py diff --git a/galaxy_lib.py b/galaxy/galaxy_lib.py similarity index 100% rename from galaxy_lib.py rename to galaxy/galaxy_lib.py diff --git a/galaxy_map.py b/galaxy/galaxy_map.py similarity index 100% rename from galaxy_map.py rename to galaxy/galaxy_map.py diff --git a/main.py b/galaxy/main.py similarity index 100% rename from main.py rename to galaxy/main.py diff --git a/planets.py b/galaxy/planets.py similarity index 100% rename from planets.py rename to galaxy/planets.py diff --git a/test_battle.py b/tests/test_battle.py similarity index 100% rename from test_battle.py rename to tests/test_battle.py diff --git a/test_fleets.py b/tests/test_fleets.py similarity index 100% rename from test_fleets.py rename to tests/test_fleets.py diff --git a/test_galaxy_lib.py b/tests/test_galaxy_lib.py similarity index 100% rename from test_galaxy_lib.py rename to tests/test_galaxy_lib.py diff --git a/test_planets.py b/tests/test_planets.py similarity index 100% rename from test_planets.py rename to tests/test_planets.py diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..5c4122d --- /dev/null +++ b/tox.ini @@ -0,0 +1,27 @@ +[tox] +envlist = py27,clean,coverage +skipsdist = True + +[testenv] +commands = py.test {posargs:--tb=short} +deps = + unittest + +[testenv:clean] +commands = coverage erase +deps = coverage + +[testenv:coverage] +deps = + pytest-cov + {[testenv]deps} +commands = unittest --cov=galaxy {posargs} + +[testenv:coveralls] +passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH +deps = + coveralls + {[testenv:coverage]deps} +commands = + unittest --cov=galaxy + coveralls \ No newline at end of file