Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
709849d
Fix: explicitly load `resetTokenExpireTime` in password reset (#109)
maboukerfa Nov 26, 2024
fb89c6c
Merge pull request #110 from ontoportal-lirmm/development
imadbourouche Nov 28, 2024
ce2c8d0
Feature: add provision to parse ontology when running api locally (#111)
imadbourouche Dec 9, 2024
da9283e
update Gemfile to get new versions of ontologies_linked_data
syphax-bouazzouni Dec 12, 2024
909a8aa
Fix: hide private ontologies for non admin users in groups controller…
imadbourouche Jan 8, 2025
07290db
Feature: create graphs endpoints to list, create and delete (#115)
syphax-bouazzouni Jan 23, 2025
3589732
Feature: Add last 24hours SPARQL Query logs endpoint (#116)
syphax-bouazzouni Jan 23, 2025
8103e4f
Feature: Implement MOD-API routes (#114)
imadbourouche Jan 27, 2025
4284245
Feature: Migrate ruby 3.2 (#121)
syphax-bouazzouni Feb 6, 2025
620e0e8
Add Redis host environment variables
maboukerfa Feb 10, 2025
60596cd
Merge pull request #122 from muhammedBkf/development
imadbourouche Feb 11, 2025
989a9c3
Merge branch 'master' into development
syphax-bouazzouni Feb 14, 2025
798aad4
Merge pull request #119 from ontoportal-lirmm/development
syphax-bouazzouni Feb 14, 2025
02d84f3
Update deploy.yml to use ruby 3.1.0
syphax-bouazzouni Feb 14, 2025
4c824a3
fix root endpoint after migrating to ruby 3
syphax-bouazzouni Feb 14, 2025
6c591f1
add paging by default to /artefacts (#125)
imadbourouche Feb 15, 2025
9d64f2d
fix image generation of docker image for ruby 3.1
syphax-bouazzouni Feb 15, 2025
7a8a421
fix: fork shotgun to support ruby 3 and rack 3
syphax-bouazzouni Feb 17, 2025
e9051ab
Merge branch 'master' into development
syphax-bouazzouni Feb 20, 2025
bde47ba
remove appuser from the dockerfile (#133)
imadbourouche Feb 24, 2025
f3efd63
Feature: add / route for SemanticartefactCatalog (#117)
imadbourouche Feb 24, 2025
4e127c5
add pandoc so to render the documentation (#136)
imadbourouche Feb 25, 2025
ad9d940
Merge to master: release 3.0.1 (#135)
syphax-bouazzouni Feb 25, 2025
637f9eb
Merge branch 'development' into feature/projects
hakimalem Feb 26, 2025
7d0d8f2
add file command in dockerfile (#138)
imadbourouche Feb 27, 2025
56234d7
Merge remote-tracking branch 'origin/master' into development
syphax-bouazzouni Feb 27, 2025
f5de298
Merge branch 'development'
syphax-bouazzouni Feb 27, 2025
af75001
fix redirection of routes that ends with / (#137)
imadbourouche Feb 28, 2025
5b12e83
external api connector
hakimalem Mar 5, 2025
d0e18a1
turn sources configurable
hakimalem Mar 12, 2025
5fc6463
Feature: optimize metrics controller (#140)
imadbourouche Mar 14, 2025
41df9b8
Merge pull request #9 from ontoportal-lirmm/development
galviset Mar 17, 2025
5655fac
Merge remote-tracking branch 'origin/development' into feature/projects
hakimalem Mar 18, 2025
e860684
change ontoportal-lirmm/ontologies_linked_data to earthportal
hakimalem Mar 19, 2025
026f923
update Gemfile.lock
hakimalem Mar 19, 2025
0faea0a
update Gemfile.lock
hakimalem Mar 19, 2025
625af0f
Feature: use catalog links (#142)
imadbourouche Mar 19, 2025
1afadaa
add app_api to ontologies_api volume
hakimalem Mar 21, 2025
e8978f3
remove class_count in classes route (#143)
imadbourouche Mar 21, 2025
ad45abc
Feature: resources route api implementation (#127)
imadbourouche Mar 21, 2025
643c5d4
update projects controller tests
hakimalem Mar 22, 2025
80f6b68
Add 404 error
hakimalem Mar 26, 2025
a3a2ebd
Merge pull request #8 from EarthPortal/feature/projects
hakimalem Apr 3, 2025
0fcf87f
Update Gemfile.lock
hakimalem Apr 3, 2025
96fe469
Merge pull request #10 from EarthPortal/feature/projects
hakimalem Apr 3, 2025
609eef0
Feature: MOD-API implementation iteration 3 (#147)
imadbourouche Apr 25, 2025
3664fdc
Feature: Add Sentry monitoring to api (#151)
syphax-bouazzouni May 16, 2025
4f3508f
Revert "Feature: add / route for SemanticartefactCatalog (#117)"
syphax-bouazzouni May 16, 2025
6f0837a
Feature: finalize mod API and documentation (#152)
imadbourouche May 21, 2025
c6bbf4a
Feature: Align agents search endpoint with the API response (#149)
maboukerfa May 22, 2025
9124fe1
use SemanticArtefactDistribution in /distributions route (#153)
imadbourouche May 22, 2025
73aac00
add virtuoso env variables to use it correctly
imadbourouche May 28, 2025
4875bd5
Merge pull request #154 from ontoportal-lirmm/hotfix/fix-virtuoso-env…
imadbourouche May 28, 2025
58b0fa2
Fix: show federations portals api keys and fix for the API configurat…
imadbourouche Jun 2, 2025
9aa6c92
fix: align development branch with development docker image (#156)
imadbourouche Jun 2, 2025
cd9b79d
use check_last_modified to handle last modified and caching the catal…
imadbourouche Jun 4, 2025
7aeee27
add security check when updating the catalog
imadbourouche Jun 4, 2025
9927e58
Merge pull request #158 from ontoportal-lirmm/hotfix/catalog-modifica…
imadbourouche Jun 4, 2025
2967f7b
update Gemfile.lock
imadbourouche Jun 25, 2025
5df2318
update Gemfile.lock
imadbourouche Jun 27, 2025
858acf6
address QA changes for MOD-API
imadbourouche Jul 2, 2025
5bd89ac
Merge branch 'master' into development
imadbourouche Jul 3, 2025
a968748
update Gemfile.lock
imadbourouche Jul 3, 2025
06e6313
Merge pull request #150 from ontoportal-lirmm/development
imadbourouche Jul 3, 2025
aebbc48
update gems versions
imadbourouche Jul 3, 2025
6794179
Merge pull request #159 from ontoportal-lirmm/fix/changes-gems-versions
imadbourouche Jul 3, 2025
d99a244
user rack and lock protobuf version
imadbourouche Jul 3, 2025
a06aa45
Merge pull request #160 from ontoportal-lirmm/fix/use-rack-3.1.16
imadbourouche Jul 3, 2025
792071f
update gemfile.lock
imadbourouche Jul 3, 2025
40e1f1d
Merge pull request #161 from ontoportal-lirmm/fix/update-gemfile-lock
imadbourouche Jul 3, 2025
e069d46
fix: remove Rack::RewindableInput Middleware causing
imadbourouche Jul 3, 2025
5a40987
Merge pull request #162 from ontoportal-lirmm/development
imadbourouche Jul 3, 2025
116e97c
Merge branch 'master' of https://github.com/ontoportal-lirmm/ontologi…
galviset Jul 17, 2025
f9ecc4c
Updated Gemfile
galviset Jul 17, 2025
6e8b1f9
Merge pull request #12 from EarthPortal/ontoportal-lirmm-master
galviset Jul 17, 2025
72c8740
Fix Gemfile revision issue
galviset Jul 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
API_URL=http://localhost:9393
ONTOLOGIES_LINKED_DATA_PATH=
GOO_PATH=
SPARQL_CLIENT_PATH=
SPARQL_CLIENT_PATH=

REDIS_GOO_CACHE_HOST=redis-ut
REDIS_HTTP_CACHE_HOST=redis-ut
REDIS_PERSISTENT_HOST=redis-ut

## An ontology that will be imported in the starting of the API server
STARTER_ONTOLOGY=STY
## API key of a remote API used to download the starter ontology
OP_API_KEY=8b5b7825-538d-40e0-9e9e-5ab9274a9aeb
## API url of the remote API used to download the starter ontology
OP_API_URL="https://data.bioontology.org"
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.8 # Not needed with a .ruby-version file
ruby-version: 3.1.0 # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: get-deployment-config
uses: actions/checkout@v3
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Docker branch Images build

on:
push:
branches:
Expand All @@ -9,48 +8,54 @@ on:
- test
release:
types: [ published ]

jobs:
push_to_registry:
name: Push Docker branch image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
agroportal/ontologies_api
ghcr.io/${{ github.repository }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
build-args: |
RUBY_VERSION=2.7.8
RUBY_VERSION=3.1
BUILDPLATFORM=${{ github.job_name }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
11 changes: 5 additions & 6 deletions .github/workflows/ruby-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ name: Ruby Unit Tests

on:
push:
pull_request:

jobs:
test:
strategy:
fail-fast: false
matrix:
goo-slice: [ '20', '100', '500' ]
ruby-version: [ '2.7' ]
goo-slice: [ '100' ]
ruby-version: [ '3.2.0' ]
triplestore: [ 'fs', 'ag', 'vo', 'gb' ]
runs-on: ubuntu-latest
steps:
Expand All @@ -28,11 +27,11 @@ jobs:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run unit tests
# unit tests are run inside a container
# http://docs.codecov.io/docs/testing-with-docker
run: |
cp .env.sample .env
ci_env=`bash <(curl -s https://codecov.io/env)`
GOO_SLICES=${{ matrix.goo-slice }} bundle exec rake test:docker:${{ matrix.triplestore }} TESTOPTS="-v"
GOO_SLICES=${{ matrix.goo-slice }} bundle exec rake test:docker:${{ matrix.triplestore }}

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ create_permissions.log
ontologies_api.iml

.env
.qodo
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.0
1 change: 0 additions & 1 deletion Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ require 'capistrano/bundler'
# require 'capistrano/rails/assets'
# require 'capistrano/rails/migrations'
require 'capistrano/locally'
require 'new_relic/recipes' # announce deployments in NewRelic
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
66 changes: 47 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,57 @@
ARG RUBY_VERSION=3.0
ARG DISTRO_NAME=bullseye
# syntax=docker/dockerfile:1

FROM ruby:$RUBY_VERSION-$DISTRO_NAME
# Build arguments with specific versions for better reproducibility
ARG RUBY_VERSION=3.1
ARG DISTRO_NAME=slim-bookworm

RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
openjdk-11-jre-headless \
raptor2-utils \
wait-for-it \
libraptor2-dev \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /srv/ontoportal/ontologies_api
RUN mkdir -p /srv/ontoportal/bundle
COPY Gemfile* /srv/ontoportal/ontologies_api/
FROM ruby:${RUBY_VERSION}-${DISTRO_NAME}

WORKDIR /srv/ontoportal/ontologies_api

RUN gem update --system 3.4.22 # the 3.4.22 can be removed if we support Ruby version > 3.0
# Set environment variables
ENV BUNDLE_PATH=/srv/ontoportal/bundle \
BUNDLE_JOBS=4 \
BUNDLE_RETRY=5 \
RAILS_ENV=production \
DEBIAN_FRONTEND=noninteractive

# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
openjdk-17-jre-headless \
raptor2-utils \
wait-for-it \
libraptor2-dev \
build-essential \
libxml2 \
libxslt-dev \
libmariadb-dev \
git \
curl \
libffi-dev \
file \
pandoc \
pkg-config && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN gem install bundler
ENV BUNDLE_PATH=/srv/ontoportal/bundle
RUN bundle install

COPY . /srv/ontoportal/ontologies_api
RUN cp /srv/ontoportal/ontologies_api/config/environments/config.rb.sample /srv/ontoportal/ontologies_api/config/environments/development.rb
RUN cp /srv/ontoportal/ontologies_api/config/environments/config.rb.sample /srv/ontoportal/ontologies_api/config/environments/production.rb
COPY Gemfile* ./

# Install dependencies
RUN bundle install --jobs ${BUNDLE_JOBS} --retry ${BUNDLE_RETRY}

# Copy application code
COPY . .

# Copy config files
RUN cp config/environments/config.rb.sample config/environments/development.rb && \
cp config/environments/config.rb.sample config/environments/production.rb

# Expose port
EXPOSE 9393

# Start command
CMD ["bundle", "exec", "rackup", "-p", "9393", "--host", "0.0.0.0"]
59 changes: 32 additions & 27 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,62 +1,65 @@
source 'https://rubygems.org'
gem 'activesupport', '~> 5'
# see https://github.com/ncbo/ontologies_api/issues/69
gem 'activesupport'
gem 'bigdecimal'
# gem 'faraday', '~> 1.9'
gem 'json-schema', '~> 2.0'
gem 'json-schema'
gem 'multi_json'
gem 'oj'
gem 'parseconfig'
gem 'rack'
gem 'rake', '~> 10.0'
gem 'rake'
gem 'rexml' # Investigate why unicorn fails to start under ruby 3 without adding rexml gem to the Gemfile
gem 'sinatra', '~> 1.0'
gem 'sinatra-advanced-routes'
gem 'sinatra-contrib', '~> 1.0'
gem 'sinatra'
gem 'rackup'

github 'sinatra/sinatra' do
gem 'sinatra-contrib'
end

gem 'request_store'
gem 'parallel'
gem 'json-ld'
gem 'google-protobuf', '3.25.3'
gem 'google-protobuf', '~> 4.30.0'
gem 'net-ftp'
gem 'json-ld', '~> 3.2.0'
gem 'rdf-raptor', github:'ruby-rdf/rdf-raptor', ref: '6392ceabf71c3233b0f7f0172f662bd4a22cd534' # use version 3.3.0 when available

# Rack middleware
gem 'ffi', '~> 1.16.3'
gem 'rack-accept', '~> 0.4'
gem 'rack-attack', '~> 6.6.1', require: 'rack/attack'
gem 'rack-cache', '~> 1.13.0'
gem 'ffi', '~> 1.15.0'
gem 'rack-accept'
gem 'rack-attack', require: 'rack/attack'
gem 'rack-cache'
gem 'rack-cors', require: 'rack/cors'
# GitHub dependency can be removed when https://github.com/niko/rack-post-body-to-params/pull/6 is merged and released
gem 'rack-post-body-to-params', github: 'palexander/rack-post-body-to-params', branch: 'multipart_support'
gem 'rack-timeout'
gem 'redis-rack-cache', '~> 2.0'
gem 'redis-rack-cache'

# Data access (caching)
gem 'redis'
gem 'redis-store', '~>1.10'
gem 'redis-store'

# Monitoring
gem 'cube-ruby', require: 'cube'
gem 'newrelic_rpm', group: [:default, :deployment]
gem "sentry-ruby", "~> 5.24"

# HTTP server
gem 'unicorn'
gem 'unicorn-worker-killer'

# Templating
gem 'haml', '~> 5.2.2' # pin see https://github.com/ncbo/ontologies_api/pull/107
gem 'redcarpet'
gem 'haml', '~> 5.2.2'
gem 'rack-contrib'
gem 'pandoc-ruby'

# NCBO gems (can be from a local dev path or from rubygems/git)
gem 'ncbo_annotator', git: 'https://github.com/ontoportal-lirmm/ncbo_annotator.git', branch: 'development'
gem 'ncbo_cron', git: 'https://github.com/ontoportal-lirmm/ncbo_cron.git', branch: 'master'
gem 'ncbo_ontology_recommender', git: 'https://github.com/ontoportal-lirmm/ncbo_ontology_recommender.git', branch: 'development'
gem 'ontologies_linked_data', github: 'earthportal/ontologies_linked_data', branch: 'development'
gem 'goo', github: 'ontoportal-lirmm/goo', branch: 'development'
gem 'sparql-client', github: 'ontoportal-lirmm/sparql-client', branch: 'development'
gem 'ontologies_linked_data', git: 'https://github.com/ontoportal-lirmm/ontologies_linked_data.git', branch: 'development'


group :development do
# bcrypt_pbkdf and ed35519 is required for capistrano deployments when using ed25519 keys; see https://github.com/miloserdow/capistrano-deploy/issues/42
gem 'shotgun', github: 'palexander/shotgun', branch: 'ncbo'
gem 'shotgun', github: 'syphax-bouazzouni/shotgun', branch: 'master'
gem 'rubocop'
end

Expand All @@ -77,12 +80,14 @@ end

group :test do
gem 'crack', '0.4.5'
gem 'minitest', '~> 5.0'
gem 'minitest-hooks', "~> 1.5"
gem 'minitest'
gem 'minitest-hooks'
gem 'minitest-stub_any_instance'
gem 'minitest-reporters'
gem 'minitest-fail-fast'
gem 'rack-test'
gem 'simplecov', require: false
gem 'simplecov-cobertura' # for codecov.io
gem 'webmock', '~> 3.19.1'
gem 'webmock'
gem 'webrick'
end
end
Loading
Loading