Skip to content

Commit

Permalink
Schema migration (#522)
Browse files Browse the repository at this point in the history
* Migration script draft

* Yapf

* Pylint

* Yapf

* Workup amount -> aliquot_amount

* Crude components are not implemented

* Update to 0.2.3 & Pylint

* Yapf

* Crude component check was incorrect

Co-authored-by: Connor W. Coley <ccoley@dhcp-10-29-249-50.dyn.MIT.EDU>
  • Loading branch information
connorcoley and Connor W. Coley committed Dec 7, 2020
1 parent 2a8b766 commit 59f3afc
Show file tree
Hide file tree
Showing 3 changed files with 414 additions and 1 deletion.
52 changes: 52 additions & 0 deletions ord_schema/proto/dataset_old.proto
@@ -0,0 +1,52 @@
// Copyright 2020 Open Reaction Database Project Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Protocol buffer messages for reaction datasets.
syntax = "proto3";

package ord_old;

import "ord_schema/proto/reaction_old.proto";

// A Dataset is a collection of Reaction message that is used to group reactions
// together into a logical unit along with relevant metadata or scripts for
// understanding and using the data.
message Dataset {
string name = 1;
string description = 2;
// The Dataset is specified by either:
// * a list of Reactions
// * a list of Reaction IDs from existing datasets
// Note that these are mutually exclusive.
//
// List of Reaction messages that are part of this dataset.
repeated Reaction reactions = 3;
// List of Reaction IDs that are part of this dataset. This is designed for
// creating Datasets that are composed of subsets of Reactions from existing
// datasets. For example, a collection of all reactions of a certain type
// across multiple datasets.
repeated string reaction_ids = 4;
// Dataset ID assigned during the submission process.
string dataset_id = 5;
}

// Metadata for an example of using a Dataset. For example, a DatasetExample
// might include a URL for a colab/jupyter notebook or a blog post showing how
// to use the Dataset in a downstream machine learning application.
message DatasetExample {
string dataset_id = 1;
string description = 2;
string url = 3;
RecordEvent created = 4;
}
2 changes: 1 addition & 1 deletion ord_schema/proto/reaction_old.proto
Expand Up @@ -15,7 +15,7 @@
// Schema for the Open Reaction Database.
syntax = "proto3";

package ord;
package ord_old;

/**
* Throughout this schema, we introduce enums to encourage consistency in
Expand Down

0 comments on commit 59f3afc

Please sign in to comment.