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

Feature/dockerize ruby #236

Open
wants to merge 19 commits into
base: feature/upgrade-ruby
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
run: |
cd app/assets/javascripts/3dbio_viewer
yarn install
yarn localize
yarn build
- name: Check build dependency versions (3dbioviewer)
run: |
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ruby '3.3.1'
gem 'rails', '7.1.3.2'

#gem 'mysql2', '0.4.10'
gem 'mysql2', '0.5'
gem 'mysql2', '0.5.6'
gem 'sqlite3', '1.4.2'

gem 'haml'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ GEM
mini_mime (1.1.5)
minitest (5.22.3)
mutex_m (0.2.0)
mysql2 (0.5.0)
mysql2 (0.5.6)
net-imap (0.4.10)
date
net-protocol
Expand Down Expand Up @@ -257,7 +257,7 @@ DEPENDENCIES
haml
jquery-rails (= 4.6.0)
json
mysql2 (= 0.5)
mysql2 (= 0.5.6)
nori
passenger (= 5.1.12)
rack-cors
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Use rvm or rbenv to select the Ruby version specified in Gemfile and then run:

```
$ git submodule update --recursive --init
$ rvm install ruby-3.3.1
$ gem install bundler:2.5.10
$ sudo apt install libmysqlclient-dev # Debian/Ubuntu
Expand All @@ -35,10 +34,9 @@ Before you start your setup, make sure you have homebrew, ruby, rvm and python2
Use rvm or rbenv to select the Ruby version specified in Gemfile and then run:

```
$ git submodule update --recursive --init
$ rvm install ruby-3.3.1
$ gem install bundler:2.2.15
$ brew install gsl mysql
$ brew install mysql
$ gem install bundler:2.0.0.pre.3
```

Expand Down
5 changes: 1 addition & 4 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,4 @@

//= link webserver/viewer.css
//= link application.css
//= link application.js

//= link_tree ../javascripts/3dbio_viewer/build
//= link_tree ../javascripts/covid19/build
//= link application.js
2 changes: 1 addition & 1 deletion app/assets/javascripts/3dbio_viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@3dbionotes/pdbe-molstar": "3.1.0-est-2",
"@3dbionotes/protvista-pdb": "2.0.1-est-2-beta.1",
"@3dbionotes/protvista-pdb": "2.0.1-est-2-beta.2",
"@material-ui/core": "^4.11.2",
"@material-ui/data-grid": "4.0.0-alpha.35",
"@material-ui/icons": "^4.11.2",
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/3dbio_viewer/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
type="text/css"
/>

<script src="/protvista-pdb/protvista-pdb-2.0.1-est-2-beta.1.js"></script>
<script src="/protvista-pdb/protvista-pdb-2.0.1-est-2-beta.2.js"></script>
<script src="/pdbe-molstar/pdbe-molstar-plugin-3.1.0-est-2.js"></script>

<title>3dbio Viewer</title>
Expand Down
3 changes: 1 addition & 2 deletions app/assets/javascripts/3dbio_viewer/src/data/PdbLigands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ const publicationC = Codec.interface({
doi: string,
pubMedId: string,
PMCId: string,
abstract: string,
authors: array(authorC),
});

Expand Down Expand Up @@ -129,7 +128,7 @@ export const commonLigand = {
imageLink: string,
externalLink: string,
pubChemCompoundId: string,
IUPACInChI: string,
IUPACInChI: optional(string),
isomericSMILES: string,
canonicalSMILES: string,
};
Expand Down
24 changes: 16 additions & 8 deletions app/assets/javascripts/3dbio_viewer/src/data/PdbPublications.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Codec, GetType, array, nullType, number, string } from "purify-ts";
import { maybe } from "./PdbLigands";
import { PdbPublication } from "../domain/entities/Pdb";
import _ from "lodash";

export const publicationsCodec = array(
//using so many "maybe" from examples: 7O7Z, 6ABA, 7SUB
Expand All @@ -21,11 +22,11 @@ export const publicationsCodec = array(
year: maybe(number),
}),
abstract: Codec.interface({
background: nullType,
objective: nullType,
methods: nullType,
results: nullType,
conclusions: nullType,
background: maybe(string),
objective: maybe(string),
methods: maybe(string),
results: maybe(string),
conclusions: maybe(string),
unassigned: maybe(string),
}),
author_list: array(
Expand Down Expand Up @@ -62,6 +63,15 @@ export function getPublications(publications: PublicationsCodec): PdbPublication
abstract,
author_list,
}) => {
const description = _.compact([
abstract.background,
abstract.conclusions,
abstract.methods,
abstract.objective,
abstract.results,
abstract.unassigned,
]).join(" "); //possibly "" if all are null

return {
title,
type,
Expand All @@ -78,9 +88,7 @@ export function getPublications(publications: PublicationsCodec): PdbPublication
issue: journal_info.issue ?? undefined,
year: journal_info.year ?? undefined,
},
abstract: {
unassigned: abstract.unassigned ?? undefined,
},
abstract: description || undefined,
authors: author_list.map(author => author.full_name),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ export interface PdbPublication {
issue?: string;
year?: number;
};
abstract: {
unassigned?: string;
};
abstract?: string;
authors: string[];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const BasicInfoEntry: React.FC<BlockComponentProps> = React.memo(props =>
function getItems(publication: PdbPublication) {
const items: Item[] = _.compact([
{ name: i18n.t("Title"), value: escapeHTML(publication.title) },
{ name: i18n.t("Abstract"), value: escapeHTML(publication.abstract.unassigned) },
{ name: i18n.t("Abstract"), value: escapeHTML(publication.abstract) },
{ name: i18n.t("Authors"), value: publication.authors.join(", ") },
{
name: i18n.t("Journal"),
Expand Down
8 changes: 4 additions & 4 deletions app/assets/javascripts/3dbio_viewer/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
lodash "^4.17.21"
molstar "3.15.0"

"@3dbionotes/[email protected].1":
version "2.0.1-est-2-beta.1"
resolved "https://registry.yarnpkg.com/@3dbionotes/protvista-pdb/-/protvista-pdb-2.0.1-est-2-beta.1.tgz#9db59040a702a4b9bd5b4283e4d6ae1d63cd26ad"
integrity sha512-EuW6xY0ZlhKhUqievJPSmBqXPeE+LHK8oGku78yE5RGgCePaHYnBff0X1PL/lvhRBU968bxiZls2z1HOyKU8mQ==
"@3dbionotes/[email protected].2":
version "2.0.1-est-2-beta.2"
resolved "https://registry.yarnpkg.com/@3dbionotes/protvista-pdb/-/protvista-pdb-2.0.1-est-2-beta.2.tgz#83cbb6a6a56c1138de67c9263053ee7b73e48f89"
integrity sha512-3qCQWWIf1Rjpz1FEdcKzOi/CjcaZQc0VgPMYgxMpc2qZhuIcFQ8NRYIC4q1Zl5glui0nFM/DjMoTOCH2tXjx+A==
dependencies:
lodash-es "^4.17.11"
protvista-filter "2.0.0"
Expand Down
3 changes: 0 additions & 3 deletions app/assets/javascripts/covid19/i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,6 @@ msgstr ""
msgid "Journal"
msgstr ""

msgid "Abstract"
msgstr ""

msgid "Date"
msgstr ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export interface RefDoc {
pmID: string;
title: string;
authors: string[];
abstract?: string;
journal: string;
pubDate: string;
pmidLink?: Url;
Expand Down
3 changes: 1 addition & 2 deletions app/assets/javascripts/covid19/src/data/LigandToImageData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ const publicationC = Codec.interface({
doi: string,
pubMedId: string,
PMCId: string,
abstract: string,
authors: array(authorC),
});

Expand Down Expand Up @@ -125,7 +124,7 @@ export const commonLigand = {
imageLink: string,
externalLink: string,
pubChemCompoundId: string,
IUPACInChI: string,
IUPACInChI: optional(string),
isomericSMILES: string,
canonicalSMILES: string,
};
Expand Down
Loading
Loading