<commit_before>.. _libCellMLUseCases:

=======================
Use-cases for libCellML
=======================

1. **Create:** Create a model from scratch and serialise it to XML (in each case the test is that the serialised model matches manually validated XML documents)

   i. an empty model
   #. a model with a valid name
   #. a model with an invalid name
   #. a model with a single component
    
      a. a component with a valid name
      #. a component with an invalid name
      
   #. a model with two or more components
   #. a model with three components and an encapsulation hierarchy

      a. one component encapsulating two children
      #. one component encapsulating a single child which in turn encapsulates a single child
      #. an invalid cyclical encapsulation hierarchy

   #. a model with imported components

      a. import the component from model *1.iv.a*
      #. import the component from model *1.iv.b*
      #. import a component from a non-existing URL

   #. a model with units<commit_msg>add initial draft of new use cases for the modification of an existing model and component hierarchy. Addressing issue #33<commit_after>.. _libCellMLUseCases:

=======================
Use-cases for libCellML
=======================

1. **Create:** Create a model from scratch and serialise it to XML (in each case the test is that the serialised model matches manually validated XML documents)

   i. an empty model
   #. a model with a valid name
   #. a model with an invalid name
   #. a model with a single component
    
      a. a component with a valid name
      #. a component with an invalid name
      
   #. a model with two or more components
   #. a model with three components and an encapsulation hierarchy

      a. one component encapsulating two children
      #. one component encapsulating a single child which in turn encapsulates a single child
      #. an invalid cyclical encapsulation hierarchy
      
   #. manipulation of a model with multi-level component encapsulation hierarchy
   
      a. remove a component
      #. change the name of a top-level component
      #. change the name of an encapsulated child component
      #. replace one component with a new component
      #. take a component
      #. determine if a component with a given name exists in a model or component
      #. determine the number of components encapsulated by a model or component
      #. determine the number of components with a given name that are encapsulated by a model or component

   #. a model with imported components

      a. import the component from model *1.iv.a*
      #. import the component from model *1.iv.b*
      #. import a component from a non-existing URL

   #. a model with units
{'fraction_non_alphanumeric': 0.07893779556202256, 'fraction_numerical': 0.0029101491451436886, 'mean_word_length': 2.8623595505617976, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7345086', 'n_tokens_mistral': 694, 'n_tokens_neox': 622, 'n_words': 370}