Skip to content

Commit

Permalink
Merge pull request #108 from OpenTreeOfLife/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
mtholder authored Jun 22, 2021
2 parents 5b19cfb + 93945c0 commit 2b5ff72
Show file tree
Hide file tree
Showing 57 changed files with 4,068 additions and 529 deletions.
124 changes: 124 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
name: Build and test

on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
build:
strategy:
matrix:
name: [ubuntu-gcc-9,
ubuntu-gcc-10,
# ubuntu-clang-9,
# macos-xcode-12.3,
]

include:
- name: ubuntu-gcc-9
os: ubuntu-20.04
compiler: gcc
version: "9"

- name: ubuntu-gcc-10
os: ubuntu-20.04
compiler: gcc
version: "10"

# - name: ubuntu-clang-9
# os: ubuntu-20.04
# compiler: clang
# version: "9"

# - name: macos-xcode-12.3
# os: macos-latest
# compiler: xcode
# version: "12.3"

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install (Linux)
if: runner.os == 'Linux'
run: |
sudo apt install -y ccache libboost-all-dev
sudo rm -rf /usr/local/share/boost
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.version }}
echo "CC=ccache gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=ccache g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.version }}
echo "CC=ccache clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=ccache clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
- name: Install (macOS)
if: runner.os == 'macOS'
run: |
brew install pkg-config boost ccache coreutils
echo "DEVELOPER_DIR=/Applications/Xcode_${{ matrix.version }}.app/Contents/Developer" >> $GITHUB_ENV
echo "CC=ccache clang" >> $GITHUB_ENV
echo "CXX=ccache clang++" >> $GITHUB_ENV
ccache --set-config=cache_dir=$HOME/.ccache
- name: Install meson
run: |
python3 -mpip install meson ninja
# Caches for different branches are isolated, so we don't need to put the branch name into the key.

- name: Prepare ccache timestamp
id: ccache_cache_timestamp
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
stamp=$(date '+%s')
else
stamp=$(gdate '+%s')
fi
echo "${stamp}"
echo "::set-output name=timestamp::${stamp}"
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ matrix.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ matrix.name }}-ccache-
- name: build restbed
run: |
cd
git clone --recursive https://github.com/corvusoft/restbed.git
mkdir restbed/build
( cd restbed/build ; cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_TESTS=NO -DBUILD_SSL=NO -DCMAKE_INSTALL_PREFIX="$HOME/local/" .. ; make ; make install )
echo "CPPFLAGS=-I${HOME}/local/include" >> $GITHUB_ENV
echo "LDFLAGS=-L${HOME}/local/lib -L${HOME}/local/library" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${HOME}/local/lib:${HOME}/local/library:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Configure otcetera
run: |
cd ${GITHUB_WORKSPACE}
meson build --prefix=$HOME/local --buildtype=release ${ARGS}
- name: Build otcetera
run: |
ccache -p
ninja -C build install -j4
ccache -s
- name: Run otcetera tests
run: |
python3 -mpip install requests
ninja -C build test
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ flag, then you can choose between a GPL or BSD license.
If you use the --with-webservices=yes configure flag, only the
GPL is permitted.

Copyright (c) 2015-2017 Mark T. Holder and Benjamin D. Redelings
Copyright (c) 2015-2020 Mark T. Holder and Benjamin D. Redelings
All rights reserved.

