Skip to content

Commit

Permalink
Add CircleCI for build documentation. Fix #1807 (#1822)
Browse files Browse the repository at this point in the history
* init config for circle

* change

* rm cache, install tox distinctly

* fix indentation & command

* update venv

* add pip-cache

* add apt packages for latex

* rename

* enable latex rendering

* remove doc building from Travis

* store new doc version
  • Loading branch information
menshikh-iv authored Jan 8, 2018
1 parent 37bc8d4 commit 4644606
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 4 deletions.
44 changes: 44 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: 2
jobs:
build:
docker:
- image: circleci/python:2.7

working_directory: ~/gensim

steps:
- checkout

- restore_cache:
key: pip-cache

- run:
name: Apt install (for latex render)
command: |
sudo apt-get -yq update
sudo apt-get -yq remove texlive-binaries --purge
sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install dvipng texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended latexmk

- run:
name: Basic installation (tox)
command: |
python -m virtualenv venv
source venv/bin/activate
pip install tox

- run:
name: Build documentation
command: |
source venv/bin/activate
tox -e docs -vv

- store_artifacts:
path: docs/src/_build
destination: documentation

- save_cache:
key: pip-cache
paths:
- "~/.cache/pip"
- "~/.ccache"
- "~/.pip-cache"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ data
*_out.txt
*.html
*.inv
*.js
*.js
docs/_images/
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ language: python
matrix:
include:
- python: '2.7'
env: TOXENV="flake8, docs"
env: TOXENV="flake8"

- python: '2.7'
env: TOXENV="py27-linux"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinxcontrib.napoleon']
extensions = ['sphinx.ext.autodoc', 'sphinxcontrib.napoleon', 'sphinx.ext.imgmath']
autoclass_content = "both"

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion gensim/topic_coherence/direct_confirmation_measure.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def log_conditional_probability(segmented_topics, accumulator, with_std=False, w
"""
This function calculates the log-conditional-probability measure
which is used by coherence measures such as U_mass.
This is defined as: m_lc(S_i) = log[(P(W', W*) + e) / P(W*)]
This is defined as :math:`m_{lc}(S_i) = log \\frac{P(W', W^{*}) + \epsilon}{P(W^{*})}`.

Args:
segmented_topics (list): Output from the segmentation module of the segmented
Expand Down

0 comments on commit 4644606

Please sign in to comment.