Skip to content

6.0 Utilizing the Observatory

HailStorm32 edited this page May 6, 2025 · 5 revisions

6.0 Utilizing the Observatory

This section walks through running the two provided tests. For a more in-depth explanation of the tests and what they do, see section 5.0.

For details on setting up the observatory, see section 2.0.

The tests mentioned below are located in Code/Validation.

6.1 Validation Test

scum_validation.py

6.1.1 Setup

  1. Make sure you have setup the test environment and ran the setup script. See section 2.1
  2. Ensure the observatory is powered on by plugging in the power plug
  3. Plug the USB from the observatory into your PC
  4. Open the config file config.py located in Code/Validation

    If you do not see this file, you have not ran the setup script. See step 1

  5. Fill out the following sections of the config
    • SCuM Serial Configuration
    • SCuM Validation Configuration
    • Analog Test Configuration
    • Joulescope Configuration

6.1.2 Running

  1. Run scum_validation.py

    Ensure that you run the script in the virtual environment (see section 2.2.3)

  2. The script will now go through and execute the tests layed out in the test structure. This can take a few minutes

6.1.3 Result Analyzing

Once the test is complete, an HTML report will be generated in Code/ResultBackups/SCuM-Validation, named as SCuM-Validation_Results.html. Open the .html file in your web browser of choice to view the results.


6.2 Nightly Validation

nightly_validation.py

6.2.1 Setup

  1. Make sure you have setup the test environment and ran the setup script. See section 2.1
  2. Ensure the observatory is powered on by plugging in the power plug
  3. Plug the USB from the observatory into your PC
  4. Open the config file config.py located in Code/Validation

    If you do not see this file, you have not ran the setup script. See step 1

  5. Fill out the following sections of the config
    • SCuM Serial Configuration
    • Nightly Validation Configuration
    • Analog Test Configuration

If SEND_EMAIL_ON_COMPLETION is enabled, you will need to setup an SMPT server or point to one. See section 6.2.1.1

6.2.1.1 SMTP Setup

If you don't already have an SMTP server setup, the easiest option, as of the writing of this wiki, is to create a Gmail account and enable SMTP access.

The following steps are for using a Gmail account:

1. Prepare Your Gmail Account
  • Option 1: Use an existing Gmail account.
  • Option 2: Create a new dedicated account for sending automated emails (recommended).
2. Enable Two-Step Verification
  1. Visit Google Account Security.
  2. Under Signing in to Google, click 2-Step Verification.
  3. Follow the instructions to enable 2-Step Verification.
3. Generate an App Password
  1. Visit Google App Passwords.
  2. Under Select app, choose Mail.
  3. Under Select device, choose Other (Custom name).
  4. Enter a descriptive name like Python SMTP and click Generate.
  5. Copy the generated app password (16 characters).

NOTE: You will not see this password again after closing this window, so save it somewhere.

4. Fill out the respective SMTP fields in the config.

If using Gmail, SMTP_SERVER and SMTP_PORT can be kept as is.

6.2.2 Running

  1. Run nightly_validation.py

    Ensure that you run the script in the virtual environment (see section 2.2.3)

  2. The script will now wait until the time you specified in the config.

6.2.3 Result Analyzing

Every cycle, if there were changes and tests were ran, an HTML report will be generated in Code/ResultBackups/Nightly-Validation under the name Nightly-Validation_Results.html. Open the .html file in your browser of choice to view the results.

If you enabled the sending of results via email, the generated HTML report as well that same report converted to a .PDF will be sent to the addresses specified in the config.