Skip to content

Commit

Permalink
Merge branch 'release/v0.13.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge committed May 24, 2018
2 parents ab62841 + 02cf9d8 commit a1bac49
Show file tree
Hide file tree
Showing 104 changed files with 4,431 additions and 13,066 deletions.
19 changes: 13 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
# Directories to ignore:

*.ipynb_checkpoints/
data/
docs/build/
docs/site/
docs/src/examples/
input/
output/

# Files to ignore:

.DS_Store
*.aux
*.ipynb_checkpoints/
*.jl.*.cov
*.jl.cov
*.jl.*.cov
*.jl.mem
*.log
data/
deps/custom_preamble.tex
deps/deps.jl
deps/pdf2svg.svg
deps/showed_warning
docs/build
input/
output/
scratch.jl
71 changes: 38 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,49 @@
## Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia

os:
- linux
- osx
- linux
- osx

julia:
- 0.6
# - nightly
- 0.6
- nightly

notifications:
email: false
email: false

git:
depth: 99999999
depth: 99999999

## Allow failures on nightly julia:
matrix:
allow_failures:
- julia: nightly
allow_failures:
- julia: nightly

addons:
apt:
packages:
- gfortran
- pdf2svg
- pgf
- poppler-utils # provides /usr/bin/pdftoppm
- texlive-binaries
- texlive-latex-base
- texlive-latex-extra
- texlive-pictures
apt:
packages:
- gfortran
- pdf2svg
- pgf
- poppler-utils
- texlive-binaries
- texlive-latex-base
- texlive-latex-extra
- texlive-pictures

before_install:
# update homebrew
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
# install mactex
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask install basictex; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=/Library/TeX/texbin:"$PATH"; fi
# update tlmgr
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo tlmgr update --self; fi
# install tex packages
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo tlmgr install luatex85; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo tlmgr install pgfplots; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo tlmgr install standalone; fi
# install pdf2svg
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install pdf2svg; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask install basictex; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=/Library/TeX/texbin:"$PATH"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo tlmgr update --self; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo tlmgr install luatex85; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo tlmgr install pgfplots; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo tlmgr install standalone; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install pdf2svg; fi

script:
- julia --color=yes -e 'Pkg.clone(pwd())'
- julia --color=yes -e 'Pkg.build("PredictMD")'
- julia --check-bounds=yes --color=yes -e 'Pkg.test("PredictMD", coverage=true)'

after_success:
- julia -e 'cd(Pkg.dir("PredictMD")); include(joinpath("docs", "deploy_docs.jl"))'
41 changes: 0 additions & 41 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ This document provides information on contributing to the PredictMD source code.
</tr>
<tr>
<td align="left"><a href="#2-setting-up-the-predictmd-repo">2. Setting up the PredictMD repo</a></td>
</tr>
<tr>
<td align="left"><a href="#3-working-with-examples">3. Working with examples</a></td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -156,41 +153,3 @@ cd ~/.julia/v0.6/PredictMD
```bash
git config commit.gpgsign true && git remote set-url origin https://github.com/bcbi/PredictMD.jl.git && git remote set-url --push origin [email protected]:bcbi/PredictMD.jl.git && git checkout master && git checkout develop && git flow init -fd && git checkout develop && git fetch --all --prune
```

## 3. Working with examples

Some of the examples are provided as Jupyter notebooks as a convinient way to visualize and interact with the code. However, we also like to mantain corresponding plain Julia scripts that are in-sync with the notebooks. A convinient way to do so, is to add a post-save hook to your Jupyter configuration file.

1. Open you jupyter configuration file ~/.jupyter/jupyter_notebook_config.py. If the file does not exist you can generate it by running `jupyter notebook --generate-config`

2. Add the following code to the top of the file

```python
#-----------------------------------------------------------------------------
# Auto save script version of notebook
# Reference: https://svds.com/jupyter-notebook-best-practices-for-data-science/
#-----------------------------------------------------------------------------

import os
from subprocess import check_call

def post_save(model, os_path, contents_manager):
"""post-save hook for converting notebooks to .py scripts"""
if model['type'] != 'notebook':
return # only do this for notebooks
d, fname = os.path.split(os_path)
check_call(['jupyter', 'nbconvert', '--to', 'script', fname], cwd=d)

c.FileContentsManager.post_save_hook = post_save
```

**Note:** This behavior is global. If you want to have this saving only when in a particular folder, you can create multiple configuration files as a work-around. First create a new profile name via a bash command line:
```bash
export JUPYTER_CONFIG_DIR=~/.jupyter_profile2
jupyter notebook --generate-config
```
This will create a new directory and file at `~/.jupyter_profile2/jupyter_notebook_config.py` Then run jupyter notebook and work as usual. To switch back to your default profile you will have to set (either by hand, shell function, or your .bashrc) back to:

