<commit_before>$schema: "http://json-schema.org/draft-04/schema#"

id: "analysis"
title: Analysis
type: object
category: TBD
program: '*'
project: '*'
description: >
  Summary of analyses performed on file.
additionalProperties: false
validators: null

systemProperties:
  - id
  - project_id
  - state
  - created_datetime
  - updated_datetime

links:
  - exclusive: true # needs to point to either a submitted or generated file
    required: true
    subgroup:
      - name: submitted_files
        backref: analyses
        label: performed_on
        target_type: submitted_file
        multiplicity: one_to_one
        required: false
      - name: generated_files
        backref: analyses
        label: performed_on
        target_type: generated_file
        multiplicity: one_to_one
        required: false

required:
  - submitter_id
  - analysis_type
  - analysis_workflow
  - state

uniqueKeys:
  - [ id ]
  - [ project_id, submitter_id ]

properties:
  type:
    enum: [ "analysis" ]
  id:
    description: "TODO"
    $ref: "_definitions.yaml#/UUID"
    systemAlias: node_id
  submitter_id:
    description: "TOREVIEW: the file id assigned by the submitter"
    type: string
  analysis_type:
    description: "Analysis performed on file."
    type: string
  analysis_workflow:
    description: "Link to github location and hash for the cwl used."
    type: string
  state:
    $ref: "_definitions.yaml#/state"
  submitted_files:
    $ref: "_definitions.yaml#/to_one"
  generated_files:
    $ref: "_definitions.yaml#/to_one"
  created_datetime:
    $ref: "_definitions.yaml#/datetime"
  updated_datetime:
    $ref: "_definitions.yaml#/datetime"
<commit_msg>feat(analysis): changed link multiplicities<commit_after>$schema: "http://json-schema.org/draft-04/schema#"

id: "analysis"
title: Analysis
type: object
category: TBD
program: '*'
project: '*'
description: >
  Summary of analyses performed on file.
additionalProperties: false
validators: null

systemProperties:
  - id
  - project_id
  - state
  - created_datetime
  - updated_datetime

links:
  - exclusive: true # needs to point to either a submitted or generated file
    required: true
    subgroup:
      - name: submitted_files
        backref: analyses
        label: performed_on
        target_type: submitted_file
        multiplicity: one_to_many
        required: false
      - name: generated_files
        backref: analyses
        label: performed_on
        target_type: generated_file
        multiplicity: one_to_many
        required: false

required:
  - submitter_id
  - analysis_type
  - analysis_workflow
  - state

uniqueKeys:
  - [ id ]
  - [ project_id, submitter_id ]

properties:
  type:
    enum: [ "analysis" ]
  id:
    description: "TODO"
    $ref: "_definitions.yaml#/UUID"
    systemAlias: node_id
  submitter_id:
    description: "TOREVIEW: the file id assigned by the submitter"
    type: string
  analysis_type:
    description: "Analysis performed on file."
    type: string
  analysis_workflow:
    description: "Link to github location and hash for the cwl used."
    type: string
  state:
    $ref: "_definitions.yaml#/state"
  submitted_files:
    $ref: "_definitions.yaml#/to_one"
  generated_files:
    $ref: "_definitions.yaml#/to_one"
  created_datetime:
    $ref: "_definitions.yaml#/datetime"
  updated_datetime:
    $ref: "_definitions.yaml#/datetime"

{'fraction_non_alphanumeric': 0.09045077105575326, 'fraction_numerical': 0.0011862396204033216, 'mean_word_length': 3.0934466019417477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4022713', 'n_tokens_mistral': 1061, 'n_tokens_neox': 1045, 'n_words': 279}