Skip to content

Commit

Permalink
Prepared the package for pip and pypi.
Browse files Browse the repository at this point in the history
  • Loading branch information
legaultmarc committed Oct 27, 2015
1 parent 4ecd172 commit 9d5e563
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 67 deletions.
4 changes: 1 addition & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include README.md
include LICENSE.txt
include forward/templates/default.html
recursive-include forward/templates *
recursive-include forward/tests/data *
prune forward/static/js/build/.module-cache
3 changes: 2 additions & 1 deletion docs/source/report.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ the files are in the `forward/static` subdirectory of the repo. If you want
to extend the report without adding js dependencies, you don't need to take
care of Bower, because all of the required files are included in the repo. This
decision was made to make it easier for developers to play with the frond-end
without tedious configuration.
without tedious configuration. If you want to update the js dependencies, you
may edit the ``bower.json`` file and run ``bower update``.

Nonetheless, front-end developers will need to build their javascript. This is
because `react` code uses `JSX` which needs to be converted to regular
Expand Down
Empty file added forward/scripts/__init__.py
Empty file.
File renamed without changes.
3 changes: 1 addition & 2 deletions forward/static/bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "forwardUI",
"version": "0.0.0",
"version": "0.1.0",
"homepage": "https://github.com/legaultmarc/forward",
"authors": [
"Marc-André Legault <legaultmarc@gmail.com>"
Expand All @@ -13,7 +13,6 @@
],
"dependencies": {
"react": "0.13.3",
"bokehjs": "http://cdn.pydata.org/bokeh/release/bokeh-0.9.1.min.js",
"jquery": "2.1.4",
"d3": "3.5.6"
},
Expand Down
13 changes: 0 additions & 13 deletions forward/static/bower_components/bokehjs/.bower.json

This file was deleted.

40 changes: 0 additions & 40 deletions forward/static/bower_components/bokehjs/index.js

This file was deleted.

51 changes: 43 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# python setup.py sdist --format zip

import os
import functools

from setuptools import setup, find_packages

Expand All @@ -33,21 +34,54 @@ def write_version_file(fn=None):
a.close()


def get_package_data():
base = os.path.join(os.path.dirname(os.path.abspath(__file__)))
os.chdir(base)
roots = {"templates", "static", os.path.join("tests", "data")}

excludes = {"forward/static/js/build/.module-cache",
"forward/static/js/build/.module-cache/manifest"}

paths = []

for root in roots:
root = os.path.join("forward", root)
for cur, dirs, files in os.walk(root):
if cur in excludes:
continue
join = functools.partial(os.path.join, cur)
paths.extend(map(join, files))

# Remove the leading forward.
paths = [i[8:] for i in paths]

return paths


def setup_package():
# Saving the version into a file
write_version_file()

setup(
name="forward",
version=VERSION,
description="Utilities for pheWAS experiments using cohorts.",
long_description=("This package facilitates common pheWAS analysis "
"and automates report creation and data archiving."),
description="Tool for gene-based phenomic experiments using cohorts.",
long_description=("This package facilitates common phenomic analyses "
"and automates report creation and data management."
""),
author=u"Marc-André Legault",
author_email="legaultmarc@gmail.com",
url="https://github.com/legaultmarc/forward",
license="CC BY-NC 4.0",
packages=find_packages(exclude=["tests", ]),
package_data={
"forward": get_package_data()
},
entry_points={
"console_scripts": [
"forward-cli=forward.scripts.forward_cli:parse_args"
],
},
classifiers=["Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
Expand All @@ -56,19 +90,20 @@ def setup_package():
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Bio-Informatics"],
test_suite="forward.tests.test_suite",
keywords="bioinformatics genomics phewas epidemiology cohort",
install_requires=["numpy >= 1.8.1", "pandas >= 0.15",
"gepyto >= 0.9.2", "SQLAlchemy >= 0.9.8",
"PyYAML >= 3.11", "scipy >= 0.14.0",
"matplotlib >= 1.4.2", "Jinja2 >= 2.7.3",
"xlrd >= 0.9.3", "seaborn >= 0.5.1",
"six >= 1.9.0"],
"Jinja2 >= 2.7.3", "xlrd >= 0.9.3",
"six >= 1.9.0", "h5py >= 2.5.0", "pyplink >= 1.0.2",
"Pygments >= 2.0.2", "statsmodels >= 0.6.1",
"Flask >= 0.10.0", "patsy >= 0.4.0"],
zip_safe=False
)

return


if __name__ == "__main__":
setup_package()

0 comments on commit 9d5e563

Please sign in to comment.