# Pre-Competition

## **App Initialization and Data Management**

1. **Directory Specification:** To commence App usage, provide a valid directory name to save and organize data.
   * **Example**: C:\Desktop\Trial.
   * You only need to copy the main directory. The App automatically reads the content of the directory.
2. **Pre-Competition Setup:**
   * The pre-competition phase generates a CSV file named "GroupData.csv."
   * This file, initially empty, requires User input to include the necessary information.

<figure><img src="/files/jX6l8Vm8VINEwpGFF7VW" alt=""><figcaption></figcaption></figure>

## **GroupData.csv - Example Template**

1. An empty file named "GroupData.csv" is generated by the software, ready for User input. Below is an example template illustrating the required information.

<figure><img src="/files/vDddVRn1SeLnfiUBwlAM" alt=""><figcaption><p>Empty GroupData.csv</p></figcaption></figure>

2. Guidelines for User Input
   1. **Required Information:** Include the following information for each athlete: Name, Age, and Weight.
   2. **Weight Category:** Indicate the weight category as shown in the example&#x20;
      * (\[gender] \[weight category] \[kg])
   3. **Team Affiliation:** Optionally insert the team name; otherwise, it is recorded as N/A by the app.

<figure><img src="/files/iR5f0PEndZ8dpEfZ23cv" alt=""><figcaption><p>Filled GroupData.csv</p></figcaption></figure>

{% hint style="info" %}
Moves that are not necessary should be left blank.&#x20;

Do not delete the columns.
{% endhint %}

## Create GroupData - Complete

1. **GroupData File Filled:** After filling the "GroupData.csv" file, proceed to create "Group Data - Complete.csv".
2. **Settings File Check:**
   1. Check for the existence of the settings files.
   2. If not present, the App generates the files and prompts you to fill them.
3. **Settings File Location:** The settings files are created in the "Settings" folder under the names "AgeCategories.csv", and "WeightCategories.csv".
4. **Settings File Structure:**
   1. Required for designated age categories based on User's choices.
      1. Format: Age Category (Left) - Maximum Age (Right).
      2. For the last category, leave it empty, as the system recognizes N-1 as the maximum.
   2. Required for designated weight categories based on User's choices.
      1. Format: Gender (Left) - Required Category (Right).
      2. **This file is required for both the pre and post competition management.**
5. **Max Athletes per Group:**
   1. Users can select the maximum number of athletes per group through the UI under Athletes/Group.
   2. The default is set to 14.

<figure><img src="/files/n9KLXiXUs4yzVaATJtpv" alt=""><figcaption><p>Settings AgeCategories.csv</p></figcaption></figure>

<figure><img src="/files/bvwiUWrxV8C7Zmym56Om" alt=""><figcaption><p>Settings WeightCategories.csv</p></figcaption></figure>

{% hint style="info" %}
Ensure the creation of complete group data by following these steps, providing necessary settings for age categories and specifying the maximum number of athletes per group based on User preferences.
{% endhint %}

## Fill GroupData - Complete

Once all the preceding steps are completed, the system automatically generates the most **crucial** document, the "GroupData - Complete.csv". This file initiates and continually backs up the competition in real-time for safety.&#x20;

***Key columns in this document include:***

1. **Weight:** Filled during weigh-ins, initially generated as zero.
2. **Group:** Users can modify group assignments as needed, even after list generation.
3. **Session:** Users manually change this to A, B, C, D, E, etc., based on the number of sessions they have.
4. **MaxSum:** The total registered by the User; not crucial at this point.
5. **MaxSumActual:** The actual sum of all attempts done. Calculated by the App.
6. **Status:**
   1. Initially set to N/A, changes to Active or DSQ based on the athletes progress when the competition starts automatically.
   2. If an athlete should be disqualified at the start, replace N/A with DSQ.
7. **Attempts:**
   1. **Max Attempt:** Should never be modified by the User.
   2. **1st Attempt:** Modify only the 1st attempt as it is the initial; insert the athlete's 1st attempt while all other attempts remain zero.
   3. **Rack**: If the move requires a rack, the value can be inserted.

<figure><img src="/files/2KNmGYlOj8cVvUp0ikH3" alt=""><figcaption><p>Example of the DataGroup - Complete.csv</p></figcaption></figure>

{% hint style="info" %}

1. It is crucial not to delete, change names, or modify columns, as this could disrupt the App's functionality.
2. Prior to beginning the competition, an athlete can be removed by simply deleting the row.&#x20;
3. The **IDRandom** should not be altered, as it is a crucial identification for the functioning of the App, and is assigned to each athlete.  For any reason there are duplicates due to error by manual modification by the user, the system automatically fixes the dubplicates when starting a compeititon.
   {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.prolifter.app/tutorial/competition-management/pre-competition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
