Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Bump ord-schema version #56

Merged
merged 58 commits into from
Dec 9, 2020
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
85fdc81
Bump ord-schema version
skearnes Nov 24, 2020
ca9c90c
Replace Feature list with Data map
skearnes Nov 24, 2020
325db68
ReactionAnalysis -> Analysis
skearnes Nov 24, 2020
c3cde9c
Reaction.workup -> Reaction.workups
skearnes Nov 24, 2020
856db32
Add support for Amount
skearnes Nov 24, 2020
29beff2
Add support for Source
skearnes Nov 24, 2020
2a6f171
Partial ProductMeasurement HTML
skearnes Nov 24, 2020
537214a
Update Analysis fields
skearnes Nov 24, 2020
37743ed
More work on ProductMeasurement HTML
skearnes Nov 24, 2020
0bd14b8
Bump to v0.2.1
skearnes Nov 24, 2020
33ef388
JS for ProductMeasurement
skearnes Nov 25, 2020
bef84f5
updates
skearnes Nov 25, 2020
e63c6e2
Updates for serve_test.py
skearnes Nov 25, 2020
6ac655d
Updates to db/ testdata
skearnes Nov 25, 2020
dad47cb
Fix infinite recursion error
skearnes Nov 26, 2020
fd42fd3
Fix amount load/unload
skearnes Nov 27, 2020
642264e
Fix feature key unload
skearnes Nov 27, 2020
5892fd6
Fix product identifier load/unload
skearnes Nov 27, 2020
286e4f2
Factor out Amount initialization
skearnes Nov 27, 2020
1482443
Fix matching multiple Amount fields
skearnes Nov 27, 2020
ce8c3cf
Fix product measurement load/unload
skearnes Nov 27, 2020
20c0531
Fix analysis key unload
skearnes Nov 27, 2020
e337c8a
Fix empty messages
skearnes Nov 27, 2020
88fa79f
Fix ord-nielsen-example tests
skearnes Nov 28, 2020
49a561b
lint
skearnes Nov 28, 2020
8aeac4f
Edits to run closure linter via docker exec
skearnes Nov 28, 2020
afc61b0
Merge branch 'main' into migration
skearnes Nov 28, 2020
18d4172
bump cleanup.yml version
skearnes Nov 30, 2020
7ebb77f
Bump to v0.2.2
skearnes Dec 3, 2020
6a0909e
Fix python version
skearnes Dec 3, 2020
560c9e9
Merge branch 'main' into migration
skearnes Dec 3, 2020
490485a
Fix tests for v0.2.2
skearnes Dec 4, 2020
0e89d9e
Merge branch 'main' into migration
skearnes Dec 4, 2020
5a677aa
Comma-separated eic_masses; requires protobuf 3.14.0
skearnes Dec 4, 2020
d4483a7
Missed protobuf version in cleanup.yml action
skearnes Dec 4, 2020
6b7cf09
Update other protobuf version instances
skearnes Dec 4, 2020
9ef1afc
run_editor_tests.sh -> run_tests.sh
skearnes Dec 7, 2020
3d570ec
Rework isEmptyMessage
skearnes Dec 7, 2020
75113f6
Fix add identifier button for products
skearnes Dec 7, 2020
35d4ac3
Add tooltip to measurements
skearnes Dec 7, 2020
93d9e0a
Fix bad copy in unloadMeasurement
skearnes Dec 7, 2020
a87f66a
Only set stringValue if non-empty
skearnes Dec 7, 2020
4c1903e
Add tooltip
skearnes Dec 7, 2020
19ea5f3
Add/remove floattext class to data values
skearnes Dec 7, 2020
0b0b1da
Fix workup amount unload
skearnes Dec 7, 2020
7e33698
Install requirements before pylint
skearnes Dec 7, 2020
c677a56
Break value/type in measurements
skearnes Dec 7, 2020
ac4053f
Show/hide measurement fields
skearnes Dec 8, 2020
86e8a51
Fix default analysis key
skearnes Dec 8, 2020
af05342
clang-format
skearnes Dec 8, 2020
d759a0a
More efficient empty checks
skearnes Dec 8, 2020
1c0b4a2
Fix floating radio buttons
skearnes Dec 8, 2020
e18d658
fixes
skearnes Dec 9, 2020
aba9d53
ketcher 404->204
skearnes Dec 9, 2020
bf21d1b
updates
skearnes Dec 9, 2020
b043e82
spacing in ProductMeasurement
skearnes Dec 9, 2020
3dc2138
update serve_test.py error code
skearnes Dec 9, 2020
379862d
Merge branch 'main' into migration
skearnes Dec 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ name: Lint
on: [pull_request, push]

