Skip to content

Commit 7adea3e

Browse files
committed
Merge branch 'master' of https://github.com/Lazy-poet/sequenceserver into issue/551
2 parents a6a8f5c + 11af7eb commit 7adea3e

57 files changed

Lines changed: 5772 additions & 766 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow was added by CodeSee. Learn more at https://codesee.io/
2+
# This is v2.0 of this workflow file
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request_target:
8+
types: [opened, synchronize, reopened]
9+
10+
name: CodeSee
11+
12+
permissions: read-all
13+
14+
jobs:
15+
codesee:
16+
runs-on: ubuntu-latest
17+
continue-on-error: true
18+
name: Analyze the repo with CodeSee
19+
steps:
20+
- uses: Codesee-io/codesee-action@v2
21+
with:
22+
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}

.github/workflows/tests.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Run the old Travis tests within GitHub Actions, and upload the CodeClimate Report
2+
#
3+
# If nektos/act is installed as a GitHub CLI extension...
4+
# https://github.com/nektos/act#installation-as-github-cli-extension
5+
# ...then run this locally with:
6+
# gh act -j test
7+
# Appending to $PATH: https://www.scivision.dev/github-actions-path-append/
8+
# Conditionals predicated on status-codes:
9+
# https://github.com/orgs/community/discussions/25809
10+
#
11+
# One can *try* action-validator, but there are false-negatives:
12+
# (https://github.com/mpalmer/action-validator
13+
#
14+
# State does *not* persist between jobs...
15+
# https://github.com/actions/checkout/issues/19
16+
# ...so all this needs to happen in a single job.
17+
#
18+
name: Tests
19+
on:
20+
push:
21+
branches:
22+
- 1.0.x
23+
- master
24+
pull_request:
25+
branches:
26+
- 1.0.x
27+
- master
28+
env:
29+
CC_TEST_REPORTER_ID: ec48bb03c72db6b43ce71fd488110b4707abfde4386c144d886d711378d8db64
30+
jobs:
31+
test:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
- name: Get BLAST
36+
working-directory: /opt
37+
run: wget -c "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.12.0/ncbi-blast-2.12.0+-x64-linux.tar.gz" && tar xvf ncbi-blast-*.tar.gz
38+
- name: BLAST PATH
39+
run: mkdir /opt/bin && echo "/opt/bin:/opt/ncbi-blast-2.12.0+/bin" >> $GITHUB_PATH
40+
- name: Get Chromium
41+
run: sudo apt-get update && sudo apt-get install -y chromium-bsu chromium-driver
42+
- name: Get CodeClimate
43+
working-directory: /opt
44+
run: wget -c "https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64" -O bin/cc-test-reporter && chmod +x bin/cc-test-reporter
45+
- name: Set up Ruby
46+
uses: ruby/setup-ruby@v1
47+
with:
48+
ruby-version: '3.2'
49+
bundler-cache: true
50+
- name: Install dependencies
51+
run: bundle install
52+
- name: Create SequenceServer config file
53+
run: bundle exec bin/sequenceserver -s -d spec/database/v5/sample
54+
- name: CodeClimate before-build hook
55+
run: cc-test-reporter before-build
56+
- name: Run main specs and import spec for BLAST 2.9.0+
57+
id: rspec
58+
continue-on-error: true
59+
run: bundle exec rspec spec/*_spec.rb spec/blast_versions/blast_2.9.0/*
60+
- name: CodeClimate after-build (success)
61+
if: steps.rspec.outcome == 'success'
62+
run: cc-test-reporter after-build --exit-code 0
63+
- name: CodeClimate after-build (failure)
64+
if: steps.rspec.outcome != 'success'
65+
run: cc-test-reporter after-build --exit-code 1
66+
- name: upload code coverage results
67+
uses: actions/upload-artifact@v3
68+
if: success() || failure()
69+
with:
70+
name: code-coverage-report
71+
path: coverage

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ doc
1515
# jeweler generated
1616
pkg
1717

18-
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
18+
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
1919
#
2020
# * Create a file at ~/.gitignore
2121
# * Include files you want ignored
@@ -28,7 +28,7 @@ pkg
2828
#
2929
# For MacOS:
3030
#
31-
#.DS_Store
31+
.DS_Store
3232

3333
# For TextMate
3434
#*.tmproj
@@ -54,3 +54,6 @@ pkg
5454
.gems/*
5555
Gemfile.lock
5656
node_modules
57+
58+
spec/dotdir/*
59+
spec/downloads/*

.rubocop.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AllCops:
2-
TargetRubyVersion: 2.6
2+
TargetRubyVersion: 3.0
33
Exclude:
44
# Because these are vendor files.
55
- 'node_modules/**/*'
@@ -8,6 +8,7 @@ Metrics/AbcSize:
88
Exclude:
99
# TODO
1010
- 'lib/sequenceserver.rb'
11+
- 'spec/**/*'
1112
Metrics/MethodLength:
1213
# Because 15 lines in a method is just about as good as 10 (default). And we
1314
# have a couple that can't be helped.
@@ -30,6 +31,7 @@ Metrics/BlockLength:
3031
Exclude:
3132
- 'bin/sequenceserver'
3233
- 'sequenceserver.gemspec'
34+
- 'spec/**/*'
3335

