Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ce6c0fc
initialize sidekiq
maboukerfa Jul 15, 2025
c4a7706
setup sidekiq development container
maboukerfa Jul 16, 2025
a4f42dc
migrate model indexation to a sidekiq job
maboukerfa Jul 16, 2025
8dc647f
fix api test
maboukerfa Jul 16, 2025
d070c2e
add sidekiq conf in config.rb sample
maboukerfa Jul 16, 2025
7b25ec7
remove old containers before trying to create new ones
maboukerfa Jul 18, 2025
087ad69
Merge branch 'sideqik-integration' into development
maboukerfa Jan 20, 2026
b048c6e
refactor: update ontoportal launcher script
maboukerfa Jan 20, 2026
afa0b95
feat: implement PostgreSQL database integration and notification system
maboukerfa Jan 27, 2026
299c0bd
feat: Add notifications feature with email support
maboukerfa Feb 9, 2026
69fcae4
feat: Enhance ontology notification system with new email templates a…
maboukerfa Feb 9, 2026
ddecef4
fix: Safely access color attribute in PORTAL_COLOR constant
maboukerfa Feb 11, 2026
a7f01c6
feat: Implement subscription management with CRUD operations and noti…
maboukerfa Feb 18, 2026
4797085
fix: Change NewNoteNotificationJob to perform asynchronously
maboukerfa Feb 18, 2026
cecb4f7
fix: Notify support in NewNoteNotificationJob
maboukerfa Feb 18, 2026
1528feb
fix: Update environment configuration for test to include sidekiq config
maboukerfa Feb 23, 2026
f204456
fix: database setup for tests
maboukerfa Feb 23, 2026
c92efc8
fix: Update database connection handling and configuration for applia…
maboukerfa Feb 24, 2026
f14946b
fix: Remove notify admins from the model
maboukerfa Feb 26, 2026
56444c2
feat: Implement submission processing job and notification system for…
maboukerfa Feb 27, 2026
ac0245d
feat: Add endpoint to display subscriptions for a single user
maboukerfa Mar 4, 2026
5fb5967
feat: Implement new ontology notification system for subscribers
maboukerfa Mar 4, 2026
97cb745
feat: Add new project notification system for subscribers and support…
maboukerfa Mar 4, 2026
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
11 changes: 11 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@ GOO_PATH=
SPARQL_CLIENT_PATH=
NCBO_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=1de0a270-29c5-4dda-b043-7c3580628cd5
## API url of the remote API used to download the starter ontology
OP_API_URL="https://data.agroportal.lirmm.fr"

## PostgreSQL Database
DATABASE_HOST=postgres-ut
DATABASE_PORT=5432
DATABASE_NAME=ontologies_api_development
DATABASE_USER=ontoportal
DATABASE_PASSWORD=ontoportal
2 changes: 2 additions & 0 deletions .github/workflows/ruby-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
- name: Run unit tests
run: |
cp .env.sample .env
# Create test database in the postgres container
docker compose exec -T postgres-ut psql -U ontoportal -d ontologies_api_development -c "CREATE DATABASE ontologies_api_test;" 2>/dev/null || true
ci_env=`bash <(curl -s https://codecov.io/env)`
GOO_SLICES=${{ matrix.goo-slice }} bundle exec rake test:docker:${{ matrix.triplestore }}

Expand Down
11 changes: 10 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ gem 'rake'
gem 'rexml' # Investigate why unicorn fails to start under ruby 3 without adding rexml gem to the Gemfile
gem 'sinatra'
gem 'rackup'
gem 'pony'

github 'sinatra/sinatra' do
gem 'sinatra-contrib'
Expand Down Expand Up @@ -38,6 +39,11 @@ gem 'redis-rack-cache'
gem 'redis'
gem 'redis-store'

# Relational database
gem 'activerecord', '~> 7.1'
gem 'pg', '~> 1.5'
gem 'sinatra-activerecord', '~> 2.0'

# Monitoring
gem "sentry-ruby", "~> 5.24"

Expand All @@ -50,11 +56,14 @@ gem 'haml', '~> 5.2.2'
gem 'rack-contrib'
gem 'pandoc-ruby'

# Sidekiq
gem 'sidekiq', '~> 7.3.9'

# 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: 'development'
gem 'ncbo_ontology_recommender', git: 'https://github.com/ontoportal-lirmm/ncbo_ontology_recommender.git', branch: 'development'
gem 'ontologies_linked_data', github: 'ontoportal-lirmm/ontologies_linked_data', branch: 'development'
gem 'ontologies_linked_data', github: 'ontoportal-lirmm/ontologies_linked_data', branch: 'sidekiq'
gem 'goo', github: 'ontoportal-lirmm/goo', branch: 'development'
gem 'sparql-client', github: 'ontoportal-lirmm/sparql-client', branch: 'development'