env:
# ord-schema is versioned to avoid breaking ord-editor.
ORD_SCHEMA_TAG: v0.1.1
ORD_SCHEMA_TAG: v0.2.3

jobs:
check_licenses:
Expand Down Expand Up @@ -51,6 +50,7 @@ jobs:
- name: yapf
run: |
cd "${GITHUB_WORKSPACE}/ord-editor"
pip install -r requirements.txt
pip install yapf
yapf --parallel --recursive --exclude="*_pb2.py" --quiet .
- name: Install ord-schema
Expand Down Expand Up @@ -102,8 +102,8 @@ jobs:
cd "${GITHUB_WORKSPACE}/ord-editor"
pip install flask pylint yapf
npm install google-protobuf puppeteer
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protobuf-js-3.13.0.tar.gz
tar -xzf protobuf-js-3.13.0.tar.gz
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protobuf-js-3.14.0.tar.gz
tar -xzf protobuf-js-3.14.0.tar.gz
wget https://github.com/google/closure-library/archive/v20200517.tar.gz
tar -xzf v20200517.tar.gz
git clone https://github.com/Open-Reaction-Database/ketcher.git
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
pip install psycopg2-binary
npm install puppeteer
export ORD_EDITOR_POSTGRES_PASSWORD=test
./run_editor_tests.sh
./run_tests.sh
30 changes: 19 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@

FROM continuumio/miniconda3

