Skip to content

Commit

Permalink
Restore .travis.yml; fix scons conda install and update rna_suites fu…
Browse files Browse the repository at this point in the history
…llhelp
  • Loading branch information
chapincavender committed Aug 6, 2020
1 parent 00ca978 commit 2d2cead
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 9 deletions.
50 changes: 50 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
language: cpp

branches:
only:
- master

matrix:
include:
- os: linux
- os: osx
osx_image: xcode10.1


#addons:
# apt:
# packages:
# - scons
# - libboost-all-dev
# - libboost-regex-dev
# - libatlas-base-dev
# - libnetcdf-dev
# - swig
# - python3-dev
# - python3-numpy
# - python3-scipy
# - libeigen3-dev
#
#before_install:
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
## - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install boost; fi
## - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install netcdf; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install swig; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install doxygen; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install graphviz; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install scons; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install eigen; fi

install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
- conda config --set always_yes yes --set changeps1 no

script:
- ./conda_build.sh loos 1
17 changes: 9 additions & 8 deletions Tools/rna_suites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ string fullHelpMessage(void) {
" reference suites on the command-line. The format is explained in the next\n"
" section. An example of the format that implements the suites as defined in\n"
" the software suitename (Richardson et al. (2008) RNA 14, 465-481) is\n"
" included as $PREFIX/share/suitename_definitions.dat, where $PREFIX is the\n"
" PREFIX argument given to \"scons install\". The default scons prefix is\n"
" PREFIX=/opt/LOOS. This suitename_defintions.dat file should be sufficient\n"
" for typical users, but you must specify the path to it as the first\n"
" positional argument.\n"
" included as share/suitename_definitions.dat in the top-level directory of\n"
" the LOOS source tree. If installing within a conda environment, this file\n"
" can also be found in $CONDA_PREFIX/share/loos/suitename_definitions.dat;\n"
" otherwise, it can be found in $LOOS/share/suitename_definitions.dat. The\n"
" suitename_defintions.dat file should be sufficient for typical users, but\n"
" you must specify the path to it as the first positional argument.\n"
"\n"
"SUITE DEFINITON FILE FORMAT\n"
" Each line in the file is parsed as a record containing fields with a width\n"
Expand Down Expand Up @@ -126,14 +127,14 @@ string fullHelpMessage(void) {
" is given in field 2 and maximum value in field 3.\n"
"\n"
"EXAMPLES\n"
" rna_suites $CONDA_PREFIX/share/suitename_defintions.dat foo.pdb foo.dcd\n"
" rna_suites $CONDA_PREFIX/share/loos/suitename_defintions.dat foo.pdb foo.dcd\n"
" Assign backbone suites using the install prefix from a conda install.\n"
"\n"
" rna_suites -s 'resid <= 10' $CONDA_PREFIX/share/suitename_defintions.dat \\\n"
" rna_suites -s 'resid <= 10' $CONDA_PREFIX/share/loos/suitename_defintions.dat \\\n"
" foo.pdb foo.dcd\n"
" Assign backbone suites only for the first 10 residues.\n"
"\n"
" rna_suites -c 0.001 $CONDA_PREFIX/share/suitename_defintions.dat \\\n"
" rna_suites -c 0.001 $CONDA_PREFIX/share/loos/suitename_defintions.dat \\\n"
" foo.pdb foo.dcd\n"
" Assign backbone suites using a minimum suiteness of 0.001 for\n"
" non-outliers.\n";
Expand Down
7 changes: 6 additions & 1 deletion share/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ clone.Prepend(LIBS = [loos])

files = 'suitename_definitions.dat'
PREFIX = env['PREFIX']
share_path = os.path.join(PREFIX, "share")

if env.USING_CONDA:
share_path = os.path.join(PREFIX, "share", "loos")
else:
share_path = os.path.join(PREFIX, "share")

shared_files = env.Install(share_path, Split(files))

shared_list = Split(files)
Expand Down

0 comments on commit 2d2cead

Please sign in to comment.