otcetera builds upon NCL and is distributed under the same license:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"message": "[/v3/tree_of_life/induced_subtree] Error: node_id 'asdf' was not found!",
"unknown": {
"asdf": "unknown_id"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
400
10 changes: 10 additions & 0 deletions data/synth-setups/synth-2/expectedws/node_lookup/1/method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url_fragment": "v3/tree_of_life/induced_subtree",
"verb": "POST",
"arguments": {
"node_ids": ["ott916750", "ott81461", "asdf"],
"height_limit": 10,
"label_format": "name_and_id",
"format": "newick"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"message": "[/v3/tree_of_life/induced_subtree] Error: node_id 'ott111111111111111111111111111111' was not found!",
"unknown": {
"ott111111111111111111111111111111": "unknown_id"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
400
10 changes: 10 additions & 0 deletions data/synth-setups/synth-2/expectedws/node_lookup/2/method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url_fragment": "v3/tree_of_life/induced_subtree",
"verb": "POST",
"arguments": {
"node_ids": ["ott916750", "ott81461", "ott111111111111111111111111111111"],
"height_limit": 10,
"label_format": "name_and_id",
"format": "newick"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"message": "[/v3/tree_of_life/induced_subtree] Error: node_id 'ott11111111' was not found!",
"unknown": {
"ott11111111": "invalid_ott_id"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
400
10 changes: 10 additions & 0 deletions data/synth-setups/synth-2/expectedws/node_lookup/3/method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url_fragment": "v3/tree_of_life/induced_subtree",
"verb": "POST",
"arguments": {
"node_ids": ["ott916750", "ott81461", "ott11111111"],
"height_limit": 10,
"label_format": "name_and_id",
"format": "newick"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"message": "[/v3/tree_of_life/induced_subtree] Error: node_id 'ott671092' was not found!",
"unknown": {
"ott671092": "pruned_ott_id"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
400
10 changes: 10 additions & 0 deletions data/synth-setups/synth-2/expectedws/node_lookup/4/method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url_fragment": "v3/tree_of_life/induced_subtree",
"verb": "POST",
"arguments": {
"node_ids": ["ott916750", "ott81461", "ott671092"],
"height_limit": 10,
"label_format": "name_and_id",
"format": "newick"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"broken": {
"ott1007062": "ott304358"
},
"newick": "((((((((((((((Streptophyta_ott916750)Embryophyta_ott56610)Tracheophyta_ott10210)Euphyllophyta_ott1007992)Spermatophyta_ott10218)Magnoliophyta_ott99252)Mesangiospermae_ott5298374)Liliopsida_ott1058517)Petrosaviidae_ott5308424)Asparagales_ott557124)Amaryllidaceae_ott258473)Amaryllidoideae_ott267867)Archaeplastida_ott5268475)mrcaott56601ott4671788,(((((((((((((((((((Aves_ott81461)Coelurosauria_ott664351)Theropoda_ott664350)Saurischia_ott90223)Dinosauria_ott90215)Archosauria_ott335588)Archelosauria_ott4947372)'Sauria (order in Opisthokonta) ott329823')Sauropsida_ott639642)Amniota_ott229560)Tetrapoda_ott229562)Dipnotetrapodomorpha_ott4940726)Sarcopterygii_ott458402)Euteleostomi_ott114654)Teleostomi_ott114656)'Gnathostomata (superclass in phylum Chordata) ott278114')'Vertebrata (subphylum in Opisthokonta) ott801601')'Craniata (subphylum in Deuterostomia) ott947318')Chordata_ott125642)Deuterostomia_ott147604)Eukaryota_ott304358;",
"supporting_studies": [
"xx_2@Tree1"
]
}
10 changes: 10 additions & 0 deletions data/synth-setups/synth-2/expectedws/node_lookup/5/method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url_fragment": "v3/tree_of_life/induced_subtree",
"verb": "POST",
"arguments": {
"node_ids": ["ott916750", "ott81461", "ott1007062"],
"height_limit": 10,
"label_format": "name_and_id",
"format": "newick"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"message": "[/v3/tree_of_life/induced_subtree] Error: node_id 'ott671092' was not found!",
"unknown": {
"asdf": "unknown_id",
"ott11111111": "invalid_ott_id",
"ott671092": "pruned_ott_id"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
400
10 changes: 10 additions & 0 deletions data/synth-setups/synth-2/expectedws/node_lookup/6/method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url_fragment": "v3/tree_of_life/induced_subtree",
"verb": "POST",
"arguments": {
"node_ids": ["ott916750", "ott81461", "asdf", "ott11111111", "ott671092", "ott1007062"],
"height_limit": 10,
"label_format": "name_and_id",
"format": "newick"
}
}
2 changes: 1 addition & 1 deletion expected/solve-subproblem/is-clade-1/output
Original file line number Diff line number Diff line change
@@ -1 +1 @@
((((A1_ott1,(C1_ott5,C2_ott6)C_ott12),A2_ott2)A_ott10,(B1_ott3,B2_ott4)B_ott11)AB_ott20,D_ott7)root_ott100;
(((((C1_ott5,C2_ott6)C_ott12,A1_ott1),A2_ott2)A_ott10,(B1_ott3,B2_ott4)B_ott11)AB_ott20,D_ott7)root_ott100;
2 changes: 1 addition & 1 deletion expected/solve-subproblem/is-naming1/output
Original file line number Diff line number Diff line change
@@ -1 +1 @@
((A1_ott1,A2_ott2)A_ott10,((B1_ott3,C1_ott5),(B2_ott4,C2_ott6))B_ott11)root_ott100;
(((B1_ott3,C1_ott5),(B2_ott4,C2_ott6))B_ott11,(A1_ott1,A2_ott2)A_ott10)root_ott100;
6 changes: 6 additions & 0 deletions expectedws/node_lookup/1/expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"message": "[/v3/tree_of_life/induced_subtree] Error: node_id 'asdf' was not found!",
"unknown": {
"asdf": "unknown_id"
}
}
1 change: 1 addition & 0 deletions expectedws/node_lookup/1/expected_code.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
400
10 changes: 10 additions & 0 deletions expectedws/node_lookup/1/method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url_fragment": "v3/tree_of_life/induced_subtree",
"verb": "POST",
"arguments": {
"node_ids": ["ott1", "ott13", "asdf"],
"height_limit": 10,
"label_format": "name_and_id",
"format": "newick"
}
}
6 changes: 6 additions & 0 deletions expectedws/node_lookup/2/expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"message": "[/v3/tree_of_life/induced_subtree] Error: node_id 'ott111111111111111111111111111111' was not found!",
"unknown": {
"ott111111111111111111111111111111": "unknown_id"
}
}
1 change: 1 addition & 0 deletions expectedws/node_lookup/2/expected_code.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
400
10 changes: 10 additions & 0 deletions expectedws/node_lookup/2/method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url_fragment": "v3/tree_of_life/induced_subtree",
"verb": "POST",
"arguments": {
"node_ids": ["ott1", "ott13", "ott111111111111111111111111111111"],
"height_limit": 10,
"label_format": "name_and_id",
"format": "newick"
}
}
6 changes: 6 additions & 0 deletions expectedws/node_lookup/3/expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"message": "[/v3/tree_of_life/induced_subtree] Error: node_id 'ott11111111' was not found!",
"unknown": {
"ott11111111": "invalid_ott_id"
}
}
1 change: 1 addition & 0 deletions expectedws/node_lookup/3/expected_code.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
400
10 changes: 10 additions & 0 deletions expectedws/node_lookup/3/method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url_fragment": "v3/tree_of_life/induced_subtree",
"verb": "POST",
"arguments": {
"node_ids": ["ott1", "ott13", "ott11111111"],
"height_limit": 10,
"label_format": "name_and_id",
"format": "newick"
}
}
12 changes: 11 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ project('otcetera', ['cpp'],
version: '0.0.01-dev',
default_options: [
'buildtype=release',
'b_ndebug=if-release',
'cpp_std=c++17',
'warning_level=3'
],
Expand Down Expand Up @@ -69,7 +70,16 @@ summary({'webservices': get_option('webservices'),
summary({'prefix': get_option('prefix'),
},section: 'Directories')

assertions_off = get_option('b_ndebug') == 'true' or (get_option('b_ndebug') == 'if-release' and
(get_option('buildtype') == 'release' or
get_option('buildtype') == 'plain')
)
assertions_enabled = 'enabled'
if assertions_off
assertions_enabled = 'disabled'
endif

summary({'optimization': get_option('optimization'),
'b_ndebug': get_option('b_ndebug'),
'debug': get_option('debug'),
'assertions': assertions_enabled,
},section: 'Build')
Loading

0 comments on commit 2b5ff72

Please sign in to comment.