Skip to content

Commit

Permalink
Merge pull request #4 from seek4science/gh-pages-1.16.0
Browse files Browse the repository at this point in the history
1.16.0 update
  • Loading branch information
stuzart authored Dec 6, 2024
2 parents 873a241 + 3321744 commit c7fec7d
Show file tree
Hide file tree
Showing 22 changed files with 842 additions and 146 deletions.
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#baseurl: /seek

current_seek_version: "1.15.2"
current_docker_tag: "1.15"
current_seek_version: "1.16.0"
current_docker_tag: "1.16"

plugins:
- jekyll-sitemap
Expand Down
Binary file added images/user-guide/extended-metadata/cvs-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/user-guide/extended-metadata/emas-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/user-guide/extended-metadata/emt-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/user-guide/extended-metadata/extended-metadata-select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 100 additions & 0 deletions tech/earlier-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,106 @@ each released minor version in order incrementally (i.e. 0.13.x -> 0.14.x ->

Each version has a tag, which has the format of *v* prefix
followed by the version - e.g. v0.11.1, v0.13.2, v0.17.1

## Steps to upgrade from 1.14.x to 1.15.x


### Set RAILS_ENV

**If upgrading a production instance of SEEK, remember to set the RAILS_ENV first**

export RAILS_ENV=production

### Stopping services before upgrading

bundle exec rake seek:workers:stop

### Getting the upgrade

The steps to fetch the upgrade will be different depending on whether it was originally installed directly
from Github or via a downloaded tarball.

#### Updating from GitHub

If you have an existing installation linked to our GitHub, you can fetch the
files with:

git fetch
git checkout v1.15.2

#### Updating using the tarball

You can download the file from
<https://github.com/seek4science/seek/archive/v1.15.2.tar.gz> You can
unpack this file using:

tar zxvf seek-1.15.2.tar.gz
mv seek seek-previous
mv seek-1.15.2 seek
cd seek/

and then copy across your existing filestore and database configuration file
from your previous installation and continue with the upgrade steps. The
database configuration file you would need to copy is _config/database.yml_,
and the filestore is simply _filestore/_

### Install Python dependencies

First, a specific version of `setuptools` needs to be installed to avoid an issue when installing dependencies

python3.9 -m pip install setuptools==58

Then the other dependencies can be installed

python3.9 -m pip install -r requirements.txt

### Upgrading Ruby

It is necessary to upgrade to Ruby 3.1.4. If you are using [RVM](https://rvm.io/) (according to the [Installation Guide](install.html) )you should be prompted to install during the standard installation steps that follow.
If you are not prompted you can install with the command:

rvm install $(cat .ruby-version)

### Doing the upgrade

After updating the files, the following steps will update the database, gems,
and other necessary changes. Note that seek:upgrade may take longer than usual if you have data stored that points to remote
content.

**Please note** - during the upgrade the step _Updating session store_ can take a long time and appear that it has frozen, so please be patient.

cd . # this is to allow RVM to set the correct ruby version
gem install bundler
bundle install
bundle exec rake seek:upgrade
bundle exec rake assets:precompile # this task will take a while

### Update Cron Services

SEEK requires some cron jobs for periodic background jobs to run. To update these run:

bundle exec whenever --update-crontab

### Restarting background job services

bundle exec rake seek:workers:start

### Final notes

If you encounter any problems with loading gems (likely _stringio_ or _strscan_) when running with Passenger, add the following to your Apache configuration:

PassengerPreloadBundler on

more details at [PassengerPreloadBundler](https://www.phusionpassenger.com/docs/references/config_reference/apache/#passengerpreloadbundler)

If using Nginx, the setting is

passenger_preload_bundler on;

more details at [passenger_preload_bundler](https://www.phusionpassenger.com/docs/references/config_reference/nginx/#passenger_preload_bundler)

---

## Steps to upgrade from 1.13.x to 1.14.x

### Dependencies
Expand Down
195 changes: 195 additions & 0 deletions tech/extended-metadata/a-complete-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
---
title: A Complete Example to Create Extended Metadata Types by Uploading a JSON File
layout: page
---

<a href="create-extended-metadata-type-with-json-file.html">back</a>

# A Complete Example


## Step 1: Define Controlled Vocabularies

Currently, controlled vocabularies can only be created through the user interface by anyone with permission to create resources in SEEK

You can also use the following direct link ```HTTP://{HOST_NAME}/sample_controlled_vocabs/new``` to create controlled vocabularies or the button on the [Controlled Vocabulary](manage-extended-metadata-type.html/#3-controlled-vocabularies-tab) tab.

Assuming the controlled vocabularies have been created here:
<img src="/images/user-guide/extended-metadata/cvs-tab.png" alt="extended-metadata-fields" width="600">

You can view the detailed controlled vocabularies by clicking the corresponding its ID.
<img src="/images/user-guide/extended-metadata/role_name_identifier_scheme_cv.png" alt="extended-metadata-fields" width="500">

## Step 2: Define Nested Exended Metadata Types

1. Define a metadata type named `role_name_identifiers` with two attributes: `scheme` and `identifier`. After creation, it is assigned ID `158`.

```json
{
"title": "role_name_identifiers",
"supported_type": "ExtendedMetadata",
"enabled": true,
"attributes": [
{
"title": "scheme",
"type": "Controlled Vocabulary",
"required": true,
"ID": 14, // ID of CV "Role Name Identifier Scheme"
"label": "scheme",
"description": "scheme"
},
{
"title": "identifier",
"type": "String",
"required": false,
"label": "identifier",
"description": "identifier"
}
]
}
```

2.Define a new metadata type called `role_emt`, which will have one attribute linked to the previously created `role_name_identifiers`. Consequently, the `role_emt` type will be established with five attributes and assigned the ID 159.

```json
{
"title": "role_emt",
"supported_type": "ExtendedMetadata",
"enabled": true,
"attributes": [
{
"title": "role_name_personal_title",
"type": "Controlled Vocabulary",
"required": true,
"ID": 13, // ID of CV "Role Name Personal Title"
"label": "personal title",
"description": "personal title"
},
{
"title": "first_name",
"type": "String",
"required": false,
"label": "first name",
"description": "first name"
},
{
"title": "last_name",
"type": "String",
"required": false,
"label": "last name",
"description": "last name"
},
{
"title": "role_type",
"type": "Controlled Vocabulary",
"required": true,
"ID": 12, // ID of CV "Role type"
"label": "role type",
"description": "role type"
},
{
"title": "role_name_identifiers",
"type": "Linked Extended Metadata (multiple)",
"required": false,
"ID": 158, // ID of the nested metadata type `role_name_identifiers`
"label": "role name identifiers",
"description": "role name identifiers"
}
]
}
```



## Step 3: Define Top Level Extended Metadata Type for Study

```json
{
"title": "An example with all attribute types",
"supported_type": "Study",
"enabled": true,
"attributes": [
{
"title": "title",
"required": true,
"type": "String",
"label": "study title",
"description": "study title"
},
{
"title": "description",
"required": true,
"type": "Text",
"label": "study description",
"description": "study description"
},
{
"title": "study_start_date",
"required": true,
"type": "Date",
"label": "study start date",
"description": "study start date"

},
{
"title": "study_start_time",
"required": true,
"type": "Date time",
"label": "study start time",
"description": "study start time"
},
{
"title": "study_age",
"required": true,
"type": "Integer",
"label": "study age",
"description": "study age"
},
{
"title": "cholesterol_level",
"required": true,
"type": "Real number",
"label": "cholesterol level",
"description": "cholesterol level"
},
{
"title": "resource_use_rights_authors_confirmation",
"required": true,
"type": "Boolean",
"label": "resource use rights authors confirmation",
"description": "resource use rights authors confirmation"
},
{
"title": "resource_type_general",
"required": true,
"type": "Controlled Vocabulary",
"ID": 16, // ID of CV "resource_type_general"
"label": "resource type general",
"description": "resource type general"
},
{
"title": "resource_study_country",
"type": "Controlled Vocabulary List",
"required": true,
"ID": 15, // ID of CV "European Study Country"
"label": "study country",
"description": "study country"
},
{
"title": "role",
"type": "Linked Extended Metadata (multiple)",
"required": false,
"ID": 159, // ID of the nested metadata type `role_emt`
"label": "role",
"description":"role"
}
]
}
```

## Step 4: Use Extended Metadata Type

As the result, you can choose to load this extended metadata type on the study creation page.
![](/images/user-guide/extended-metadata/emt-ui.png)


Loading

0 comments on commit c7fec7d

Please sign in to comment.