Skip to content

Commit

Permalink
Merge pull request #2 from ncbo/master
Browse files Browse the repository at this point in the history
Sync: ncbo v5.33.0 release
  • Loading branch information
alexskr authored Oct 8, 2024
2 parents 63c9868 + d46d667 commit cd52aa9
Show file tree
Hide file tree
Showing 10 changed files with 144 additions and 111 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ruby-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
matrix:
backend: ['ruby', 'ruby-agraph'] # api runs tests with 4store backend and api-agraph runs with AllegroGraph backend
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: copy config file
run: cp config/config.test.rb config/config.rb
- name: Build docker-compose
run: docker-compose build
- name: Build docker compose
run: docker compose build
- name: Run unit tests
# unit tests are run inside a container
# http://docs.codecov.io/docs/testing-with-docker
run: |
ci_env=`bash <(curl -s https://codecov.io/env)`
docker-compose run $ci_env -e CI ${{ matrix.backend }} bundle exec rake test TESTOPTS='-v'
docker compose run $ci_env -e CI ${{ matrix.backend }} bundle exec rake test TESTOPTS='-v'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
flags: unittests
verbose: true
Expand Down
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
raptor2-utils \
&& rm -rf /var/lib/apt/lists/*

# The Gemfile Caching Trick
RUN mkdir -p /srv/ontoportal/ncbo_annotator
COPY *.gemspec Gemfile* /srv/ontoportal/ncbo_annotator/

WORKDIR /srv/ontoportal/ncbo_annotator
COPY Gemfile* *.gemspec /srv/ontoportal/ncbo_annotator/

# set bundler to v2.4.22 which is the last version supported by ruby 2.7
RUN gem install bundler -v 2.4.22
ENV BUNDLE_PATH /bundle
RUN gem install bundler
ENV BUNDLE_PATH=/bundle
RUN bundle install

COPY . /srv/ontoportal/ncbo_annotator
CMD ["/bin/bash"]
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
source 'https://rubygems.org'

gem 'cube-ruby'
gem 'faraday', '~> 1.9'
gem 'faraday'
gem 'ffi'
gem 'oj', '~> 3.0'
gem 'rake', '~> 10.0'
gem 'redis'
gem 'ruby-xxHash'

group :development do
Expand Down
98 changes: 43 additions & 55 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
GIT
remote: https://github.com/ncbo/goo.git
revision: 75436fe8e387febc53e34ee31ff0e6dd837a9d3f
revision: f943ac33e87c55c88131c32d826ed5d39c89302c
branch: master
specs:
goo (0.0.2)
addressable (~> 2.8)
pry
rdf (= 1.0.8)
redis
request_store
rest-client
rsolr
sparql-client
uuid

GIT
remote: https://github.com/ncbo/ontologies_linked_data.git
revision: ee0013f0ee23876076bff9d9258b46371ec3b248
revision: 9ab4be437ed84f5a480e7f0d8799824fcea310ae
branch: master
specs:
ontologies_linked_data (0.0.1)
Expand All @@ -35,7 +36,7 @@ GIT

GIT
remote: https://github.com/ncbo/sparql-client.git
revision: d418d56a6c9ff5692f925b45739a2a1c66bca851
revision: e89c26aa96f184dbe9b52d51e04fb3d9ba998dbc
branch: master
specs:
sparql-client (1.0.1)
Expand All @@ -52,104 +53,91 @@ GEM
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
base64 (0.2.0)
bcrypt (3.1.20)
bigdecimal (3.1.5)
builder (3.2.4)
bigdecimal (3.1.8)
builder (3.3.0)
coderay (1.1.3)
concurrent-ruby (1.2.2)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
cube-ruby (0.0.3)
date (3.3.4)
docile (1.4.0)
docile (1.4.1)
domain_name (0.6.20240107)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
faraday (2.8.1)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (1.16.3)
faraday-net_http (3.0.2)
ffi (1.17.0)
http-accept (1.7.0)
http-cookie (1.0.5)
http-cookie (1.0.7)
domain_name (~> 0.5)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (2.7.1)
json_pure (2.7.1)
libxml-ruby (5.0.2)
logger (1.6.0)
json (2.7.2)
json_pure (2.7.2)
libxml-ruby (5.0.3)
logger (1.6.1)
macaddr (1.7.2)
systemu (~> 2.6.5)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
method_source (1.0.0)
mime-types (3.5.2)
method_source (1.1.0)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2023.1205)
mime-types-data (3.2024.1001)
mini_mime (1.1.5)
minitest (4.7.5)
multi_json (1.15.0)
multipart-post (2.3.0)
net-http-persistent (2.9.4)
net-imap (0.4.9.1)
net-imap (0.4.16)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.4.0.1)
net-smtp (0.5.0)
net-protocol
netrc (0.11.0)
oj (3.16.3)
oj (3.16.6)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
omni_logger (0.1.4)
logger
ostruct (0.6.0)
pony (1.13.1)
mail (>= 2.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.4)
rack (3.0.8)
public_suffix (5.1.1)
rack (3.1.7)
rack-test (2.1.0)
rack (>= 1.3)
rake (10.5.0)
rdf (1.0.8)
addressable (>= 2.2)
redis (5.0.8)
redis-client (>= 0.17.0)
redis-client (0.19.1)
redis (5.3.0)
redis-client (>= 0.22.0)
redis-client (0.22.2)
connection_pool
request_store (1.7.0)
rack (>= 1.4)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.6)
rsolr (2.5.0)
rexml (3.3.8)
rsolr (2.6.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
ruby-xxHash (0.4.0.2)
Expand All @@ -162,7 +150,7 @@ GEM
simplecov-cobertura (2.1.0)
rexml
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
systemu (2.6.5)
thread_safe (0.3.6)
Expand All @@ -172,20 +160,20 @@ GEM
macaddr (~> 1.0)

PLATFORMS
ruby
aarch64-linux
arm64-darwin-22
x86_64-linux

DEPENDENCIES
cube-ruby
faraday (~> 1.9)
faraday
ffi
goo!
minitest (~> 4.0)
oj (~> 3.0)
ontologies_linked_data!
pry
rake (~> 10.0)
redis
ruby-xxHash
simplecov
simplecov-cobertura
Expand Down
44 changes: 44 additions & 0 deletions dip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: '7.1'

# Define default environment variables to pass
# to Docker Compose
#environment:
# RAILS_ENV: development

interaction:
# This command spins up a container with the required dependencies (solr, 4store, etc),
# and opens a terminal within it.
runner:
description: Open a Bash shell within a ncbo_annotator container (with dependencies up)
service: ruby
command: /bin/bash

# Run a container without any dependent services
bash:
description: Run an arbitrary script within a container (or open a shell without deps)
service: ruby
command: /bin/bash
compose_run_options: [ no-deps ]

# A shortcut to run Bundler commands
bundle:
description: Run Bundler commands
service: ruby
command: bundle
compose_run_options: [ no-deps ]

# A shortcut to run unit tests
test:
description: Run minitest unit tests
service: ruby
command: bundle exec rake test TESTOPTS='-v'

test-agraph:
description: Run minitest unit tests
service: ruby-agraph
command: bundle exec rake test TESTOPTS='-v'

'redis-cli':
description: Run Redis console
service: redis-ut
command: redis-cli -h redis-ut
Loading

0 comments on commit cd52aa9

Please sign in to comment.