Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to staging #38

Merged
merged 73 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
4df8aae
add generalized helpers for request parameters
syphax-bouazzouni Dec 18, 2022
ca82bb1
Merge branch 'features/add-submission-ontology-metadata-endpoint' int…
syphax-bouazzouni Dec 21, 2022
05cb9ff
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Dec 21, 2022
59c64a9
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Dec 21, 2022
b9bbc5a
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Dec 24, 2022
b31f96f
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 1, 2023
bcb05fc
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 2, 2023
312a335
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 2, 2023
2cd094c
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 2, 2023
24d8ac5
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 3, 2023
80c6909
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 3, 2023
b83d1fa
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 9, 2023
fdf1845
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 10, 2023
598636e
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 10, 2023
8967fa4
add requests filters
syphax-bouazzouni Jan 19, 2023
463aa62
Merge branch 'pr/refactor/generalize-request-params' into development
syphax-bouazzouni Jan 19, 2023
f9a0586
remove generalized helpers from instances_helper
syphax-bouazzouni Jan 19, 2023
8655f26
add request filter to retrieve_latest_submissions
syphax-bouazzouni Jan 19, 2023
9508f1d
remove no more used parameter bring_unmapped?
syphax-bouazzouni Jan 19, 2023
2ca440d
update the usage of the olds settings_params
syphax-bouazzouni Jan 19, 2023
e46b4b6
Merge pull request #29 from ontoportal-lirmm/feature/generalize-reque…
syphax-bouazzouni Jan 20, 2023
eac6f35
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 20, 2023
3a12f00
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 23, 2023
f568e52
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Jan 23, 2023
e7497b1
Merge branch 'master' into development
syphax-bouazzouni Feb 16, 2023
f75b274
Merge remote-tracking branch 'origin/development' into development
syphax-bouazzouni Feb 16, 2023
a0d0fd7
Merge branch 'master' into development
syphax-bouazzouni Feb 16, 2023
a312109
add request_lang middleware
syphax-bouazzouni Mar 6, 2023
207884b
pin redis gem version to 4.8.1
syphax-bouazzouni Mar 6, 2023
c4c6be1
Merge branch 'fix/bundle-update-redis-breaks-tests' into development
syphax-bouazzouni Mar 6, 2023
9ea1770
Merge branch 'development' into feature/support-multilingual-read-one…
syphax-bouazzouni Mar 6, 2023
ae23ce0
update Gemfile.lock
syphax-bouazzouni Mar 6, 2023
5a41c91
Merge pull request #32 from ontoportal-lirmm/feature/support-multilin…
syphax-bouazzouni Mar 6, 2023
be31e4f
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Mar 7, 2023
77bde06
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Mar 7, 2023
0d8e4fd
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Mar 7, 2023
aed3bf5
update Gemfile to use ontologies_linked_data new metadata branch
syphax-bouazzouni Mar 20, 2023
f0f56a6
update TestOntologySubmissionsController to be adapted to the new model
syphax-bouazzouni Mar 20, 2023
6699ae3
Merge branch 'feature/update-submission-mdetamodel-2023' into develop…
syphax-bouazzouni Mar 20, 2023
535e96e
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Mar 20, 2023
7320f50
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Mar 20, 2023
62f5831
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Mar 21, 2023
e259c1c
in submission_metadata rename display with category
syphax-bouazzouni Mar 21, 2023
2bf3ac8
add to submission_metadata description and example fields
syphax-bouazzouni Mar 21, 2023
b4d3536
Merge branch 'feature/update-submission-mdetamodel-2023' into develop…
syphax-bouazzouni Mar 21, 2023
ab8c876
add the option to do pagination for the submission endpoint
syphax-bouazzouni Apr 26, 2023
c6454e4
extract retrieve_latest_submissions method to submission helper
syphax-bouazzouni Apr 26, 2023
f1b1234
implement apply_filters to submissions endpoint using SPARQL FILTERs
syphax-bouazzouni Apr 26, 2023
64e7286
add test for submissions endpoint pagination
syphax-bouazzouni Apr 28, 2023
2cb2099
Merge pull request #34 from ontoportal-lirmm/feature/paginate-and-fil…
syphax-bouazzouni Apr 28, 2023
7e86f58
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm Apr 28, 2023
1b7d514
fix private only submission filter
syphax-bouazzouni Apr 30, 2023
4cb42d0
add hasFormalityLevel filter for submissions endpoint
syphax-bouazzouni May 1, 2023
864e42f
add for ontology: reviews, notes, projects on the submissions endpoints
syphax-bouazzouni May 1, 2023
0497193
bring submission metrics for submissions endpoints
syphax-bouazzouni May 1, 2023
3abc430
bring all contact attributes if asked in the submissions endpoints
syphax-bouazzouni May 1, 2023
69ef8bd
refactor submissions endpoint filters by extracting some methods
syphax-bouazzouni May 1, 2023
1655473
add ontology acronym or name filters for submissions endpoints
syphax-bouazzouni May 1, 2023
060ed26
add submissions endpoint order_by option
syphax-bouazzouni May 1, 2023
b6e6434
Merge branch 'development' into feature/paginate-and-filter-ontologie…
syphax-bouazzouni May 1, 2023
b026d97
Merge pull request #36 from ontoportal-lirmm/feature/paginate-and-fil…
syphax-bouazzouni May 1, 2023
059d7e1
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm May 1, 2023
3f29887
fix including ontology and contacts in the submissions endpoints
syphax-bouazzouni May 1, 2023
198adbd
Merge remote-tracking branch 'origin/feature/paginate-and-filter-onto…
syphax-bouazzouni May 1, 2023
384d0ba
Merge branch 'feature/paginate-and-filter-ontologies-endpoint' into d…
syphax-bouazzouni May 1, 2023
b45618a
fix list admin filter_access control (e.g for submissions endpoints)
syphax-bouazzouni May 1, 2023
8657066
Merge branch 'feature/paginate-and-filter-ontologies-endpoint' into d…
syphax-bouazzouni May 1, 2023
b1e9ddf
[ontoportal-bot] Gemfile.lock update
ontoportal-bot-lirmm May 1, 2023
34f19a3
check access of ontologies in /ontologies/:acronym/submissions endpoint
syphax-bouazzouni May 1, 2023
c942f87
Merge branch 'feature/paginate-and-filter-ontologies-endpoint' into d…
syphax-bouazzouni May 1, 2023
42dfb9b
Merge remote-tracking branch 'origin/development' into development
syphax-bouazzouni May 1, 2023
d5dcb9e
include ontology viewOf attribute in the submission endpoints
syphax-bouazzouni May 2, 2023
2e06a69
Merge branch 'feature/paginate-and-filter-ontologies-endpoint' into d…
syphax-bouazzouni May 2, 2023
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
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ gem 'rake', '~> 10.0'
gem 'sinatra', '~> 1.0'
gem 'sinatra-advanced-routes'
gem 'sinatra-contrib', '~> 1.0'
gem 'request_store'

