Skip to content

Commit

Permalink
Merge branch 'crsl4:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
tkchafin authored Sep 26, 2021
2 parents acecd7f + 3806227 commit a902d94
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 165 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ jobs:
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
1 change: 1 addition & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ jobs:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI

on:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1' # will expand to the latest stable 1.x release of Julia.
os:
- ubuntu-latest
- macos-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- run: echo "LD_LIBRARY_PATH=$(R RHOME)/lib" >> $GITHUB_ENV
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- name: install dependencie
run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- name: make docs
run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"

[compat]
BioSequences = "2.0"
BioSymbols = "4.0"
BioSymbols = "4.0, 5"
CSV = "0.4, 0.5, 0.6, 0.7, 0.8"
Combinatorics = "0.7, 1.0"
DataFrames = "0.21, 0.22, 1.0"
DataStructures = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18"
Distributions = "0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24"
Distributions = "0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25"
FASTX = "1.1"
GLM = "1.1, 1.2, 1.3, 1.4"
NLopt = "0.5.1, 0.6"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PhyloNetworks: analysis for phylogenetic networks <img src="docs/src/logo_text.png" align=right>

[![Build Status](https://travis-ci.com/crsl4/PhyloNetworks.jl.svg?branch=master)](https://travis-ci.com/crsl4/PhyloNetworks.jl)
[![Build status](https://github.com/crsl4/PhyloNetworks.jl/workflows/CI/badge.svg?branch=master)](https://github.com/crsl4/PhyloNetworks.jl/actions/workflows/ci.yml)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://crsl4.github.io/PhyloNetworks.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://crsl4.github.io/PhyloNetworks.jl/dev)
[![codecov](https://codecov.io/gh/crsl4/PhyloNetworks.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/crsl4/PhyloNetworks.jl)
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433"
# will be added by Travis as being developed:
# will be added by the CI platform as being developed:
# PhyloNetworks = "33ad39ac-ed31-50eb-9b15-43d0656eaa72"
# will be added to track master version in make.jl:
# PhyloPlots = "c0d5b6db-e3fc-52bc-a87d-1d050989ed3b"
Expand Down
119 changes: 2 additions & 117 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## how it works: overview

- `.travis.yml` asks to start the doc project
- `.github/workflows/ci.yml` asks to start the doc project
(installs R and dependencies like `PhyloPlots` & `Documenter`) and
run `./docs/make.jl` after a successful test & build.
- the julia script `docs/make.jl` has these steps:
Expand Down Expand Up @@ -42,11 +42,9 @@ is run in its own anonymous Modules.

Some of these blocs may contain plots, which are going to be drawn during the
process, requiring the use of `PhyloPlots` along with `RCall`. Hence,
before the doc is built, the script `.travis.yml` installs `R` on the server,
before the doc is built, `.github/workflows/ci.yml` installs `R` on the server,
sets up the julia environment with dependencies like `PhyloPlots` before
starting the build in itself.
Note that, for an unknown reason, `R` must be installed *outside* of (the former) `make.sh`,
in the main body of `.travis.sh`.

### Directory of the plots

Expand Down Expand Up @@ -130,116 +128,3 @@ big difference:
The first version will look for a *section* header "blabla", to link to that section.
The secon version will look for a *function* named "blabla",
to link to the documentation for that function.

## earlier versions

### weave

[`Weave`](https://github.com/mpastell/Weave.jl) was used to format the
documentation pages until PhyloNetworks v0.7.0
(see [v0.7.0 doc](http://crsl4.github.io/PhyloNetworks.jl/v0.7.0/)),
and the saving of the plots on the Git repository was handled with an
extra Travis environment variable DRAW_FIG.
Instructions about this previous previous setup can be found in this very
[docs/readme file, in v0.7.0](https://github.com/crsl4/PhyloNetworks.jl/blob/v0.7.0/docs/readme.md).
An extra step used file [make_weave.jl](https://github.com/crsl4/PhyloNetworks.jl/blob/v0.7.0/docs/src/man/src/make_weave.jl).

### mkdocs

[MkDocs](http://www.mkdocs.org) was used to format the documentation pages until
PhyloNetworks [v0.8.0](http://crsl4.github.io/PhyloNetworks.jl/v0.8.0/).
For this:
- `makedocs( ..., format = Markdown(), ...)`
created vanilla "GitHub md" files only (no html conversion),
- `deploydocs` called `mkdocs` to turn the markdown files in `docs/build/*.md` into html files:

deploydocs(
repo = ...,
deps= Deps.pip("pygments", "mkdocs==0.17.5", "mkdocs-material==2.9.4", "python-markdown-math"),
make = () -> run(`mkdocs build`),
target = "site" # which files get copied to gh-pages
)

problem: Travis uses python 2, but mkdocs v1.0 needs python 3.
Versions of `mkdocs` and `mkdocs-material` specified manually to avoid conflicts,
See https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/3
- In this conversion, the `mkdocs-material` package was used, for its "material" theme,
via configuration in the `mkdocs.yml` file, in `docs/`:


```yml
# this is for MkDocs, to turn the .md files produced by Documenter into .html files
site_name: PhyloNetworks.jl
repo_url: https://github.com/crsl4/PhyloNetworks.jl
site_description: PhyloNetworks is a Julia package for the manipulation, visualization and inference of phylogenetic networks.
site_author: Claudia Sol&iacute;s-Lemus

theme:
name: 'material'
palette:
primary: 'teal'
accent: 'teal'
logo: 'snaq_small.png'

extra_css:
- assets/Documenter.css

extra_javascript:
- https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML
- assets/mathjaxhelper.js

markdown_extensions:
- extra
- tables
- fenced_code
- mdx_math
- codehilite

docs_dir: 'build'

nav:
- 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
```
to check/install MkDocs:
```shell
pip install --upgrade pip
pip install --upgrade mkdocs
pip install --upgrade mkdocs-material
pip install --upgrade python-markdown-math
```
and check the installed versions:
(in comments are versions that work okay together):
```shell
python --version # Python 3.5.5 :: Anaconda, Inc.
mkdocs --version # v0.17.4 v1.0.4
pip show mkdocs-material # v2.9.2 v3.2.0
pip show Pygments # v2.2.0 v2.3.1
pip show pymdown-extensions # v4.11 v4.11
pip show python-markdown-math # v0.6 v0.6
```

then use mkdocs to build the site.
this step creates a `site/` directory with html files.
they can be viewed at http://127.0.0.1:8000 (follow instructions)

```shell
mkdocs build
mkdocs serve
```
6 changes: 2 additions & 4 deletions test/test_phyLiNCoptimization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,11 @@ for nohybridladder in [true, false]
=#
obj = PhyloNetworks.StatisticalSubstitutionModel(net, fastasimple, :JC69)
obj.loglik = -Inf # missing otherwise, which would cause an error below
nullio = open("/dev/null", "w")
γcache = PhyloNetworks.CacheGammaLiNC(obj)
lcache = PhyloNetworks.CacheLengthLiNC(obj, 1e-6,1e-6,1e-2,1e-3, 5)
@test_nowarn PhyloNetworks.phyLiNCone!(obj, 1, no3cycle,
nohybridladder, 3, 2, false, false,
nullio, seed, 0.5, emptyconstraint,
devnull, seed, 0.5, emptyconstraint,
1e-2, 1e-2, 1e-2, 1e-2, 0.0, 25.0, 0.01,0.9,
γcache, lcache)
@test obj.loglik > -27.45
Expand Down Expand Up @@ -335,11 +334,10 @@ end
PhyloNetworks.setalpha!(obj.ratemodel, 0.48438)
obj.loglik = -Inf # actual likelihood -56.3068141288164. Need something non-missing
seed = 103
nullio = open("/dev/null", "w")
γcache = PhyloNetworks.CacheGammaLiNC(obj)
lcache = PhyloNetworks.CacheLengthLiNC(obj, 1e-2,1e-2,1e-2,1e-2, 5)
@test_nowarn PhyloNetworks.phyLiNCone!(obj, 2, true, true,
3, 2, false, false, nullio,
3, 2, false, false, devnull,
seed, 0.5, c_species, 1e-2, 1e-2,
1e-2, 1e-2, 0.0,50.0, 0.01,.9, γcache, lcache)
@test obj.loglik > -65.4 # -65.0 with RNG from julia 1.5
Expand Down

0 comments on commit a902d94

Please sign in to comment.