Expand Down
90 changes: 61 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/ontologies_linked_data.git
revision: e0e4547b49290ace0849b4d5bf294a7809196943
branch: development
revision: c05fefaffe91fac14cb3cd079d1e4dfa32dc3549
branch: sidekiq
specs:
ontologies_linked_data (0.0.1)
activesupport
Expand Down Expand Up @@ -103,7 +103,7 @@ GIT

GIT
remote: https://github.com/sinatra/sinatra.git
revision: 4062e3669c7dff0f59ca1d0b0bfa67f7eef444af
revision: 9e5c4ec8ade92c7375f44acf4c6e1103d32d6c12
specs:
rack-protection (4.2.1)
base64 (>= 0.1.0)
Expand All @@ -128,6 +128,12 @@ GIT
GEM
remote: https://rubygems.org/
specs:
activemodel (7.2.3)
activesupport (= 7.2.3)
activerecord (7.2.3)
activemodel (= 7.2.3)
activesupport (= 7.2.3)
timeout (>= 0.4.0)
activesupport (7.2.3)
base64
benchmark (>= 0.3)
Expand All @@ -153,7 +159,7 @@ GEM
bcrypt_pbkdf (1.1.2-arm64-darwin)
bcrypt_pbkdf (1.1.2-x86_64-darwin)
benchmark (0.5.0)
bigdecimal (3.3.1)
bigdecimal (4.0.1)
builder (3.3.0)
capistrano (3.20.0)
airbrussh (>= 1.0.0)
Expand Down Expand Up @@ -185,11 +191,11 @@ GEM
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-follow_redirects (0.4.0)
faraday-follow_redirects (0.5.0)
faraday (>= 1, < 3)
faraday-net_http (3.4.2)
net-http (~> 0.5)
faraday-retry (2.3.2)
faraday-retry (2.4.0)
faraday (~> 2.0)
ffi (1.15.0)
fugit (1.12.1)
Expand Down Expand Up @@ -232,7 +238,9 @@ GEM
google-cloud-errors (1.5.0)
google-logging-utils (0.2.0)
google-protobuf (3.25.3)
google-protobuf (3.25.3-aarch64-linux)
google-protobuf (3.25.3-arm64-darwin)
google-protobuf (3.25.3-x86-linux)
google-protobuf (3.25.3-x86_64-darwin)
google-protobuf (3.25.3-x86_64-linux)
googleapis-common-protos (1.8.0)
Expand All @@ -241,7 +249,7 @@ GEM
grpc (~> 1.41)
googleapis-common-protos-types (1.20.0)
google-protobuf (>= 3.18, < 5.a)
googleauth (1.16.0)
googleauth (1.16.1)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.2)
google-logging-utils (~> 0.1)
Expand All @@ -252,9 +260,15 @@ GEM
grpc (1.70.1)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.70.1-aarch64-linux)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.70.1-arm64-darwin)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.70.1-x86-linux)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.70.1-x86_64-darwin)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
Expand All @@ -272,7 +286,7 @@ GEM
i18n (1.14.8)
concurrent-ruby (~> 1.0)
io-console (0.8.2)
json (2.18.0)
json (2.18.1)
json-canonicalization (0.4.0)
json-ld (3.2.5)
htmlentities (~> 4.3)
Expand All @@ -281,9 +295,8 @@ GEM
multi_json (~> 1.15)
rack (>= 2.2, < 4)
rdf (~> 3.2, >= 3.2.10)
json-schema (5.2.2)
json-schema (5.1.0)
addressable (~> 2.8)
bigdecimal (~> 3.1)
jwt (3.1.2)
base64
kgio (2.11.4)
Expand All @@ -304,11 +317,11 @@ GEM
mime-types (3.7.0)
logger
mime-types-data (~> 3.2025, >= 3.2025.0507)
mime-types-data (3.2026.0113)
mime-types-data (3.2026.0203)
mini_mime (1.1.5)
minitest (5.27.0)
minitest-fail-fast (0.1.0)
minitest (~> 5)
minitest-fail-fast (0.2.0)
minitest (>= 5.0, < 7)
minitest-hooks (1.5.3)
minitest (> 5.3)
minitest-reporters (1.7.1)
Expand Down Expand Up @@ -354,12 +367,19 @@ GEM
pandoc-ruby (2.1.10)
parallel (1.27.0)
parseconfig (1.1.2)
parser (3.3.10.0)
parser (3.3.10.1)
ast (~> 2.4.1)
racc
pg (1.6.3)
pg (1.6.3-aarch64-linux)
pg (1.6.3-aarch64-linux-musl)
pg (1.6.3-arm64-darwin)
pg (1.6.3-x86_64-darwin)
pg (1.6.3-x86_64-linux)
pg (1.6.3-x86_64-linux-musl)
pony (1.13.1)
mail (>= 2.0)
prism (1.7.0)
prism (1.9.0)
pry (0.16.0)
coderay (~> 1.1)
method_source (~> 1.0)
Expand Down Expand Up @@ -392,13 +412,9 @@ GEM
rainbow (3.1.1)
raindrops (0.20.1)
rake (13.3.1)
rdf (3.3.4)
rdf (3.3.1)
bcp47_spec (~> 0.2)
bigdecimal (~> 3.1, >= 3.1.5)
link_header (~> 0.0, >= 0.0.8)
logger (~> 1.5)
ostruct (~> 0.6)
readline (~> 0.0)
rdf-rdfxml (3.3.0)
builder (~> 3.2, >= 3.2.4)
htmlentities (~> 4.3)
Expand All @@ -409,11 +425,9 @@ GEM
rdf-xsd (3.3.0)
rdf (~> 3.3)
rexml (~> 3.2)
readline (0.0.4)
reline
redis (5.4.1)
redis-client (>= 0.22.0)
redis-client (0.26.3)
redis-client (0.26.4)
connection_pool
redis-rack-cache (2.2.1)
rack-cache (>= 1.10, < 2)
Expand All @@ -439,20 +453,20 @@ GEM
rsolr (2.6.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
rubocop (1.82.0)
rubocop (1.84.1)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.48.0, < 2.0)
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.48.0)
rubocop-ast (1.49.0)
parser (>= 3.3.7.2)
prism (~> 1.4)
prism (~> 1.7)
ruby-progressbar (1.13.0)
ruby-xxHash (0.4.0.2)
ruby2_keywords (0.0.5)
Expand All @@ -463,6 +477,12 @@ GEM
sentry-ruby (5.28.1)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
sidekiq (7.3.10)
base64
connection_pool (>= 2.3.0, < 3)
logger
rack (>= 2.2.4, < 3.3)
redis-client (>= 0.23.0, < 1)
signet (0.21.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
Expand All @@ -484,6 +504,9 @@ GEM
rack-protection (= 4.2.1)
rack-session (>= 2.0.0, < 3)
tilt (~> 2.0)
sinatra-activerecord (2.0.28)
activerecord (>= 4.1)
sinatra (>= 1.0)
sshkit (1.25.0)
base64
logger
Expand All @@ -493,7 +516,7 @@ GEM
ostruct
systemu (2.6.5)
temple (0.10.4)
tilt (2.6.1)
tilt (2.7.0)
time (0.4.2)
date
timeout (0.6.0)
Expand All @@ -520,12 +543,17 @@ GEM
webrick (1.9.2)

PLATFORMS
aarch64-linux
aarch64-linux-musl
arm64-darwin
ruby
x86-linux
x86_64-darwin
x86_64-linux
x86_64-linux-musl

DEPENDENCIES
activerecord (~> 7.1)
activesupport
bcrypt_pbkdf (>= 1.0, < 2.0)
bigdecimal
Expand Down Expand Up @@ -557,6 +585,8 @@ DEPENDENCIES
pandoc-ruby
parallel
parseconfig
pg (~> 1.5)
pony
rack
rack-accept
rack-attack
Expand All @@ -578,9 +608,11 @@ DEPENDENCIES
rubocop
sentry-ruby (~> 5.24)
shotgun!
sidekiq (~> 7.3.9)
simplecov
simplecov-cobertura
sinatra
sinatra-activerecord (~> 2.0)
sinatra-contrib!
sparql-client!
unicorn
Expand All @@ -589,4 +621,4 @@ DEPENDENCIES
webrick

BUNDLED WITH
2.6.7
2.6.9
7 changes: 7 additions & 0 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
require_relative 'lib/rack/slice_detection'
require_relative 'lib/rack/request_lang'

# sidekiq requirements
require 'sidekiq/web'
require 'sidekiq'

# Logging setup
require_relative 'config/logging'

Expand All @@ -37,6 +41,9 @@

require 'request_store'

# Postgtres Database connection
require_relative 'config/relationalDatabase'
RelationalDatabase.connect!
# Protection settings
set :protection, except: :path_traversal

Expand Down
4 changes: 2 additions & 2 deletions bin/ontoportal
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ build_docker_run_cmd() {
fi
done

bash_cmd+=" (bundle check || bundle install || bundle update) && $custom_command"
bash_cmd+=" (bundle check || bundle install || bundle update) && bundle exec rake db:migrate && $custom_command"
docker_run_cmd+=" --service-ports api bash -c \"$bash_cmd\""

echo "[+] Run docker command $docker_run_cmd"
Expand Down Expand Up @@ -370,4 +370,4 @@ case "$1" in
show_help
exit 1
;;
esac
esac
4 changes: 4 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
require './app.rb'
run Sinatra::Application

map '/sidekiq' do
run Sidekiq::Web
end
Loading
Loading