-
move most of default config to pkg fokus
-
implement target iterators handling
-
during qstnr assembly, ensure that
-
targets
doesn't include anything else if"none"
is present. -
values
is not empty in the end (the schema neither demandsvalues
norvalue_scale
). -
all
values
subkeys are of the same length (JSON Schema unfortunately doesn't provide any means to do such validation).qstnr::unnest_qstnr_vals()
ensures this implicitly and throws a moderately meaningful error in case of a violation à la:! In row 575, can't recycle input of size 2 to size 3.
-
if
values
andvalue_sets
are provided, the latter contains"values"
(we can't do that in the schema (yet) since thecontains
keyword was only added with draft 6). -
iterators
are sensible. the schema only demands an array of arrays -- technically anything could be in those level-2 arrays...
-
-
Taplo uses jsonschema-rs under the hood which (as of 2023-11) supports JSON Schema up to Draft 7, so we should be able to use more than just Draft 4 features... -> test this!
Furthermore, jsonschema-rs already partially supports the JSON Schema Drafts 2019-09 and 2020-12. Once tamasfe/taplo#498 is merged (or Taplo has switched to boon instead), we should be able to use (supported) features from these newer JSON Schema Drafts and consider porting our schemas to the latest draft iteration.
-
write documentation
- general questionnaire principles
- all vars that have translatable values must also have
values.int
defined (in order foras_int_vals
target filters to work)
- all vars that have translatable values must also have
- schema restrictions, rules etc.
- allowed characters for footnote
id
s are based on the MDN recommendations found in theid
attribute article (starting with numbers is allowed since the markdown processors usually prepend theid
s with a string likefn-
anyways) - allowed characters for link
id
s ("labels" in Pandoc terminology):@
is forbidden to prevent clashes with citation keys (which take parsing precedence) - iterators defined via the
i
array are referrable in inline R code by appending the iterator index (starting by1
as it is the convention for vectors in R), i.e. the first iterator isi1
, the secondi2
etc.
- allowed characters for footnote
- general questionnaire principles
-
submit schemas to JSON Schema Store? cf. https://taplo.tamasfe.dev/configuration/developing-schemas.html#publishing
-
publish stable release
- replace all occurrences of
https://qstnr.rpkg.dev/dev/
withhttps://qstnr.rpkg.dev/
in schemas (and elsewhere) -> change default toschema_url(dev = FALSE)
thanks to our HTTP redirects we can actually do this already! - submit to CRAN
- replace all occurrences of
-
further investigate shortcomings of taplo's schema validation
e.g. adding a forbidden survey config key
qstnr.introo
doesn't trigger a validation error in taplo (compare with this online validator which properly errors) -
implement fns to write TOML. requires an R package providing support for this since RcppTOML only offers read support. we could write an R package that offers taplo or toml crate bindings; relevant resources:
-
Have a look at the following R packages and check whether we should take inspiration from them:
-
integrate with suitable open-source survey "servers". candidates include:
-
- still sucks massively: PHP app based on LAMP stack; terrible community both in technical and organizational terms; awful dev experience due to basically unusable/undocumented APIs)
- to sum up: LimeSurvey has design flaws beyond repairability and is not intended to be used by programmers but only targets non-programmatic usage
-
- offers REST APIs incl. the management API's survey sub-API that i.a. offers an endpoint to create surveys; this might not be enough for our use case, though (create the whole survey (incl. routing and everything) from data submitted via API)
- development is very active and fast, but currently Formbricks still lacks a few mandatory features I think -> need to thoroughly investigate/test!
-
see this short overview for 3 more OSS projects (of which none matches what we want 😐)
-
Should we build some kind of formr integration? qstnr's functionality would probably be a perfect fit...
-
make
value_sets
part "directionless" by- always sorting the definitions ascendingly, allow new sentinel
desc:
invalue_sets
- implementing
desc:
interpretation - communicating new requirement/guarantee in doc
- validating new requirement in code!
- always sorting the definitions ascendingly, allow new sentinel
-
implement some kind of sentinel (like
free_text:
) to signify free text fields? (label would follow) -
should we introduce another item key
values_ptype
(or the like) to specify what we first wanted viavalues = "{ val_ptype(type = date, size = 1L) }"
(which the schema doesn't allow anymore)? or come up with a better/proper syntax for value validation, depending on ptype (to e.g. ensure a date lies in between a specific range), i.e. maybe directly use checkmate?