Repository navigation
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.
scum_validation.py
- Make sure you have setup the test environment and ran the setup script. See section 2.1
- Ensure the observatory is powered on by plugging in the power plug
- Plug the USB from the observatory into your PC
- Open the config file
config.pylocated inCode/ValidationIf you do not see this file, you have not ran the setup script. See step 1
- Fill out the following sections of the config
- SCuM Serial Configuration
- SCuM Validation Configuration
- Analog Test Configuration
- Joulescope Configuration
- Run
scum_validation.pyEnsure that you run the script in the virtual environment (see section 2.2.3)
- The script will now go through and execute the tests layed out in the test structure. This can take a few minutes
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.
nightly_validation.py
- Make sure you have setup the test environment and ran the setup script. See section 2.1
- Ensure the observatory is powered on by plugging in the power plug
- Plug the USB from the observatory into your PC
- Open the config file
config.pylocated inCode/ValidationIf you do not see this file, you have not ran the setup script. See step 1
- Fill out the following sections of the config
- SCuM Serial Configuration
- Nightly Validation Configuration
- Analog Test Configuration
If
SEND_EMAIL_ON_COMPLETIONis enabled, you will need to setup an SMPT server or point to one. See section 6.2.1.1
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:
- Option 1: Use an existing Gmail account.
- Option 2: Create a new dedicated account for sending automated emails (recommended).
- Visit Google Account Security.
- Under Signing in to Google, click 2-Step Verification.
- Follow the instructions to enable 2-Step Verification.
- Visit Google App Passwords.
- Under Select app, choose Mail.
- Under Select device, choose Other (Custom name).
- Enter a descriptive name like
Python SMTPand click Generate. - Copy the generated app password (16 characters).
NOTE: You will not see this password again after closing this window, so save it somewhere.
If using Gmail, SMTP_SERVER and SMTP_PORT can be kept as is.
- Run
nightly_validation.pyEnsure that you run the script in the virtual environment (see section 2.2.3)
- The script will now wait until the time you specified in the config.
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.