Skip to content

Commit a902d94

Browse files
authored
Merge branch 'crsl4:master' into master
2 parents acecd7f + 3806227 commit a902d94

File tree

9 files changed

+80
-165
lines changed

9 files changed

+80
-165
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ jobs:
1313
- name: CompatHelper.main()
1414
env:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
1617
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/TagBot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ jobs:
1212
- uses: JuliaRegistries/TagBot@v1
1313
with:
1414
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
tags: '*'
11+
12+
jobs:
13+
test:
14+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
version:
20+
- '1' # will expand to the latest stable 1.x release of Julia.
21+
os:
22+
- ubuntu-latest
23+
- macos-latest
24+
- windows-latest
25+
arch:
26+
- x64
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: r-lib/actions/setup-r@v1
30+
- uses: julia-actions/setup-julia@v1
31+
with:
32+
version: ${{ matrix.version }}
33+
arch: ${{ matrix.arch }}
34+
- uses: actions/cache@v1
35+
env:
36+
cache-name: cache-artifacts
37+
with:
38+
path: ~/.julia/artifacts
39+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
40+
restore-keys: |
41+
${{ runner.os }}-test-${{ env.cache-name }}-
42+
${{ runner.os }}-test-
43+
${{ runner.os }}-
44+
- uses: julia-actions/julia-buildpkg@v1
45+
- uses: julia-actions/julia-runtest@v1
46+
- uses: julia-actions/julia-processcoverage@v1
47+
- uses: codecov/codecov-action@v1
48+
with:
49+
file: lcov.info
50+
docs:
51+
name: Documentation
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v2
55+
- uses: r-lib/actions/setup-r@v1
56+
- run: echo "LD_LIBRARY_PATH=$(R RHOME)/lib" >> $GITHUB_ENV
57+
- uses: julia-actions/setup-julia@v1
58+
with:
59+
version: '1'
60+
- name: install dependencie
61+
run: |
62+
julia --project=docs -e '
63+
using Pkg
64+
Pkg.develop(PackageSpec(path=pwd()))
65+
Pkg.instantiate()'
66+
- name: make docs
67+
run: julia --project=docs docs/make.jl
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"
2727

2828
[compat]
2929
BioSequences = "2.0"
30-
BioSymbols = "4.0"
30+
BioSymbols = "4.0, 5"
3131
CSV = "0.4, 0.5, 0.6, 0.7, 0.8"
3232
Combinatorics = "0.7, 1.0"
3333
DataFrames = "0.21, 0.22, 1.0"
3434
DataStructures = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18"
35-
Distributions = "0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24"
35+
Distributions = "0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25"
3636
FASTX = "1.1"
3737
GLM = "1.1, 1.2, 1.3, 1.4"
3838
NLopt = "0.5.1, 0.6"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PhyloNetworks: analysis for phylogenetic networks <img src="docs/src/logo_text.png" align=right>
22

