Skip to content

Commit

Permalink
Setup basic package structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
dohlee committed Jul 17, 2018
1 parent c469940 commit 92ec7b6
Show file tree
Hide file tree
Showing 25 changed files with 577 additions and 0 deletions.
6 changes: 6 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

Authors
=======

* Youngjune Park - https://github.com/iron-lion
* Dohoon Lee - https://github.com/dohlee
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

Changelog
=========

0.1.0 (2018-07-15)
------------------

* First release on PyPI.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
BSD 2-Clause License

Copyright (c) 2018, Dohoon Lee
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19 changes: 19 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
graft docs
graft src
graft ci
graft tests

include .bumpversion.cfg
include .coveragerc
include .cookiecutterrc
include .editorconfig

include AUTHORS.rst
include CHANGELOG.rst
include CONTRIBUTING.rst
include LICENSE
include README.rst

include tox.ini .travis.yml appveyor.yml

global-exclude *.py[cod] __pycache__ *.so *.dylib
13 changes: 13 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
numpy = "*"
networkx = "*"

[dev-packages]

[requires]
python_version = "3.6"
69 changes: 69 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/authors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../AUTHORS.rst
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../CHANGELOG.rst
53 changes: 53 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import os


extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.ifconfig',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
]
if os.getenv('SPELLCHECK'):
extensions += 'sphinxcontrib.spelling',
spelling_show_suggestions = True
spelling_lang = 'en_US'

source_suffix = '.rst'
master_doc = 'index'
project = 'njsd'
year = '2018'
author = 'Dohoon Lee'
copyright = '{0}, {1}'.format(year, author)
version = release = '0.1.0'

pygments_style = 'trac'
templates_path = ['.']
extlinks = {
'issue': ('https://github.com/dohlee/python-njsd/issues/%s', '#'),
'pr': ('https://github.com/dohlee/python-njsd/pull/%s', 'PR #'),
}
# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only set the theme if we're building docs locally
html_theme = 'sphinx_rtd_theme'

html_use_smartypants = True
html_last_updated_fmt = '%b %d, %Y'
html_split_index = False
html_sidebars = {
'**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
}
html_short_title = '%s-%s' % (project, version)

napoleon_use_ivar = True
napoleon_use_rtype = False
napoleon_use_param = False
1 change: 1 addition & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../CONTRIBUTING.rst
22 changes: 22 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
========
Contents
========

.. toctree::
:maxdepth: 2

readme
installation
usage
reference/index
contributing
authors
changelog

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

7 changes: 7 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
============
Installation
============

At the command line::

pip install njsd
1 change: 1 addition & 0 deletions docs/readme.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../README.rst
7 changes: 7 additions & 0 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Reference
=========

.. toctree::
:glob:

njsd*
9 changes: 9 additions & 0 deletions docs/reference/njsd.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
njsd
====

.. testsetup::

from njsd import *

.. automodule:: njsd
:members:
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx>=1.3
sphinx-rtd-theme
-e .
11 changes: 11 additions & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
builtin
builtins
classmethod
staticmethod
classmethods
staticmethods
args
kwargs
callstack
Changelog
Indices
7 changes: 7 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
=====
Usage
=====

To use njsd in a project::

import njsd
19 changes: 19 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[bdist_wheel]
universal = 1


[flake8]
max-line-length = 140
exclude = */migrations/*

[nosetests]
verbosity = 2

[isort]
force_single_line = True
line_length = 120
known_first_party = njsd
default_section = THIRDPARTY
forced_separate = test_njsd
not_skip = __init__.py
skip = migrations
75 changes: 75 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function

import io
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext

from setuptools import find_packages
from setuptools import setup


def read(*names, **kwargs):
return io.open(
join(dirname(__file__), *names),
encoding=kwargs.get('encoding', 'utf8')
).read()


setup(
name='njsd',
version='0.1.0',
license='BSD 2-Clause License',
description='Calculate Jensen-Shannon Divergence between two gene expression profiles to measure transcriptome-based intratumor heterogeneity(tITH).',
# long_description='%s\n%s' % (
# re.compile('^.. start-badges.*^.. end-badges', re.M | re.S).sub('', read('README.rst')),
# re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst'))
# ),
long_description=read('README.md'),
url='https://github.com/iron-lion/nJSD',
packages=find_packages('src'),
package_dir={'': 'src'},
py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
include_package_data=True,
zip_safe=False,
classifiers=[
# complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Utilities',
'Topic :: Bioinformatics',
],
keywords=[
# eg: 'keyword1', 'keyword2', 'keyword3',
],
install_requires=[
# eg: 'aspectlib==1.1.1', 'six>=1.7',
'numpy>=1.14.5',
'networkx>=2.1',
],
extras_require={
# eg:
# 'rst': ['docutils>=0.11'],
# ':python_version=="2.6"': ['argparse'],
},
entry_points={
'console_scripts': [
'njsd = njsd.cli:main',
]
},
)
Loading

0 comments on commit 92ec7b6

Please sign in to comment.