Skip to content

Commit

Permalink
update to julia v0.7 & v1.0 (#90)
Browse files Browse the repository at this point in the history
documentation: update to Documenter v0.20

docstrings for Edge, Node and other types
using Distributed (nprocs, pmap), Dates, SpecialFunctions (for lgamma), Random
REQUIRE: dependencies versions supporting julia 0.7/1.0

warn() -> @warn or @error or @debug, DEBUG eliminated
DEBUGC left in, snaqDebug removed
info() -> @info, STDOUT-> stdout, DevNull -> devnull
@test_warn -> @test_logs (:warn, msg as regex)
@test_nowarn -> @test_logs
declare global variables in tests

isdefined
ismatch -> occursin
findin -> findall, find -> findall
findfirst returns nothing, not 0 when nothing found
srand -> Random.seed!
Array constructor with undef
indmax -> argmax
tic, toc -> time_ns
round with digits by kw
float( -> parse(Float64
readuntil: needs keep=true to keep the final ; ending Newick format
readstring(io) -> read(io, String)`
small bug fix in chooseEdgeGamma
ShiftNet: value as vector of Float64
PhyloNetworkLinearModel: msng -> nonmissing, like in ModelFormulas, lambda as Float64
replace(string, pattern => replacement, count=k)
cholfact -> cholesky
+ -> .+
eye -> Matrix and I
DataFrames: insert! and delete! -> insertcol! and deletecol!; by; df[:,i] -> df[i] to avoid copying
expm -> exp
eig -> eigen
diagm, range
Pkg.dir -> dirname(pathof())
head -> first

documentation: separate build, install R, checkout master of PhyloPlots, drop MkDocs
latest -> dev or stable
  • Loading branch information
cecileane committed Jan 4, 2019
1 parent bc9da33 commit daeffdc
Show file tree
Hide file tree
Showing 106 changed files with 2,600 additions and 2,833 deletions.
46 changes: 28 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
## Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia
os: # WARNING: any change here must also be done in docs/make.jl
sudo: required
os:
- linux
- osx
julia: # WARNING: any change here must also be done in docs/make.jl
# - release
- 0.6
julia:
- 0.7
- 1.0

notifications:
email: false

## Following 4 lines are taken from here:
# https://github.com/JuliaOpt/NLopt.jl/blob/master/.travis.yml#L10
# They're meant to fix the NLopt build on Linux.
Expand All @@ -15,17 +19,23 @@ addons:
packages:
- libnlopt0 # We install it this way to be able to run Travis with `sudo: false`

after_success:
# push coverage results to Coveralls
- julia -e 'cd(Pkg.dir("PhyloNetworks")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
# push coverage results to Codecov
- julia -e 'cd(Pkg.dir("PhyloNetworks")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
# Install R
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y "deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -s -c)/"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq -y; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install git r-base r-base-dev r-recommended -y; fi
# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo R -e 'install.packages("ggplot2", dep=TRUE, repos="http://cran.us.r-project.org")'; fi # takes ~ 6min 2018-06-02
# build doc
- chmod +x docs/make.sh
- ./docs/make.sh
codecov: true
coveralls: true

jobs:
include:
- stage: "Documentation"
julia: 1.0
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.instantiate();
Pkg.develop(PackageSpec(path=pwd()))'
- julia --project=docs/ docs/make.jl
before_script:
# Install R
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y "deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -s -c)/"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq -y; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install git r-base r-base-dev r-recommended -y; fi
# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo R -e 'install.packages("ggplot2", dep=TRUE, repos="http://cran.us.r-project.org")'; fi # takes ~ 6min 2018-06-02
after_success: skip
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://travis-ci.org/crsl4/PhyloNetworks.jl.svg)](https://travis-ci.org/crsl4/PhyloNetworks.jl)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://crsl4.github.io/PhyloNetworks.jl/stable)
[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://crsl4.github.io/PhyloNetworks.jl/latest)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://crsl4.github.io/PhyloNetworks.jl/dev)
[![codecov.io](http://codecov.io/github/crsl4/PhyloNetworks.jl/coverage.svg?branch=master)](http://codecov.io/github/crsl4/PhyloNetworks.jl?branch=master)
[![Coverage Status](https://coveralls.io/repos/crsl4/PhyloNetworks.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/crsl4/PhyloNetworks?branch=master)

Expand All @@ -27,7 +27,7 @@ PhyloNetworks is a [Julia](http://julialang.org) package with utilities to:

To get help, check

- the [latest documentation](https://crsl4.github.io/PhyloNetworks.jl/latest)
- the [latest documentation](https://crsl4.github.io/PhyloNetworks.jl/dev)
- the [wiki](https://github.com/crsl4/PhyloNetworks.jl/wiki) for a step-by-step tutorial
(July 2018) with background on networks
- the [google group](https://groups.google.com/forum/#!forum/phylonetworks-users)
Expand All @@ -36,7 +36,11 @@ To get help, check

If you use the package, please cite

- Claudia Solís-Lemus, Paul Bastide and Cécile Ané (2017). PhyloNetworks: a package for phylogenetic networks. [Molecular Biology and Evolution](https://academic.oup.com/mbe/article/doi/10.1093/molbev/msx235/4103410/PhyloNetworks-a-package-for-phylogenetic-networks?guestAccessKey=230afceb-df28-4160-832d-aa7c73f86369) doi: 10.1093/molbev/msx235
- Claudia Solís-Lemus, Paul Bastide and Cécile Ané (2017).
PhyloNetworks: a package for phylogenetic networks.
[Molecular Biology and Evolution](https://academic.oup.com/mbe/article/doi/10.1093/molbev/msx235/4103410/PhyloNetworks-a-package-for-phylogenetic-networks?guestAccessKey=230afceb-df28-4160-832d-aa7c73f86369)
34(12):3292–3298.
[doi:10.1093/molbev/msx235](https://doi.org/10.1093/molbev/msx235)

## Maximum pseudolikelihood estimation of species network: SNaQ <img src="http://pages.stat.wisc.edu/~claudia/Images/snaq.png" align=right title="SNaQ logo" width=262.5 height=111>
<!-- ![SNaQ logo](http://pages.stat.wisc.edu/~claudia/Images/snaq.png)
Expand All @@ -54,7 +58,8 @@ If you use SNaQ, please cite
- Claudia Sol&iacute;s-Lemus and C&eacute;cile An&eacute; (2016).
Inferring Phylogenetic Networks with Maximum Pseudolikelihood under Incomplete Lineage Sorting.
[PLoS Genet](http://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1005896)
12(3):e1005896. doi: 10.1371/journal.pgen.1005896
12(3):e1005896.
[doi:10.1371/journal.pgen.1005896](https://doi.org/10.1371/journal.pgen.1005896)

## Phylogenetic comparative methods for trait evolution

Expand All @@ -63,7 +68,7 @@ with or without transgressive evolution after reticulations:

- Bastide, Solís-Lemus, Kriebel, Sparks, Ané (2018).
Phylogenetic Comparative Methods for Phylogenetic Networks with Reticulations.
Systematic Biology.
Systematic Biology, 67(5):800–820.
[doi:10.1093/sysbio/syy033](https://doi.org/10.1093/sysbio/syy033).
SI on [dryad](http://dx.doi.org/10.5061/dryad.nt2g6)
including a [tutorial for trait evolution](https://datadryad.org/bitstream/handle/10255/dryad.177752/xiphophorus_PCM_analysis.html?sequence=1)
Expand Down
26 changes: 14 additions & 12 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
julia 0.6 0.7-
BioSequences 0.7
BioSymbols 1.0
Combinatorics 0.2.1
CSV 0.2.1
DataFrames 0.11 # requires and re-exports Missings
DataStructures 0.5.2
GLM 0.10 # requires StatsModels, Distributions
NLopt 0.3
StaticArrays 0.6.0
StatsBase 0.22
StatsFuns 0.6.1
julia 0.7
BioSequences 1.0
BioSymbols 3.0
Combinatorics 0.7
CSV 0.4
DataFrames 0.13
DataStructures 0.9
GLM 1.0
NLopt 0.5.1
SpecialFunctions 0.7
StaticArrays 0.8.3
StatsBase 0.26
StatsFuns 0.7
StatsModels 0.3
16 changes: 16 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433"
# will be added by Travis as being developed:
# PhyloNetworks = "33ad39ac-ed31-50eb-9b15-43d0656eaa72"
# packages used in the manual pages:
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
# will be added to track master version in make.jl:
# PhyloPlots = "c0d5b6db-e3fc-52bc-a87d-1d050989ed3b"
RCall = "6f49c342-dc21-5d91-9882-a32aef131414"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"

[compat]
Documenter = "~0.21"
42 changes: 33 additions & 9 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
using Documenter, PhyloNetworks
using Documenter, DocumenterMarkdown

makedocs()
using Pkg
Pkg.add(PackageSpec(name="PhyloPlots", rev="master"))

using PhyloNetworks

makedocs(
sitename = "PhyloNetworks.jl",
authors = "Claudia Solís-Lemus, Cécile Ané, Paul Bastide and contributors.",
modules = [PhyloNetworks], # to list methods from PhyloNetworks only, not from Base etc.
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"), # easier local build
pages = [
"Home" => "index.md",
"Manual" => [
"Installation" => "man/installation.md",
"Input Data for SNaQ" => "man/inputdata.md",
"TICR pipeline" => "man/ticr_howtogetQuartetCFs.md",
"Network estimation and display" => "man/snaq_plot.md",
"Network comparison and manipulation" => "man/dist_reroot.md",
"Candidate Networks" => "man/fixednetworkoptim.md",
"Extract Expected CFs" => "man/expectedCFs.md",
"Bootstrap" => "man/bootstrap.md",
"Multiple Alleles" => "man/multiplealleles.md",
"Continuous Trait Evolution" => "man/trait_tree.md",
"Parsimony on networks" => "man/parsimony.md",
],
"Library" => [
"Public" => "lib/public.md",
"Internals" => "lib/internals.md",
]
],
)

# Versions of `mkdocs` and `mkdocs-material` specified manually to avoid conflicts.
# See here: https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/3
# To be kept in mind: those versions might evolve in the future.
deploydocs(
deps = Deps.pip("pygments", "mkdocs==0.17.5", "mkdocs-material==2.9.4", "python-markdown-math"),
repo = "github.com/crsl4/PhyloNetworks.jl.git",
julia = "0.6",
osname = "linux"
repo = "github.com/crsl4/PhyloNetworks.jl.git"
)
13 changes: 0 additions & 13 deletions docs/make.sh

This file was deleted.

45 changes: 0 additions & 45 deletions docs/mkdocs.yml

This file was deleted.

Loading

0 comments on commit daeffdc

Please sign in to comment.