-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Ported Wabbit Wappa from parent project
-Project framework via cookiecutter
- Loading branch information
Michael J.T. O'Kelly
committed
Apr 1, 2014
0 parents
commit aac3c5f
Showing
18 changed files
with
901 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
lib | ||
lib64 | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
nosetests.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
# Complexity | ||
output/*.html | ||
output/*/index.html | ||
|
||
# Sphinx | ||
docs/_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
======= | ||
Credits | ||
======= | ||
|
||
Development Lead | ||
---------------- | ||
|
||
* Michael J.T. O'Kelly <[email protected]> | ||
|
||
Contributors | ||
------------ | ||
|
||
None yet. Why not be the first? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
============ | ||
Contributing | ||
============ | ||
|
||
Contributions are welcome, and they are greatly appreciated! Every | ||
little bit helps, and credit will always be given. | ||
|
||
You can contribute in many ways: | ||
|
||
Types of Contributions | ||
---------------------- | ||
|
||
Report Bugs | ||
~~~~~~~~~~~ | ||
|
||
Report bugs at https://github.com/mokelly/wabbit_wappa/issues. | ||
|
||
If you are reporting a bug, please include: | ||
|
||
* Your operating system name and version. | ||
* Any details about your local setup that might be helpful in troubleshooting. | ||
* Detailed steps to reproduce the bug. | ||
|
||
Fix Bugs | ||
~~~~~~~~ | ||
|
||
Look through the GitHub issues for bugs. Anything tagged with "bug" | ||
is open to whoever wants to implement it. | ||
|
||
Implement Features | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
Look through the GitHub issues for features. Anything tagged with "feature" | ||
is open to whoever wants to implement it. | ||
|
||
Write Documentation | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
||
Wabbit Wappa could always use more documentation, whether as part of the | ||
official Wabbit Wappa docs, in docstrings, or even on the web in blog posts, | ||
articles, and such. | ||
|
||
Submit Feedback | ||
~~~~~~~~~~~~~~~ | ||
|
||
The best way to send feedback is to file an issue at https://github.com/mokelly/wabbit_wappa/issues. | ||
|
||
If you are proposing a feature: | ||
|
||
* Explain in detail how it would work. | ||
* Keep the scope as narrow as possible, to make it easier to implement. | ||
* Remember that this is a volunteer-driven project, and that contributions | ||
are welcome :) | ||
|
||
Get Started! | ||
------------ | ||
|
||
Ready to contribute? Here's how to set up `wabbit_wappa` for | ||
local development. | ||
|
||
1. Fork_ the `wabbit_wappa` repo on GitHub. | ||
2. Clone your fork locally:: | ||
|
||
$ git clone [email protected]:your_name_here/wabbit_wappa.git | ||
|
||
3. Create a branch for local development:: | ||
|
||
$ git checkout -b name-of-your-bugfix-or-feature | ||
|
||
Now you can make your changes locally. | ||
|
||
4. When you're done making changes, check that your changes pass style and unit | ||
tests, including testing other Python versions with tox:: | ||
|
||
$ tox | ||
|
||
To get tox, just pip install it. | ||
|
||
5. Commit your changes and push your branch to GitHub:: | ||
|
||
$ git add . | ||
$ git commit -m "Your detailed description of your changes." | ||
$ git push origin name-of-your-bugfix-or-feature | ||
|
||
6. Submit a pull request through the GitHub website. | ||
|
||
.. _Fork: https://github.com/Nekroze/wabbit_wappa/fork | ||
|
||
Pull Request Guidelines | ||
----------------------- | ||
|
||
Before you submit a pull request, check that it meets these guidelines: | ||
|
||
1. The pull request should include tests. | ||
2. If the pull request adds functionality, the docs should be updated. Put | ||
your new functionality into a function with a docstring, and add the | ||
feature to the list in README.rst. | ||
3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. | ||
Check https://travis-ci.org/mokelly/wabbit_wappa | ||
under pull requests for active pull requests or run the ``tox`` command and | ||
make sure that the tests pass for all supported Python versions. | ||
|
||
|
||
Tips | ||
---- | ||
|
||
To run a subset of tests:: | ||
|
||
$ py.test test/test_wabbit_wappa.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. :changelog: | ||
History | ||
------- | ||
|
||
0.0.1 (2014-03-31) | ||
++++++++++++++++++ | ||
|
||
* First release on GitHub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2014 Michael J.T. O'Kelly | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include AUTHORS.rst | ||
include CONTRIBUTING.rst | ||
include HISTORY.rst | ||
include LICENSE | ||
include README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
.PHONY: help clean clean-pyc clean-build list test test-all coverage docs release sdist | ||
|
||
help: | ||
@echo "clean-build - remove build artifacts" | ||
@echo "clean-pyc - remove Python file artifacts" | ||
@echo "lint - check style with flake8" | ||
@echo "test - run tests quickly with the default Python" | ||
@echo "testall - run tests on every Python version with tox" | ||
@echo "coverage - check code coverage quickly with the default Python" | ||
@echo "docs - generate Sphinx HTML documentation, including API docs" | ||
@echo "release - package and upload a release" | ||
@echo "sdist - package" | ||
|
||
clean: clean-build clean-pyc | ||
|
||
clean-build: | ||
rm -fr build/ | ||
rm -fr dist/ | ||
rm -fr *.egg-info | ||
|
||
clean-pyc: | ||
find . -name '*.pyc' -exec rm -f {} + | ||
find . -name '*.pyo' -exec rm -f {} + | ||
find . -name '*~' -exec rm -f {} + | ||
|
||
lint: | ||
flake8 wabbit_wappa test | ||
|
||
test: | ||
py.test | ||
|
||
test-all: | ||
tox | ||
|
||
coverage: | ||
coverage run --source wabbit_wappa setup.py test | ||
coverage report -m | ||
coverage html | ||
open htmlcov/index.html | ||
|
||
docs: | ||
rm -f docs/wabbit_wappa.rst | ||
rm -f docs/modules.rst | ||
sphinx-apidoc -o docs/ wabbit_wappa | ||
$(MAKE) -C docs clean | ||
$(MAKE) -C docs html | ||
open docs/_build/html/index.html | ||
|
||
release: clean | ||
python setup.py sdist upload | ||
python setup.py bdist_wheel upload | ||
|
||
sdist: clean | ||
python setup.py sdist | ||
python setup.py bdist_wheel upload | ||
ls -l dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
############## | ||
Wabbit Wappa | ||
############## | ||
|
||
**Wabbit Wappa** is a full-featured Python wrapper for the lightning fast `Vorpal Wabbit <https://github.com/JohnLangford/vowpal_wabbit/wiki>`_ ("VW") machine learning utility. Wabbit Wappa makes it easy to use VW's powerful features while not dealing with its idiosyncratic syntax and interface. | ||
|
||
**************** | ||
Features | ||
**************** | ||
|
||
* Complete Pythonic wrapper for the Vorpal Wabbit training and test syntax | ||
* Online training and testing, with no need to restart VW or reload the trained model to go between them | ||
* Save the trained model on the fly | ||
|
||
**************** | ||
Getting Started | ||
**************** | ||
|
||
If you're unfamiliar with Vorpal Wabbit, this documentation is no substitute for the `detailed tutorials <https://github.com/JohnLangford/vowpal_wabbit/wiki/Tutorial>`_ | ||
at the VW wiki. You'll eventually need to read those to understand VW's advanced features. | ||
|
||
Installation | ||
=============== | ||
|
||
*Coming soon: install via Pip* | ||
|
||
Start by cloning the WW repository:: | ||
|
||
git clone https://github.com/mokelly/wabbit_wappa.git | ||
cd wabbit_wappa | ||
|
||
You have three installation options, depending on your comfort with compiling and installing the VW utility. | ||
|
||
**If you already have Vorpal Wabbit installed**:: | ||
|
||
python setup.py install | ||
|
||
**If you still need to install VW and its dependencies**:: | ||
|
||
scripts/vw-install.sh | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib; | ||
python setup.py install | ||
|
||
(The "export" line should be added to your .profile if you don't want to run it every time you use Vorpal Wabbit.) | ||
|
||
**If you want a virtual machine with everything all set up for you:** | ||
|
||
*Windows users, this is your only option at present* | ||
|
||
First install the virtual machine manager `Vagrant <http://www.vagrantup.com/>`_ along with your favorite virtualization system (such as `VirtualBox <https://www.virtualbox.org/>`_). | ||
Then from the Wabbit Wappa source directory type:: | ||
|
||
vagrant up | ||
|
||
This will launch an Ubuntu VM and provision it with VW and WW, completely automatically! Once that's all complete, just SSH to your new VM with:: | ||
|
||
vagrant ssh | ||
Testing | ||
--------- | ||
|
||
Make sure everything is installed and configured correctly by running the tests:: | ||
|
||
py.test | ||
|
||
Usage Example | ||
=============== | ||
|
||
*TODO* | ||
|
||
**************** | ||
Documentation | ||
**************** | ||
|
||
For now, read the docstrings:: | ||
|
||
import wabbit_wappa | ||
help(wabbit_wappa) | ||
|
Oops, something went wrong.