# Rack middleware
gem 'ffi'
Expand All @@ -26,7 +27,7 @@ gem 'rack-timeout'
gem 'redis-rack-cache', '~> 2.0'

# Data access (caching)
gem 'redis'
gem 'redis', '~> 4.8.1'
gem 'redis-activesupport'

# Monitoring
Expand All @@ -42,12 +43,12 @@ gem 'haml', '~> 5.2.2' # pin see https://github.com/ncbo/ontologies_api/pull/107
gem 'redcarpet'

# NCBO gems (can be from a local dev path or from rubygems/git)
gem 'goo', git: 'https://github.com/ontoportal-lirmm/goo.git', branch: 'master'
gem 'goo', git: 'https://github.com/ontoportal-lirmm/goo.git', branch: 'development'
gem 'ncbo_annotator', git: 'https://github.com/ontoportal-lirmm/ncbo_annotator.git', branch: 'master'
gem 'ncbo_cron', git: 'https://github.com/ontoportal-lirmm/ncbo_cron.git', branch: 'master'
gem 'ncbo_ontology_recommender', git: 'https://github.com/ncbo/ncbo_ontology_recommender.git', branch: 'master'
gem 'sparql-client', github: 'ontoportal-lirmm/sparql-client', branch: 'master'
gem 'ontologies_linked_data', git: 'https://github.com/ontoportal-lirmm/ontologies_linked_data.git', branch: 'master'
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
Expand Down
96 changes: 51 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/ncbo/ncbo_ontology_recommender.git
revision: 6010ff60b99dc1282822b8a1fb59bd59f453755f
revision: d0ac992c88bd417f2f2137ba62934c3c41b6db7c
branch: master
specs:
ncbo_ontology_recommender (0.0.1)
Expand All @@ -11,8 +11,8 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/goo.git
revision: 92968978e5d2436c648bf7956e25aff05440b59d
branch: master
revision: c3456c45c12ed92d4a3ae43cac7c1d4cdbf290b6
branch: development
specs:
goo (0.0.2)
addressable (~> 2.8)
Expand All @@ -37,13 +37,13 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/ncbo_cron.git
revision: d09999177235029ba30a00cd59d10f7ca1a1fa93
revision: 8db3481116c57d2a21dc8f32bcd1695d95442280
branch: master
specs:
ncbo_cron (0.0.1)
dante
goo
google-api-client
google-apis-analytics_v3
mlanett-redis-lock
multi_json
ncbo_annotator
Expand All @@ -53,8 +53,8 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/ontologies_linked_data.git
revision: 9c5c56cf7b4546ccc45431a82bbce9a33184e4cc
branch: master
revision: 4ac9873f3d016259196a17cfc9c6ab8149468ec9
branch: development
specs:
ontologies_linked_data (0.0.1)
activesupport
Expand Down Expand Up @@ -103,16 +103,16 @@ GEM
activesupport (3.2.22.5)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
addressable (2.8.1)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
airbrussh (1.4.1)
sshkit (>= 1.6.1, != 1.7.0)
backports (3.23.0)
backports (3.24.1)
bcrypt (3.1.18)
bcrypt_pbkdf (1.1.0)
bigdecimal (1.4.2)
builder (3.2.4)
capistrano (3.17.1)
capistrano (3.17.2)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
Expand All @@ -125,16 +125,16 @@ GEM
capistrano (~> 3.1)
sshkit (~> 1.3)
coderay (1.1.3)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.2)
cube-ruby (0.0.3)
dante (0.2.0)
date (3.3.2)
date (3.3.3)
declarative (0.0.20)
docile (1.4.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
ed25519 (1.3.0)
faraday (1.10.2)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand All @@ -160,22 +160,24 @@ GEM
ffi (1.15.5)
get_process_mem (0.2.7)
ffi (~> 1.0)
google-api-client (0.52.0)
google-apis-analytics_v3 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
retriable (>= 2.0, < 4.a)
rexml
signet (~> 0.12)
googleauth (0.17.1)
faraday (>= 0.17.3, < 2.0)
webrick
googleauth (1.5.2)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.15)
signet (>= 0.16, < 2.a)
haml (5.2.2)
temple (>= 0.8.0)
tilt
Expand All @@ -189,13 +191,13 @@ GEM
json-schema (2.8.1)
addressable (>= 2.4)
json_pure (2.6.3)
jwt (2.5.0)
jwt (2.7.0)
kgio (2.11.4)
libxml-ruby (3.2.4)
libxml-ruby (4.1.0)
logger (1.5.3)
macaddr (1.7.2)
systemu (~> 2.6.5)
mail (2.8.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
Expand All @@ -204,16 +206,16 @@ GEM
method_source (1.0.0)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
mime-types-data (3.2023.0218.1)
mini_mime (1.1.2)
minitest (4.7.5)
minitest-stub_any_instance (1.0.3)
mlanett-redis-lock (0.2.7)
redis
multi_json (1.15.0)
multipart-post (2.2.3)
multipart-post (2.3.0)
net-http-persistent (2.9.4)
net-imap (0.3.2)
net-imap (0.3.4)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -224,17 +226,17 @@ GEM
net-ssh (>= 2.6.5, < 8.0.0)
net-smtp (0.3.3)
net-protocol
net-ssh (7.0.1)
net-ssh (7.1.0)
netrc (0.11.0)
newrelic_rpm (8.14.0)
newrelic_rpm (9.2.2)
oj (2.18.5)
omni_logger (0.1.4)
logger
os (1.1.4)
parseconfig (1.1.2)
pony (1.13.1)
mail (>= 2.0)
pry (0.14.1)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.1)
Expand All @@ -247,31 +249,33 @@ GEM
rack (>= 0.4)
rack-cors (1.0.6)
rack (>= 1.6.0)
rack-mini-profiler (3.0.0)
rack-mini-profiler (3.1.0)
rack (>= 1.2.0)
rack-protection (1.5.5)
rack
rack-test (2.0.2)
rack-test (2.1.0)
rack (>= 1.3)
rack-timeout (0.6.3)
raindrops (0.20.0)
raindrops (0.20.1)
rake (10.5.0)
rdf (1.0.8)
addressable (>= 2.2)
redcarpet (3.5.1)
redis (4.8.0)
redcarpet (3.6.0)
redis (4.8.1)
redis-activesupport (5.3.0)
activesupport (>= 3, < 8)
redis-store (>= 1.3, < 2)
redis-rack-cache (2.2.1)
rack-cache (>= 1.10, < 2)
redis-store (>= 1.6, < 2)
redis-store (1.9.1)
redis (>= 4, < 5)
redis-store (1.9.2)
redis (>= 4, < 6)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
request_store (1.5.1)
rack (>= 1.4)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
Expand All @@ -292,7 +296,7 @@ GEM
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simplecov (0.21.2)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
Expand All @@ -314,15 +318,15 @@ GEM
rack-test
sinatra (~> 1.4.0)
tilt (>= 1.3, < 3)
sshkit (1.21.3)
sshkit (1.21.4)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
systemu (2.6.5)
temple (0.9.1)
tilt (2.0.11)
timeout (0.3.1)
temple (0.10.0)
tilt (2.1.0)
timeout (0.3.2)
trailblazer-option (0.1.2)
tzinfo (2.0.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unf (0.1.4)
Expand All @@ -336,6 +340,7 @@ GEM
unicorn (>= 4, < 7)
uuid (2.3.9)
macaddr (~> 1.0)
webrick (1.8.1)

PLATFORMS
x86_64-linux
Expand Down Expand Up @@ -377,9 +382,10 @@ DEPENDENCIES
rack-timeout
rake (~> 10.0)
redcarpet
redis
redis (~> 4.8.1)
redis-activesupport
redis-rack-cache (~> 2.0)
request_store
shotgun!
simplecov
simplecov-cobertura
Expand All @@ -391,4 +397,4 @@ DEPENDENCIES
unicorn-worker-killer

BUNDLED WITH
2.3.23
2.3.14
6 changes: 6 additions & 0 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@
require_relative 'lib/rack/cube_reporter'
require_relative 'lib/rack/param_translator'
require_relative 'lib/rack/slice_detection'
require_relative 'lib/rack/request_lang'

# Logging setup
require_relative "config/logging"

# Inflector setup
require_relative "config/inflections"

require 'request_store'

# Protection settings
set :protection, :except => :path_traversal

Expand Down Expand Up @@ -143,6 +146,9 @@
use Rack::PostBodyToParams
use Rack::ParamTranslator

use RequestStore::Middleware
use Rack::RequestLang

use LinkedData::Security::Authorization
use LinkedData::Security::AccessDenied

Expand Down
2 changes: 1 addition & 1 deletion controllers/classes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ClassesController < ApplicationController
cls_count = submission.class_count(LOGGER)
error 403, "Unable to display classes due to missing metrics for #{submission.id.to_s}. Please contact the administrator." if cls_count < 0

attributes, page, size, filter_by_label, order_by_hash, bring_unmapped_needed = settings_params(LinkedData::Models::Class)
attributes, page, size, order_by_hash, bring_unmapped_needed = settings_params(LinkedData::Models::Class)
check_last_modified_segment(LinkedData::Models::Class, [ont.acronym])

index = LinkedData::Models::Class.in(submission)
Expand Down
2 changes: 1 addition & 1 deletion controllers/collection_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CollectionsController < ApplicationController

get '/members' do
ont, submission = get_ontology_and_submission
attributes, page, size, filter_by_label, order_by, bring_unmapped_needed = settings_params(LinkedData::Models::Class)
attributes, page, size, order_by, bring_unmapped_needed = settings_params(LinkedData::Models::Class)
collection_uri = get_collection_uri(params)
data = LinkedData::Models::Class.where(memberOf: collection_uri).in(submission).include(attributes).page(page,size).all
reply data
Expand Down
Loading