3436
Style/UnlessElse:
3537
# TODO:

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: ruby
22

33
rvm:
4-
- 2.3
5-
# - 2.5
4+
- 3.0
5+
- 3.2
66

77
branches:
88
only:

Dockerfile

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Build variables. These need to be declared befored the first FROM
22
# for the variables to be accessible in FROM instruction.
3-
ARG BLAST_VERSION=2.12.0
3+
ARG BLAST_VERSION=2.14.0
44

55
## Stage 1: gem dependencies.
6-
FROM ruby:2.7-slim-buster AS builder
6+
FROM ruby:3.2.0-slim-buster AS builder
77

88
# Copy over files required for installing gem dependencies.
99
WORKDIR /sequenceserver
@@ -17,13 +17,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1717
# Install gem dependencies using bundler.
1818
RUN bundle install --without=development
1919

20-
2120
## Stage 2: BLAST+ binaries.
2221
# We will copy them from NCBI's docker image.
2322
FROM ncbi/blast:${BLAST_VERSION} AS ncbi-blast
2423

2524
## Stage 3: Puting it together.
26-
FROM ruby:2.7-slim-buster AS final
25+
FROM ruby:3.2.0-slim-buster AS final
2726

2827
LABEL Description="Intuitive local web frontend for the BLAST bioinformatics tool"
2928
LABEL MailingList="https://groups.google.com/forum/#!forum/sequenceserver"
@@ -51,7 +50,7 @@ ENV PATH=/blast/bin:${PATH}
5150
# Setup working directory, volume for databases, port, and copy the code.
5251
# SequenceServer code.
5352
WORKDIR /sequenceserver
54-
VOLUME ["/db"]
53+
RUN mkdir /db
5554
EXPOSE 4567
5655
COPY . .
5756

@@ -88,4 +87,20 @@ FROM final AS minify
8887
COPY --from=node /usr/src/app/public/sequenceserver-*.min.js public/
8988
COPY --from=node /usr/src/app/public/css/sequenceserver.min.css public/css/
9089

90+
## Stage 6 (optional) Pull the example database from the debian package.
91+
FROM ruby:3.2.0-slim-buster AS example_db
92+
93+
WORKDIR /tmp
94+
RUN apt-get update && apt-get download ncbi-blast+ && dpkg-deb -xv ncbi-blast+*.deb .
95+
96+
FROM final AS dev
97+
98+
RUN bundle install
99+
100+
COPY --from=example_db /tmp/usr/share/doc/ncbi-blast+/examples /db/
101+
102+
VOLUME ["/db"]
103+
91104
FROM final
105+
106+
VOLUME ["/db"]

0 commit comments

Comments
 (0)