```bash
export JUPYTER_CONFIG_DIR=~/.jupyter
```
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@
<table>
<thead>
<tr>
<th>branch</th>
<th>master</th>
<th>develop</th>
</tr>
</thead>
<tbody>
<tr>
<td>travis</td>
<td><a href="https://travis-ci.org/bcbi/PredictMD.jl/branches"><img alt="Build Status (master)" title="Build Status (master)" src="https://travis-ci.org/bcbi/PredictMD.jl.svg?branch=master"></a></td>
<td><a href="https://travis-ci.org/bcbi/PredictMD.jl/branches"><img alt="Build Status (develop)" title="Build Status (develop)" src="https://travis-ci.org/bcbi/PredictMD.jl.svg?branch=develop"></a></td>
</tr>
<tr>
<td>docs</td>
<td><a href="https://bcbi.github.io/PredictMD.jl/stable"><img alt="Documentation (stable)" title="Documentation (stable)" src="https://img.shields.io/badge/docs-stable-blue.svg"></a></td>
<td><a href="https://bcbi.github.io/PredictMD.jl/latest"><img alt="Documentation (latest)" title="Documentation (latest)" src="https://img.shields.io/badge/docs-latest-blue.svg"></a></td>
</tr>
</tbody>
</table>

Expand All @@ -28,16 +35,13 @@ PredictMD is a [Julia](https://julialang.org/) package that provides a uniform i
<td align="left"><a href="#1-prerequisites">1. Prerequisites</a></td>
</tr>
<tr>
<td align="left"><a href="#2-installation-recommended-method">2. Installation (recommended method)</a></td>
</tr>
<tr>
<td align="left"><a href="#3-installation-alternate-method-with-conda">3. Installation (alternate method with Conda)</a></td>
<td align="left"><a href="#2-installation">2. Installation</a></td>
</tr>
<tr>
<td align="left"><a href="#4-examples">4. Examples</a></td>
<td align="left"><a href="#3-examples">3. Examples</a></td>
</tr>
<tr>
<td align="left"><a href="#5-contributing">5. Contributing</a></td>
<td align="left"><a href="#4-contributing">4. Contributing</a></td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -107,7 +111,7 @@ If you receive an error (e.g. "command not found"), download and install pdf2svg
* macOS: [http://brewinstall.org/Install-pdf2svg-on-Mac-with-Brew/](http://brewinstall.org/Install-pdf2svg-on-Mac-with-Brew/)
* GNU/Linux: [https://github.com/dawbarton/pdf2svg](https://github.com/dawbarton/pdf2svg)

## 2. Installation (recommended method)
## 2. Installation

**Step 1:** Make sure that you have followed all of the instructions in [Section 1 (Prerequisites)](#1-prerequisites).

Expand All @@ -126,11 +130,7 @@ If you receive the message "INFO: PredictMD tests passed", then you have success

If the tests still do not pass or if you still receive an error message, go to [https://github.com/bcbi/PredictMD.jl/issues/new](https://github.com/bcbi/PredictMD.jl/issues/new) and submit a new issue. Please include a screenshot of the error.

## 3. Installation (alternate method with Conda)

Alternatively, you can install PredictMD using the Conda package manager. Just follow the instructions here: [https://github.com/dilumaluthge/conda-predictmd-cpu](https://github.com/dilumaluthge/conda-predictmd-cpu)

## 4. Examples
## 3. Examples
The `examples/` folder contains several files that illustrate the usage of PredictMD:

<table>
Expand Down Expand Up @@ -158,6 +158,6 @@ The `examples/` folder contains several files that illustrate the usage of Predi
<tbody>
</table>

## 5. Contributing
## 4. Contributing

If you would like to contribute to the PredictMD source code, please see [CONTRIBUTING.md](CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ BSON 0.1
CSV 0.2
ClassImbalance 0.2
Combinatorics 0.6
Compat
Crayons 0.4
DataFrames 0.11
DecisionTree 0.6
Expand All @@ -27,7 +28,6 @@ NNlib 0.2
NumericalIntegration 0.0.3
PGFPlots 2.2
PGFPlotsX 0.2
PackageCompiler 0.3
ProgressMeter 0.5
RDatasets 0.3
ROCAnalysis 0.2
Expand Down
20 changes: 20 additions & 0 deletions docs/deploy_docs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Documenter
import PredictMD

ENV["PREDICTMD_IS_DEPLOY_DOCS"] = "true"

Documenter.deploydocs(
branch = "gh-pages",
deps = Documenter.Deps.pip(
"mkdocs",
"pygments",
"python-markdown-math",
),
julia = "0.6",
latest = "develop",
osname = "linux",
repo = "github.com/bcbi/PredictMD.jl.git",
target = "site",
)

ENV["PREDICTMD_IS_DEPLOY_DOCS"] = "false"
Loading

0 comments on commit a1bac49

Please sign in to comment.