3-
[![Build Status](https://travis-ci.com/crsl4/PhyloNetworks.jl.svg?branch=master)](https://travis-ci.com/crsl4/PhyloNetworks.jl)
3+
[![Build status](https://github.com/crsl4/PhyloNetworks.jl/workflows/CI/badge.svg?branch=master)](https://github.com/crsl4/PhyloNetworks.jl/actions/workflows/ci.yml)
44
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://crsl4.github.io/PhyloNetworks.jl/stable)
55
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://crsl4.github.io/PhyloNetworks.jl/dev)
66
[![codecov](https://codecov.io/gh/crsl4/PhyloNetworks.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/crsl4/PhyloNetworks.jl)

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
44
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
55
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
66
DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433"
7-
# will be added by Travis as being developed:
7+
# will be added by the CI platform as being developed:
88
# PhyloNetworks = "33ad39ac-ed31-50eb-9b15-43d0656eaa72"
99
# will be added to track master version in make.jl:
1010
# PhyloPlots = "c0d5b6db-e3fc-52bc-a87d-1d050989ed3b"

docs/readme.md

Lines changed: 2 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
## how it works: overview
99

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

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

5149
### Directory of the plots
5250

@@ -130,116 +128,3 @@ big difference:
130128
The first version will look for a *section* header "blabla", to link to that section.
131129
The secon version will look for a *function* named "blabla",
132130
to link to the documentation for that function.
133-
134-
## earlier versions
135-
136-
### weave
137-
138-
[`Weave`](https://github.com/mpastell/Weave.jl) was used to format the
139-
documentation pages until PhyloNetworks v0.7.0
140-
(see [v0.7.0 doc](http://crsl4.github.io/PhyloNetworks.jl/v0.7.0/)),
141-
and the saving of the plots on the Git repository was handled with an
142-
extra Travis environment variable DRAW_FIG.
143-
Instructions about this previous previous setup can be found in this very
144-
[docs/readme file, in v0.7.0](https://github.com/crsl4/PhyloNetworks.jl/blob/v0.7.0/docs/readme.md).
145-
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).
146-
147-
### mkdocs
148-
149-
[MkDocs](http://www.mkdocs.org) was used to format the documentation pages until
150-
PhyloNetworks [v0.8.0](http://crsl4.github.io/PhyloNetworks.jl/v0.8.0/).
151-
For this:
152-
- `makedocs( ..., format = Markdown(), ...)`
153-
created vanilla "GitHub md" files only (no html conversion),
154-
- `deploydocs` called `mkdocs` to turn the markdown files in `docs/build/*.md` into html files:
155-
156-
deploydocs(
157-
repo = ...,
158-
deps= Deps.pip("pygments", "mkdocs==0.17.5", "mkdocs-material==2.9.4", "python-markdown-math"),
159-
make = () -> run(`mkdocs build`),
160-
target = "site" # which files get copied to gh-pages
161-
)
162-
163-
problem: Travis uses python 2, but mkdocs v1.0 needs python 3.
164-
Versions of `mkdocs` and `mkdocs-material` specified manually to avoid conflicts,
165-
See https://discourse.julialang.org/t/mkdocs-material-in-documenter/13764/3
166-
- In this conversion, the `mkdocs-material` package was used, for its "material" theme,
167-
via configuration in the `mkdocs.yml` file, in `docs/`:
168-
169-
170-
```yml
171-
# this is for MkDocs, to turn the .md files produced by Documenter into .html files
172-
site_name: PhyloNetworks.jl
173-
repo_url: https://github.com/crsl4/PhyloNetworks.jl
174-
site_description: PhyloNetworks is a Julia package for the manipulation, visualization and inference of phylogenetic networks.
175-
site_author: Claudia Sol&iacute;s-Lemus
176-
177-
theme:
178-
name: 'material'
179-
palette:
180-
primary: 'teal'
181-
accent: 'teal'
182-
logo: 'snaq_small.png'
183-
184-
extra_css:
185-
- assets/Documenter.css
186-
187-
extra_javascript:
188-
- https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML
189-
- assets/mathjaxhelper.js
190-
191-
markdown_extensions:
192-
- extra
193-
- tables
194-
- fenced_code
195-
- mdx_math
196-
- codehilite
197-
198-
docs_dir: 'build'
199-
200-
nav:
201-
- Home: index.md
202-
- Manual:
203-
- Installation: man/installation.md
204-
- Input Data for SNaQ: man/inputdata.md
205-
- TICR pipeline: man/ticr_howtogetQuartetCFs.md
206-
- Network estimation and display: man/snaq_plot.md
207-
- Network comparison and manipulation: man/dist_reroot.md
208-
- Candidate Networks: man/fixednetworkoptim.md
209-
- Extract Expected CFs: man/expectedCFs.md
210-
- Bootstrap: man/bootstrap.md
211-
- Multiple Alleles: man/multiplealleles.md
212-
- Continuous Trait Evolution: man/trait_tree.md
213-
- Parsimony on networks: man/parsimony.md
214-
- Library:
215-
- Public: lib/public.md
216-
- Internals: lib/internals.md
217-
```
218-
219-
to check/install MkDocs:
220-
221-
```shell
222-
pip install --upgrade pip
223-
pip install --upgrade mkdocs
224-
pip install --upgrade mkdocs-material
225-
pip install --upgrade python-markdown-math
226-
```
227-
and check the installed versions:
228-
(in comments are versions that work okay together):
229-
```shell
230-
python --version # Python 3.5.5 :: Anaconda, Inc.
231-
mkdocs --version # v0.17.4 v1.0.4
232-
pip show mkdocs-material # v2.9.2 v3.2.0
233-
pip show Pygments # v2.2.0 v2.3.1
234-
pip show pymdown-extensions # v4.11 v4.11
235-
pip show python-markdown-math # v0.6 v0.6
236-
```
237-
238-
then use mkdocs to build the site.
239-
this step creates a `site/` directory with html files.
240-
they can be viewed at http://127.0.0.1:8000 (follow instructions)
241-
242-
```shell
243-
mkdocs build
244-
mkdocs serve
245-
```

test/test_phyLiNCoptimization.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,11 @@ for nohybridladder in [true, false]
251251
=#
252252
obj = PhyloNetworks.StatisticalSubstitutionModel(net, fastasimple, :JC69)
253253
obj.loglik = -Inf # missing otherwise, which would cause an error below
254-
nullio = open("/dev/null", "w")
255254
γcache = PhyloNetworks.CacheGammaLiNC(obj)
256255
lcache = PhyloNetworks.CacheLengthLiNC(obj, 1e-6,1e-6,1e-2,1e-3, 5)
257256
@test_nowarn PhyloNetworks.phyLiNCone!(obj, 1, no3cycle,
258257
nohybridladder, 3, 2, false, false,
259-
nullio, seed, 0.5, emptyconstraint,
258+
devnull, seed, 0.5, emptyconstraint,
260259
1e-2, 1e-2, 1e-2, 1e-2, 0.0, 25.0, 0.01,0.9,
261260
γcache, lcache)
262261
@test obj.loglik > -27.45
@@ -335,11 +334,10 @@ end
335334
PhyloNetworks.setalpha!(obj.ratemodel, 0.48438)
336335
obj.loglik = -Inf # actual likelihood -56.3068141288164. Need something non-missing
337336
seed = 103
338-
nullio = open("/dev/null", "w")
339337
γcache = PhyloNetworks.CacheGammaLiNC(obj)
340338
lcache = PhyloNetworks.CacheLengthLiNC(obj, 1e-2,1e-2,1e-2,1e-2, 5)
341339
@test_nowarn PhyloNetworks.phyLiNCone!(obj, 2, true, true,
342-
3, 2, false, false, nullio,
340+
3, 2, false, false, devnull,
343341
seed, 0.5, c_species, 1e-2, 1e-2,
344342
1e-2, 1e-2, 0.0,50.0, 0.01,.9, γcache, lcache)
345343
@test obj.loglik > -65.4 # -65.0 with RNG from julia 1.5

0 commit comments

Comments
 (0)