training-catalogue
Training catalogue for the ExPaNDS and PaNOSC projects based on ELIXIR's Training Portal TeSS
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.2%) to scientific vocabulary
Repository
Training catalogue for the ExPaNDS and PaNOSC projects based on ELIXIR's Training Portal TeSS
Basic Info
Statistics
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 36
- Releases: 4
Metadata Files
README.md
PaN Training Catalogue (based on the TeSS Trainning Catalogue from ELIXIR)
This repository contains the sourcecode of our PaN Training Catalogue. This catalogue is based on the TeSS Trainning Catalogue from the ELIXIR project and is used in our Photon and Neutron (PaN) projects ExPaNDS and PaNOSC.
Setup
sudo apt-get install git postgresql libpq-dev imagemagick openjdk-8-jre nodejs redis-server
Clone the TeSS source code via git:
git clone https://github.com/ElixirTeSS/TeSS.git
RVM, Ruby, Gems
It is typically recommended to install Ruby with RVM. With RVM, you can specify the version of Ruby you want installed, plus a whole lot more (e.g. gemsets). Full installation instructions for RVM are available online. In short:
sudo apt-get install software-properties-common
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
rvm user gemsets
TeSS was developed using Ruby 2.4.5. We recommend using version 2.7.4 for our PaN catalague. To install recommended version of ruby and create a gemset, you can do something like the following:
rvm install `cat .ruby-version`
/bin/bash --login
rvm get stable --auto-dotfiles
rvm use --create `cat .ruby-version`@`cat .ruby-gemset`
Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed for your Ruby application.
gem install bundler
Redis/Sidekiq
We installed Redis before... but start Sidekiq!
bundle exec sidekiq
...or as a daemon in the background for production:
bundle exec sidekiq -d -L log/sidekiq.log -e production
Note that program 'gem' (a package management framework for Ruby called RubyGems) gets installed when you install RVM so you do not have to install it separately.
Once you have Ruby, RVM and bundler installed, from the root folder of the app do:
bundle install
Follow the steps on the official GitHub and setup PostgrSQL repo, Solr, ... In a first development instance is is necessary to add the database login information in secrets.yml.
Set up environment
bin/rails db:environment:set RAILS_ENV=development or production!!!
Solr
TeSS uses Apache Solr to power its search and filtering system.
To start solr, run:
bundle exec rake sunspot:solr:start
You can replace start with stop or restart to stop or restart solr. You can use reindex to reindex all records.
bundle exec rake sunspot:solr:reindex
Database and Config
From the app's root directory, create several config files by copying the example files.
cp config/tess.example.yml config/tess.yml
cp config/sunspot.example.yml config/sunspot.yml
cp config/secrets.example.yml config/secrets.yml
Create Postgres DB with user tess_user and edit config/secrets.yml to configure the database name, user and password defined before.
Edit config/secrets.yml to configure the app's secretkeybase which you can generate with:
bundle exec rake secret
Create the databases:
bundle exec rake db:create:all
Start Solr:
bundle exec rake sunspot:solr:start
bundle exec rake sunspot:solr:reindex
Create the database structure and load in seed data:
Note: Ensure you have started Solr before running this command!
$ bundle exec rake db:setup
Dev Server
The dev server can evaluated with
bundle exec sidekiq
and
bundle exec rails server
and accessed via: http://localhost:3000
Setup Administrators
Once you have a local TeSS succesfully running, you may want to setup administrative users. To do this register a new account in TeSS through the registration page. Then go to the applications Rails console:
bundle exec rails c
Find the user and assign them the administrative role. This can be completed by running this (where myemail@domain.co is the email address you used to register with):
2.2.6 :001 > User.find_by_email('myemail@domain.co').update_attributes(role: Role.find_by_name('admin'))
Deployment: Providing TeSS using an Application Server
After setting up TeSS, the configuration of an application server (Phusion Passenger is an application server and it is often used to power Ruby sites) is required.
Or my prefered setup with Nginx:
https://www.phusionpassenger.com/library/config/nginx/intro.html
We need additinal packages:
apt-get install apache2-dev apt-get install libcurl4-gnutls-dev
After successfull development deployment add the Passenger Gem with:
``` sudo apt-get install -y dirmngr gnupg sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7 sudo apt-get install -y apt-transport-https ca-certificates
Add our APT repository
sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger bionic main > /etc/apt/sources.list.d/passenger.list' sudo apt-get update
Install Passenger + Nginx module
sudo apt-get install -y libnginx-mod-http-passenger ```
Check the installation with:
sudo /usr/bin/passenger-config validate-install
sudo /usr/sbin/passenger-memory-stats
...and add the recommended lines to your Nginx configuration file and finish the Passenger setup.
server {
# SSL configuration
listen 443;
ssl on;
proxy_set_header X_FORWARDED_PROTO https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Url-Scheme $scheme;
proxy_redirect off;
proxy_max_temp_file_size 0;
server_name pan-training.hzdr.de;
ssl_certificate /etc/ssl/certs/pan.cert;
ssl_certificate_key /etc/ssl/private/pan.key;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
root /var/www/catalogue/public;
passenger_enabled on;
passenger_ruby /usr/share/rvm/gems/ruby-2.4.5@tess/wrappers/ruby;
passenger_document_root /var/www/catalogue/public/;
passenger_sticky_sessions on;
}
Then we initialize the production environment:
bundle exec rake db:setup RAILS_ENV=production
or clean init:
bundle exec rake db:reset RAILS_ENV=production
...and reindex Solr:
bundle exec rake sunspot:solr:start RAILS_ENV=production
bundle exec rake sunspot:solr:reindex RAILS_ENV=production
Create an admin user and assign it appropriate 'admin' role bu looking up that role in console in model Role (default roles should be created automatically):
bundle exec rails c -e production
The first time and each time a css or js file is updated:
bundle exec rake assets:clean RAILS_ENV=production
bundle exec rake assets:precompile RAILS_ENV=production
and reindexing the matadata:
bundle exec rake sunspot:solr:reindex RAILS_ENV=production
Status Check and restart:
bundle exec rake sunspot:solr:start RAILS_ENV=production
service nginx restart
bundle exec sidekiq -d -L log/sidekiq.log -C config/sidekiq.yml -e production
service redis-server restart
passenger-memory-stats
passenger-status
Logfiles:
/var/log/redis/redis-server.log
/var/log/nginx/error.log
/var/log/catalogue/passenger.log
/var/log/catalogue/sidekiq.log
/var/log/catalogue/production.log
/var/log/catalogue/sunspot-solr-production.log
Owner
- Name: pan-training
- Login: pan-training
- Kind: organization
- Website: pan-training.eu
- Repositories: 4
- Profile: https://github.com/pan-training
e-learning intitiative for the PaNOSC and ExPaNDS EU projects
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Knodel"
given-names: "Oliver"
orcid: "https://orcid.org/0000-0001-8174-7795"
- family-names: "Padovani"
given-names: "Antoine"
- family-names: "Schwabe"
given-names: "Julia"
title: "Training-catalogue for the Photon and Neutron Data Services"
date-released: "2022-12-21"
keywords:
- "PaN-training"
- "training"
- "photon science"
- "neutron science"
- "e-learning"
- "TeSS"
license: BSD-3-Clause-Clear
message: "If you use this software, please cite it using these metadata."
version: 1.1.2
doi: 10.5281/zenodo.7015078
url: "https://github.com/pan-training/training-catalogue"
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "PaN training-catalogue",
"description": "Browsing, discovering and organising PaN sciences training resources.",
"name": "PaN Training Catalogue",
"codeRepository": "https://github.com/pan-training/training-catalogue",
"issueTracker": "https://github.com/pan-training/training-catalogue/issues",
"license": "https://opensource.org/licenses/BSD-3-Clause",
"version": "1.0",
"author": [],
"contIntegration": "",
"developmentStatus": "active",
"downloadUrl": "https://github.com/pan-training/training-catalogue/archive/master.zip",
"keywords": [
"training",
"software"
],
"softwareVersion": "1.1",
"dateCreated": "2021-06-11",
"datePublished": "2021-06-11",
"programmingLanguage": "Ruby"
}
GitHub Events
Total
- Create event: 3
- Issues event: 1
- Release event: 1
- Watch event: 1
- Delete event: 3
- Issue comment event: 1
- Push event: 2
- Pull request event: 4
Last Year
- Create event: 3
- Issues event: 1
- Release event: 1
- Watch event: 1
- Delete event: 3
- Issue comment event: 1
- Push event: 2
- Pull request event: 4
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- knodel (1)
Pull Request Authors
- knodel (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- byebug >= 0 development
- codacy-coverage >= 0 development
- fakeredis >= 0 development
- listen >= 0 development
- minitest = 5.10.3 development
- rails-controller-testing >= 0 development
- rubocop >= 0 development
- sdoc ~> 0.4.0 development
- simplecov >= 0 development
- web-console >= 0 development
- webmock ~> 3.4.2 development
- active_model_serializers >= 0
- activerecord-session_store >= 0
- ahoy_matey >= 0
- auto_strip_attributes ~> 2.0
- blazer >= 0
- bootsnap >= 1.4.6
- bootstrap-datepicker-rails ~> 1.6.4.1
- bootstrap-sass >= 3.4.1
- by_star ~> 4.0.0
- devise >= 0
- dynamic_sitemaps >= 0
- faker >= 0
- font-awesome-sass ~> 4.7.0
- friendly_id ~> 5.2.4
- geocoder >= 0
- gravtastic ~> 3.2.6
- haml ~> 5.0.4
- handlebars_assets >= 0
- httparty >= 0
- icalendar ~> 2.4.1
- jbuilder >= 0
- jquery-rails >= 0
- jquery-simplecolorpicker-rails >= 0
- jquery-turbolinks >= 0
- language_list ~> 1.1
- linkeddata >= 0
- lunchy >= 0
- mimemagic >= 0
- omniauth_openid_connect >= 0
- paperclip ~> 5.2.1
- passenger >= 5.0.25
- pg >= 0
- private_address_check >= 0
- progress_bar ~> 1.1.0
- public_activity ~> 1.6.1
- pundit ~> 1.1.0
- rack-cors >= 0
- rails ~> 5.2
- rails-assets-clipboard ~> 1.5.12
- rails-assets-devbridge-autocomplete ~> 1.2.26
- rails-assets-eonasdan-bootstrap-datetimepicker ~> 4.17.42
- rails-assets-markdown-it ~> 7.0.1
- rails-assets-moment ~> 2.15.0
- rails_admin >= 0
- rake_text >= 0
- recaptcha >= 0
- redcarpet ~> 3.5.1
- redis >= 0
- sass-rails ~> 5.0
- sidekiq >= 0
- simple_form >= 0
- simple_token_authentication ~> 1.0
- slim >= 0
- sunspot_rails ~> 2.2.7
- sunspot_solr = 2.2.0
- tess_api_client >= 0
- therubyracer >= 0
- time_diff >= 0
- turbolinks >= 0
- uglifier >= 1.3.0
- validate_url ~> 1.0.2
- whenever >= 0
- will_paginate >= 0
- 233 dependencies
- actions/checkout v2 composite
- ruby/setup-ruby v1 composite