Skip to content

Commit

Permalink
Squashing another 3 commits together
Browse files Browse the repository at this point in the history
  • Loading branch information
hobson committed Mar 11, 2018
1 parent 58f9e21 commit 0433f1b
Show file tree
Hide file tree
Showing 316 changed files with 459 additions and 7,790 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = NLP_in_Action
source = */nlpia/*
# omit = bad_file.py

[report]
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ __pycache__/*
.cache/*
.*.swp
.~*
*/.ipynb_checkpoints/*

# Project files
.ropeproject
Expand Down Expand Up @@ -46,6 +47,11 @@ secret*
!secrets.cfg.EXAMPLE_TEMPLATE

# big data
src/nlpia/bigdata/*
src/nlpia/data/*.gz
src/nlpia/data/*.bz2
src/nlpia/data/*.xz
src/nlpia/data/*.zip
nlpia/bigdata/*
nlpia/data/*.gz
nlpia/data/*.bz2
Expand All @@ -62,6 +68,8 @@ record.txt
# Backups
*.bak.*
*.old.*
*.new.*
*.fixed.*
*.broke.*
*.master.*
*.develop.*
Expand Down
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: v0.8.0
hooks:
- id: trailing-whitespace
- id: check-ast
- id: check-added-large-files
- id: check-json
- id: check-yaml
- id: check-xml
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: flake8
args: ["--exclude=docs/conf.py"]

- repo: git://github.com/FalconSocial/pre-commit-python-sorter
sha: 1.0.4
hooks:
- id: python-import-sorter
args: ['--silent-overwrite']
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Travis configuration file using the build matrix feature
# Read more under http://docs.travis-ci.com/user/build-configuration/
# THIS SCRIPT IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!

sudo: true
sudo: false
language: python
virtualenv:
system_site_packages: true
env:
matrix:
# - DISTRIB="ubuntu" PYTHON_VERSION="2.7" COVERAGE="true" # ipython 6.0 install fails, must install LTS release 5.0 for 2.7
# - DISTRIB="conda" PYTHON_VERSION="2.7" COVERAGE="false"
# - DISTRIB="conda" PYTHON_VERSION="3.4" COVERAGE="false"
- DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="false"
- DISTRIB="ubuntu" PYTHON_VERSION="3.5" COVERAGE="false"
- DISTRIB="ubuntu" PYTHON_VERSION="2.7" COVERAGE="true"
- DISTRIB="conda" PYTHON_VERSION="2.7" COVERAGE="false"
- DISTRIB="conda" PYTHON_VERSION="3.3" COVERAGE="false"
- DISTRIB="conda" PYTHON_VERSION="3.4" COVERAGE="false"
addons:
apt:
packages:
- git
- python3-pip
- python-pip
- gfortran
- libopenblas-dev
- liblapack-dev
Expand Down
8 changes: 8 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
============
Contributors
============

* Hobson Lane <[email protected]>
* Cole Howard @uglyboxer
* Hannes Hapke @hanneshapke
* Zachary Kent @Zak-Kent
5 changes: 5 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
============
Contributors
============

* Hobson Lane <[email protected]>
File renamed without changes.
2 changes: 0 additions & 2 deletions bld.bat

This file was deleted.

72 changes: 44 additions & 28 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
AUTODOCDIR = api
AUTODOCBUILD = sphinx-apidoc
PROJECT = nlpia
MODULEDIR = ../src/nlpia

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $?), 1)
Expand All @@ -19,7 +23,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext doc-requirements

help:
@echo "Please use \`make <target>' where <target> is one of"
Expand Down Expand Up @@ -47,131 +51,143 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"

clean:
rm -rf $(BUILDDIR)/*
rm -rf $(BUILDDIR)/* $(AUTODOCDIR)

html:
$(AUTODOCDIR): $(MODULEDIR)
mkdir -p $@
$(AUTODOCBUILD) -f -o $@ $^

doc-requirements: $(AUTODOCDIR)

html: doc-requirements
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

dirhtml:
dirhtml: doc-requirements
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

singlehtml:
singlehtml: doc-requirements
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

pickle:
pickle: doc-requirements
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."

json:
json: doc-requirements
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."

htmlhelp:
htmlhelp: doc-requirements
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."

qthelp:
qthelp: doc-requirements
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/NLP_in_Action.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/$(PROJECT).qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/NLP_in_Action.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/$(PROJECT).qhc"

devhelp:
devhelp: doc-requirements
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $HOME/.local/share/devhelp/NLP_in_Action"
@echo "# ln -s $(BUILDDIR)/devhelp $HOME/.local/share/devhelp/NLP_in_Action"
@echo "# mkdir -p $HOME/.local/share/devhelp/$(PROJECT)"
@echo "# ln -s $(BUILDDIR)/devhelp $HOME/.local/share/devhelp/$(PROJEC)"
@echo "# devhelp"

epub:
epub: doc-requirements
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

latex:
patch-latex:
find _build/latex -iname "*.tex" | xargs -- \
sed -i'' 's~includegraphics{~includegraphics\[keepaspectratio,max size={\\textwidth}{\\textheight}\]{~g'

latex: doc-requirements
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
$(MAKE) patch-latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."

latexpdf:
latexpdf: doc-requirements
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
$(MAKE) patch-latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

latexpdfja:
latexpdfja: doc-requirements
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

text:
text: doc-requirements
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."

man:
man: doc-requirements
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

texinfo:
texinfo: doc-requirements
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."

info:
info: doc-requirements
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

gettext:
gettext: doc-requirements
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."

changes:
changes: doc-requirements
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck:
linkcheck: doc-requirements
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
doctest: doc-requirements
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

xml:
xml: doc-requirements
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."

pseudoxml:
pseudoxml: doc-requirements
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
Loading

0 comments on commit 0433f1b

Please sign in to comment.