Skip to content

Commit

Permalink
Fixed installation bugs and updated relevant documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mooshu1x2 committed Jun 30, 2016
1 parent 586f4d0 commit ab8b9fa
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 40 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,3 +1,5 @@
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -26,7 +28,6 @@ coverage.xml
*,cover
.hypothesis/


# Distribution / packaging
.Python
env/
Expand Down
4 changes: 0 additions & 4 deletions authors.rst

This file was deleted.

7 changes: 6 additions & 1 deletion docs/Makefile
Expand Up @@ -53,7 +53,12 @@ help:

.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
rm -rf $(BUILDDIR)/doctrees
rm -rf $(BUILDDIR)/html/*.html
rm -rf $(BUILDDIR)/html/*.js
rm -rf $(BUILDDIR)/html/*.html
rm -rf $(BUILDDIR)/html/_sources
rm -rf $(BUILDDIR)/html/_static

.PHONY: html
html:
Expand Down
14 changes: 7 additions & 7 deletions docs/source/distill.utils.rst
@@ -1,23 +1,23 @@
Utilities Library
-----------------
Query Builder
-------------

.. automodule:: distill.utils
.. automodule:: distill.utils.query_builder
:members:
:undoc-members:
:show-inheritance:

Exception Handling
------------------

.. automodule:: distill.exceptions
:members:
:undoc-members:
.. automodule:: distill.utils.exceptions
:members:
:undoc-members:
:show-inheritance:

Validation Library
------------------

.. automodule:: distill.validation
.. automodule:: distill.utils.validation
:members:
:undoc-members:
:show-inheritance:
Expand Down
47 changes: 37 additions & 10 deletions docs/source/installation.rst
Expand Up @@ -3,8 +3,8 @@
Installation Guide
==================

Installing Distill in an Development Environment
------------------------------------------------
Installing Distill
------------------

The first step is to install Distill. First, checkout the latest version of Distill.

Expand All @@ -24,7 +24,7 @@ or

$ pip install distill

Advanced users can install Distill in a virtualenv if they wish. Instructions to setup an virtual environment will be explained below.
Users are strongly recommended to install Distill in a virtualenv. Instructions to setup an virtual environment will be explained below.

.. note ::
Expand All @@ -33,23 +33,50 @@ Advanced users can install Distill in a virtualenv if they wish. Instructions to
Installing Distill in an Virtual Environment
--------------------------------------------

TODO
virtualenv is a tool to create isolated Python environments. virtualenv creates a folder which contains all the necessary executables to use the packages that the Distill project would need.

Development and Testing
-----------------------
Install virtualenv via pip:

::

$ sudo pip install virtualenv

Start by changing directory into the root of Distill's project directory, and then use the virtualenv command-line tool to create a new environment:

::

$ mkdir env
$ virtualenv env

Activate environment:

::

$ source env/bin/activate

Install Distill requirements:

::

$ env/bin/pip -r requirements.txt

To build the source code and run all unit tests.

::

$ python setup.py develop test
$ env/bin/python setup.py develop test

To start up a local web server, running on localhost:8090.
Launch local Distill server, running on localhost:8090:

::
$ env/bin/dev

Deactivate environment

$ dev
::

$ deactivate

Deployment
----------
Expand All @@ -75,7 +102,7 @@ Download the project from the GitHub repository and copy the application to the

$ git clone https://github.com/draperlaboratory/distill.git /home/public_html

Install Distill's requirements.
Install Distill's requirements either globally or in a virutal environment:

::

Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Expand Up @@ -5,3 +5,5 @@ numpy>=1.10.0
scipy>=0.17.0
sphinx>=1.4.0
pandas>=0.18.1
pytest>=2.9.0
sphinx_rtd_theme>=0.1.9
35 changes: 18 additions & 17 deletions setup.py
@@ -1,14 +1,18 @@
'''
Distill: An analytical framework for User-ALE <https://github.com/draperlaboratory/user-ale>.
Note that "python setup.py test" invokes pytest on the package. With appropriately
configured setup.cfg, this will check both xxx_test modules and docstrings.
You can install Distill with "python setup.py install"
Copyright 2016, The Charles Stark Draper Laboratory, Inc.
Licensed under Apache Software License
'''
# -*- coding: utf-8 -*-
#
# Copyright 2016 The Charles Stark Draper Laboratory, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import
from setuptools import setup, find_packages
Expand All @@ -18,9 +22,6 @@
if sys.version_info[:2] < (2, 7):
m = "Python 2.7 or later is required for Distill (%d.%d detected)."
raise ImportError (m % sys.version_info[:2])
del sys

#here = os.path.abspath(os.path.dirname (__file__) )

if sys.argv[-1] == 'setup.py':
print ("To install, run 'python setup.py install'")
Expand Down Expand Up @@ -54,7 +55,7 @@ def run_tests (self):
license = "Apache Software License",
author = "Michelle Beard",
author_email = "mbeard@draper.com",
description = "An analytical framework for User-ALE.",
description = "An analytical framework for UserALE.",
long_description = __doc__,
classifiers = [
'Development Status :: 4 - Beta',
Expand All @@ -67,11 +68,11 @@ def run_tests (self):
'Operating System :: OS Independent',
'Private :: Do Not Upload"'
],
keywords = "analytics graph stout user-ale instrumentation", # Separate with spaces
keywords = "stout userale tap", # Separate with spaces
packages = find_packages (exclude=['examples', 'tests']),
include_package_data = True,
zip_safe = False,
tests_require = ['pytest'],
tests_require = ['pytest>=2.9.0'],
cmdclass = {'test': PyTest},
install_requires = ['Flask==0.10.1',
'networkx==1.11',
Expand Down

0 comments on commit ab8b9fa

Please sign in to comment.