Coder Social home page Coder Social logo

dh_testing's People

Contributors

pkalita-lbl avatar turbomam avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dh_testing's Issues

DH slot attribute handling

Any class can be a DH template, even without is_a: dh_interface statements (or the definition of the dh_interface parent class), but that requires manually adding a block like this into menu.js, if one wants to access the interface for a class through the menu system.

  "dh_testing": {
    "test_class": {
      "name": "test_class",
      "status": "published",
      "display": true
    }
  }

One could also use a URL in the style http://localhost:8080/?template=dh_testing/test_class

Don't forget to generate at least a minimal export.js with export default {};

Currently, all slots for a class will be displayed. Maybe we should use abstract or deprecated to suppress slots?

Slot attribute handling

Help can be accessed by double-clicking the column header in a stand-alone DH.
Invalid cells are colored light pink and illegally empty cells are colored darker pink. Could we choose other colors?
Column and section ordering is by appearance in the schema unless otherwise specified.
Columns are placed into a Generic section unless otherwise specified.

  • abstract: doesn't prevent slot from appearing as a column, but maybe it should
  • aliases: doen't effect validation or appear in help
  • any_of: allows validation on different types, especially combinations of enumerations
  • comments appear in the help, on separate lines, with some vertical whitespace in-between.
  • deprecated: doesn't prevent slot from appearing as a column, but maybe it should
  • description appears in the help
  • examples: example values are displayed in the help as a bulleted list
  • identifier requires that the values in the column are unique. "Each record must have a unique value for this field." is reported in the help. (Shouldn't it also set the column to required?) This flag doesn't require prefixed IDs or use of approved prefixes on its own. It would be nice to have an additional unique identifier for other slots in the same class.
  • in_subset: Doen't effect validation or sectioning. Doesn't appear in help.
  • is_a propagates constraints but not annotations from the parent. Asserts section membership. See preferred Slot_sectioning
  • maximum_value is honored for integers and provides help in the following style, when combined with minimum_value: "Value should be between 2 and 9 (inclusive)."
  • minimum_value is honored for integers and floats and provides help in the following style, when combined with maximum_value: "Value should be between 2 and 9 (inclusive)." When used on its own, the help reads like "Value should be greater than or equal to 4." When used with a float, the validation and the help are truncated down to the next lowest integer!?
  • mixin doesn't seem to have any effect. Slot is validated and help is reported as if it weren't a mixin.
  • mixins: Propagates constraints but not annotations from the parent. Does not assert section membership. See preferred Slot_sectioning
  • multivalued: Converts a slot with range some enum into a multi-select instead of a pulldown. Doesn't appear to have any effect on slots with a string range. If a JSON object saver/exporter is implemented, this (an an appropriately defined delimiter) should result in the cell contents being serialized as a list.
  • name appears in the help. It would be nice to export the data keyed by name, and not title. That is possible in export mode, given the correct export.js.)
  • notes Do not appear in the help. (That's reasonable.)
  • pattern: is honored and appears in help like "Pattern as regular expression: /^[aeiou]+$/", when the actual pattern assertion in LinkML was pattern: "^[aeiou]+$"
  • range: boolean is honored, but not reported in the help. The acceptable values are 0 and 1. Add support for true, True, yes, etc.
  • range: date is honored. A date picker widget is provided, so dates with less than day precision are not supported. Did Damion have some workaround for that? Possibly requiring an additional column?
  • range: datetime: seems to accept any entry
  • range: float is honored, but not reported in the help.
  • range: integer is honored, but not reported in the help.
  • range: time: I haven't found any acceptable format. Tried 10:10:10, 10-10-10, T10:10:10.
  • rank: sets the order of slots/columns within a section, including the implicit "Generic" section. rank is also used to set the order of the sections. TODO.
  • recommended is not enforced in any way, but the column header is set to purple. (Could we choose other colors?)
  • required is honored, and the column header is set to yellow. (Could we choose other colors?)
  • see_also: doen't effect validation or appear in help
  • slot_group doesn't propagate constraints or annotations from the parent. Asserts membership in an ugly section like ['test_parent'], unless the grouping slot is_a: dh_section. See preferred Slot_sectioning
  • slot_uri: doesn't appear to have any effect
  • title appears as the column header, and in the help.
  • todos Do not appear in the help. (That's reasonable.)
  • structured_pattern and settings: requires expansion with gen-linkml?

Slot_sectioning

Generic comes first?

  dh_section:
    name: dh_section
    description: A section (ie group if columns) within a DataHarmonizer interface

  Sample ID:
    name: Sample ID
    rank: 1
    is_a: dh_section

  sample_id_1:
    slot_group: Sample ID
    rank: 1

  sample_id_2:
    slot_group: Sample ID
    rank: 2

What attributes should DH check?

Each row of a DH interface represents an instance of a class from some schema. Each column represents a slot from that class.

When checking a value in a DH interface cell, which slot_definition attributes can we or should we validate?

Start using modularized DH here and now?

@pkalita-lbl I created this repo to do some experimentation related to

I just want to create some LinkML files and convert them to DH pages that I can open on my laptop, either by double clicking an .html file, or by using some lightweight server on my laptop (maybe soemthing integrated into PyCharm?)

Would this be a good time for me to start using your modular refactor of DataHarmonizer?

Not that there's any real rush on my end.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.