RUN apt-get update && apt-get install -y \
build-essential \
procps \
unzip \
&& rm -rf /var/lib/apt/lists/*
# default-jre is required for running the closure compiler linter.
# https://github.com/geerlingguy/ansible-role-java/issues/64#issuecomment-597132394
RUN mkdir /usr/share/man/man1/
RUN apt-get update \
&& apt-get install -y build-essential default-jre procps unzip \
&& apt-get clean

RUN conda install -c rdkit \
flask \
Expand All @@ -53,23 +54,30 @@ RUN cd ketcher \
RUN wget https://github.com/google/closure-library/archive/v20200517.tar.gz \
&& tar -xzf v20200517.tar.gz \
&& rm v20200517.tar.gz
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protobuf-js-3.13.0.tar.gz \
&& tar -xzf protobuf-js-3.13.0.tar.gz \
&& rm protobuf-js-3.13.0.tar.gz
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protobuf-js-3.14.0.tar.gz \
&& tar -xzf protobuf-js-3.14.0.tar.gz \
&& rm protobuf-js-3.14.0.tar.gz

# Dependencies for testing.
RUN npm install google-closure-compiler

# Install ord-schema.
WORKDIR ..
RUN git clone https://github.com/Open-Reaction-Database/ord-schema.git
WORKDIR ord-schema
# NOTE(kearnes): ord-schema is versioned to avoid breaking ord-editor.
ARG ORD_SCHEMA_TAG=v0.1.1
ARG ORD_SCHEMA_TAG=v0.2.3
RUN git fetch --tags && git checkout "${ORD_SCHEMA_TAG}"
RUN pip install -r requirements.txt
RUN python setup.py install

# COPY the local state.
# Install editor dependencies.
WORKDIR ../ord-editor
COPY requirements.txt ./
RUN pip install -r requirements.txt

# COPY the local state.
COPY Makefile schema.sql ./
COPY actions/ actions/
COPY css/ css/
COPY db/ db/
COPY html/ html/
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
closure = closure-library-20200517

# https://github.com/protocolbuffers/protobuf/releases
protobuf = protobuf-3.13.0
protobuf = protobuf-3.14.0

# Check that the present ketcher code is compatible.
ketcher-req = v0.1.0+ord
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ v20200517](https://github.com/google/closure-library/releases/).

Unpack the archive in the editor directory so the Closure compiler can find it.
```
$ url=https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protobuf-js-3.13.0.tar.gz
$ url=https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protobuf-js-3.14.0.tar.gz
$ wget $url -O - | tar zxf -
```
At the time of writing, [version
3.13.0](https://github.com/protocolbuffers/protobuf/releases/tag/v3.13.0)
3.14.0](https://github.com/protocolbuffers/protobuf/releases/tag/v3.14.0)
matches the protoc compiler in pip's protoc-wheel-0 distribution referenced
from ../requirements.txt.

Expand Down
5 changes: 3 additions & 2 deletions actions/lint_js.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# Copyright 2020 Open Reaction Database Project Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,12 +36,12 @@ ENTRY_POINT="$1"
java -jar node_modules/google-closure-compiler-java/compiler.jar \
--entry_point "${ENTRY_POINT}" \
--js 'closure-library-20200517/**.js' \
--js 'protobuf-3.13.0/js/**.js' \
--js 'protobuf-3.14.0/js/**.js' \
--js 'gen/js/proto/ord/**.js' \
--js 'js/**.js' \
--dependency_mode PRUNE \
--checks_only \
--jscomp_error lintChecks \
--hide_warnings_for closure-library-20200517 \
--hide_warnings_for protobuf-3.13.0/js \
--hide_warnings_for protobuf-3.14.0/js \
--hide_warnings_for gen/js/proto/ord
151 changes: 88 additions & 63 deletions db/680b0d9fe649417cb092d790907bd5a5/full.pbtxt
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ reactions {
details: "6"
value: "5"
}
volume {
value: 7.0
precision: 8.0
units: LITER
amount {
volume {
value: 7.0
precision: 8.0
units: LITER
}
volume_includes_solutes: true
}
reaction_role: REACTANT
is_limiting: true
Expand All @@ -60,24 +63,29 @@ reactions {
details: "9"
reaction_id: "9.5"
}
vendor_source: "10"
vendor_id: "11"
vendor_lot: "12"
source {
vendor: "10"
id: "11"
lot: "12"
}
features {
name: "13"
float_value: 14.0
how_computed: "15"
key: "13"
value: {
float_value: 14.0
description: "15"
}
}
volume_includes_solutes: true
}
crude_components {
reaction_id: "15.25"
includes_workup: true
has_derived_amount: false
volume {
value: 15.5
precision: 15.75
units: MICROLITER
amount {
volume {
value: 15.5
precision: 15.75
units: MICROLITER
}
}
}
addition_order: 16
Expand Down Expand Up @@ -298,7 +306,7 @@ reactions {
format: "86"
}
}
workup {
workups {
type: FILTRATION
details: "92"
duration {
Expand Down Expand Up @@ -371,10 +379,12 @@ reactions {
}
target_ph: 89.0
is_automated: true
volume {
value: 123.0
precision: 0.5
units: MILLILITER
amount {
volume {
value: 123.0
precision: 0.5
units: MILLILITER
}
}
}
outcomes {
Expand All @@ -388,43 +398,65 @@ reactions {
precision: 116.0
}
products {
compound {
identifiers {
type: IUPAC_NAME
details: "116.2"
value: "116.1"
}
volume {
value: 116.25
precision: 116.375
units: MICROLITER
}
features {
name: "116.5"
identifiers {
type: IUPAC_NAME
details: "116.2"
value: "116.1"
}
features {
key: "116.5"
value: {
float_value: 116.625
how_computed: "116.7"
description: "116.7"
}
}
is_desired_product: true
compound_yield {
value: 117.0
precision: 118.0
}
purity {
value: 119.0
precision: 120.0
}
selectivity {
type: ZE
details: "123"
value: 121.0
precision: 122.0
}
analysis_identity: "analysis1"
analysis_yield: "analysis2"
analysis_yield: "analysis1"
analysis_purity: "analysis2"
analysis_selectivity: "analysis1"
measurements {
analysis_key: "analysis1"
type: YIELD
uses_internal_standard: true
uses_authentic_standard: false
percentage {
value: 117.0
precision: 118.0
}
mass_spec_details {
type: EIC
eic_masses: 1.2
eic_masses: 3.4
eic_masses: 5.6
}
selectivity {
type: ZE
details: "123"
}
}
measurements {
analysis_key: "analysis1"
type: PURITY
percentage {
value: 119.0
precision: 120.0
}
}
measurements {
analysis_key: "analysis1"
type: AMOUNT
amount {
mass {
value: 116.25
precision: 116.375
units: GRAM
}
}
}
measurements {
type: PURITY
percentage {
value: 987.6
precision: 543.2
}
}
isolated_color: "124"
texture {
type: POWDER
Expand All @@ -437,23 +469,23 @@ reactions {
type: NMR_13C
chmo_id: 131
details: "132"
processed_data {
data {
key: "135"
value {
url: "136"
description: "137"
format: "138"
}
}
raw_data {
data {
key: "139"
value {
float_value: 140.0
description: "141"
format: "142"
}
}
raw_data {
data {
key: "byte_data"
value {
bytes_value: "bytestring"
Expand All @@ -463,13 +495,6 @@ reactions {
instrument_last_calibrated {
value: "134"
}
uses_internal_standard: true
uses_authentic_standard: false
}
}
analyses {
key: "analysis2"
value {
}
}
}
Expand Down