<commit_before>Understanding Configuration Files
##############################################################################

There is a lot of content within the CS Unplugged project.
We split this content across many files and configuration files are the things
that bring everything together.
Understanding how to read and write these configuration files is important
for working on this project, because these files are used for configuring the
content data when stored in the system database.

This page aims to give a brief tutorial on YAML files, so you can modify
configuration files within this project.

Here is an example YAML file:

.. code-block:: yaml

  learning-outcomes: learning-outcomes.yaml
  programming-exercises-structure: programming-exercises-structure.yaml

  topic-structure-files:
    - binary-numbers/structure.yaml
    - error-detection-and-correction/structure.yaml

YAML files are mostly made up of key/value pairs, often called a dictionary
within programming languages.
This configuration file contains the follow three key/value pairs:

- The key ``learning-outcomes`` points to the file
  ``learning-outcomes.yaml``
- The key ``programming-exercises-structure`` points to the file
  ``programming-exercises-structure.yaml``
- The key ``topic-structure-files`` points to the ordered list of files
  ``binary-numbers/structure.yaml`` and
  ``error-detection-and-correction/structure.yaml``

The majority of configuration files within this project only use dictionaries
and lists to store their data.
Here are some other useful tips:

.. code-block:: yaml

  # You can include comments in YAML by starting with a # character
<commit_msg>Provide clearer purpose of configuration files<commit_after>Understanding Configuration Files
##############################################################################

There is a lot of content within the CS Unplugged project.
We split this content across many files and configuration files are the things
that bring everything together.
These files are used for configuring the content data when stored in the
system database, so it's important to understand how to read and write these
configuration files for working on this project.

Here is an example configuration file used to define follow up activities
in the CS Unplugged project:

.. code-block:: yaml

  binary-number-bracelets:
    number: 1
    md-file: bracelets.md
    curriculum-links:
      - arts
      - design

  hidden-binary-signals:
    number: 2
    md-file: hidden-binary-signals.md
    curriculum-links:
      - science

This page aims to give a brief tutorial on YAML files, so you can modify
configuration files within this project.

YAML files are mostly made up of key/value pairs, often called a dictionary
within programming languages.
This configuration file contains the follow three key/value pairs:

- The key ``learning-outcomes`` points to the file
  ``learning-outcomes.yaml``
- The key ``programming-exercises-structure`` points to the file
  ``programming-exercises-structure.yaml``
- The key ``topic-structure-files`` points to the ordered list of files
  ``binary-numbers/structure.yaml`` and
  ``error-detection-and-correction/structure.yaml``

The majority of configuration files within this project only use dictionaries
and lists to store their data.
Here are some other useful tips:

.. code-block:: yaml

  # You can include comments in YAML by starting with a # character

{'fraction_non_alphanumeric': 0.10399768250289687, 'fraction_numerical': 0.0005793742757821553, 'mean_word_length': 4.480952380952381, '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': '5523743', 'n_tokens_mistral': 861, 'n_tokens_neox': 823, 'n_words': 401}