Skip to content

Commit 068c406

Browse files
committed
removed json schema files
1 parent e55aec1 commit 068c406

File tree

5 files changed

+35
-175
lines changed

5 files changed

+35
-175
lines changed

R/sysdata.rda

-5 Bytes
Binary file not shown.

data-raw/excelguide_schema.json

Lines changed: 0 additions & 146 deletions
This file was deleted.

data-raw/plateformats.R

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
## code to prepare `.plateformats`
22

3-
## Note that this must match the allowed formats in the json schema file
4-
## excelguide_schema.json
3+
## Note that this must match the allowed formats in the CUE schema file
4+
## excelguide_schema.cue, field #Plateformat
55

6-
schema <- jsonlite::read_json("data-raw/excelguide_schema.json")
7-
schema.plateformats <- unique(unlist(schema$properties$plate.format$enum))
6+
cue_lines <- readLines("data-raw/excelguide_schema.cue")
7+
plateformat_line <- cue_lines[grep("^#Plateformat:", cue_lines)]
8+
schema.plateformats <- trimws(strsplit(
9+
sub("^#Plateformat:\\s*", "", plateformat_line),
10+
"\\|"
11+
)[[1]])
812

913
.plateformats <- list(
1014
"24" = list(
@@ -25,7 +29,10 @@ schema.plateformats <- unique(unlist(schema$properties$plate.format$enum))
2529
)
2630
)
2731

28-
stopifnot(all(names(.plateformats) %in% schema.plateformats) && all(schema.plateformats %in% names(.plateformats)))
32+
stopifnot(
33+
all(names(.plateformats) %in% schema.plateformats) &&
34+
all(schema.plateformats %in% names(.plateformats))
35+
)
2936

3037
generate_wellnames <- function(format) {
3138
row <- LETTERS[1:.plateformats[[format]]$rows]

data-raw/validate_guide.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/testthat/fixtures/guide_competition_1_0.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ locations:
3333
ranges:
3434
- A10:B21
3535
- A24:B25
36-
- sheet: _data
36+
- sheet: "_data"
3737
type: platedata
3838
translate: false
3939
atomicclass:
@@ -59,13 +59,13 @@ locations:
5959
- A71:M79
6060
- A81:M89
6161
- A91:M99
62-
- sheet: _data
62+
- sheet: "_data"
6363
type: table
6464
translate: false
6565
varname: rejections
6666
ranges:
6767
- A101:B111
68-
- sheet: _parameters
68+
- sheet: "_parameters"
6969
type: keyvalue
7070
translate: false
7171
varname: parameters
@@ -75,13 +75,13 @@ locations:
7575
- A27:B28
7676
- A31:B32
7777
- A35:B36
78-
- sheet: _parameters
78+
- sheet: "_parameters"
7979
type: keyvalue
8080
translate: false
8181
varname: parameters
8282
ranges:
8383
- A39:B39
84-
- sheet: concentration response
84+
- sheet: "concentration response"
8585
type: table
8686
translate: false
8787
varname: userresults
@@ -98,7 +98,7 @@ locations:
9898
cell: G6
9999
- name: spread.itm2
100100
cell: G33
101-
- sheet: plate + experiment control
101+
- sheet: "plate + experiment control"
102102
type: cells
103103
varname: userresults
104104
translate: false
@@ -110,36 +110,36 @@ locations:
110110
translations:
111111
- long: Version
112112
short: template.version
113-
- long: Template Name
113+
- long: "Template Name"
114114
short: template.name
115-
- long: Study identifier
115+
- long: "Study identifier"
116116
short: studyID
117-
- long: Experiment identifier
117+
- long: "Experiment identifier"
118118
short: exptID
119-
- long: Plate identifier
119+
- long: "Plate identifier"
120120
short: plateID
121-
- long: Run identifier
121+
- long: "Run identifier"
122122
short: runID
123-
- long: Instrument identifier
123+
- long: "Instrument identifier"
124124
short: instrID
125-
- long: Experimenter name
125+
- long: "Experimenter name"
126126
short: experimenter
127-
- long: Date of experiment
127+
- long: "Date of experiment"
128128
short: date
129-
- long: Laboratory identifier
129+
- long: "Laboratory identifier"
130130
short: labID
131-
- long: Temperature (°C)
131+
- long: "Temperature (°C)"
132132
short: temp
133-
- long: Item 1
133+
- long: "Item 1"
134134
short: itm1ID
135-
- long: Molar mass 1
135+
- long: "Molar mass 1"
136136
short: itm1Mw
137-
- long: Run identifier 1
137+
- long: "Run identifier 1"
138138
short: run1ID
139-
- long: Item 2
139+
- long: "Item 2"
140140
short: itm2ID
141-
- long: Molar mass 2
141+
- long: "Molar mass 2"
142142
short: itm2Mw
143-
- long: Run identifier 2
143+
- long: "Run identifier 2"
144144
short: run2ID
145-
cue.verified: sha256:872121d48d04cb6d17c29f3ffff7af432fa619f641757a423e2bb0dc64deab00
145+
cue.verified: "sha256:b25ae0677ab5d34dacddcb20dc7d0d61b6e119c106ffb040fee4a9e4e89d1b69"

0 commit comments

Comments
 (0)