Developer Guide
Robert Bouillon (Slack/e-mail) is the technical lead for this project, managing the architecture and technical development.
Donna Fiorenza is the project lead, managing the priority and scope of ongoing development.
Development efforts are coordinated via bi-weekly zoom meetings. Please contact Greg Wong if you would like to participate. The regular meetings include stakeholders from various parts of the organization.
Development Environment
Requirements
Setting up the local environment
Install GIT for Windows
Install Visual Studio 2019 with .NET Desktop development roles.
In Visual Studio, create a new project from GitHub using
https://github.com/usspeedskating/tempus.git
In Visual Studio, import the
Assets\Development\Tempus.vssettings
configuration from withing the repo. This will reconfigure your window layout, including two terminal windows which will be used frequently during development.Add a new Terminal to the Developer Terminal window a. Click the Settings button (the gear) in the terminal window b. Click the Add button to add a new terminal c. Change the Name field to “Project PowerShell” d. Change the Arguments field to
-NoExit -Command "& { Import-Module $env:VSAPPIDDIR\..\Tools\Microsoft.VisualStudio.DevShell.dll}; if (Test-Path .\utils.ps1) { . .\utils.ps1 }; Enter-VsDevShell -SkipAutomaticLocation -SetDefaultWindowTitle -InstallPath $env:VSAPPIDDIR\..\..\
. e. Click the Apply button. f. Click the Set as Default button.Restart Visual Studio and open the Tempus Project
Click in the terminal window, type
pull
, and press enter to pull all the submodules.
Running the Application
Web Interface
Open the project in Visual Studio
Ensure that the build configuration is set to Debug
Type
watch
in the Developer Powershell window and press enter to run the application locally and begin debugging.A browser window will open with the application
Local Client
Open the project in Visual Studio
Ensure that the build configuration is set to Debug
Type
watch
in the Developer Powershell window and press enter to run the application locally.Right-Click the TempusChromely project and select Set as Startup Project
Press F5 to begin debugging.
In DEBUG, the local client will point to the development webserver - localhost:5001. In RELEASE, the local client will point to the local cache in the
bin\tempus
folder.
Contributing
To contribute, follow the GitHub instructions for pull requests.
All pull requests should be associated with an issue in the tempus-public repository. All pull requests will undergo code review by the admins prior to being integrated.
Coding Guidelines
Please follow the existing coding patterns. Some notable specifics:
All indents (tabs) must be set to two spaces.
Do not submit changes that only reformat code unless it’s associated with an approved work-item
C#
ISerializable implementation MUST be explicit unless they are overriding a member of a derived class that implements ISerializable
Serialization members should be wrapped in a region entitled “Serialization”
USS.Tempus.IO SHOULD only be referenced by a relative
IO
, when possible. AVOID adding USS.Tempus.IO as ausing
and AVOID absolutely prefixing classes from that namespace. PREFER to addusing USS.Tempus;
with relative references to classes inIO
.
Debugging
The best way to debug an issue in the competition logic is to create a unit test in the associated class and run the Test Harness. This is because the WASM debugger is still incomplete, buggy, and slow. To get the best debugging experience, you want to run the code in a full .NET environment.
A common approach is to create a test file in Excel (or reuse one) and import it from the Assets\Test Cases
directory as part of the unit test.
There’s currently not automation framework for debugging UI issues, and the WASM debugger is your only option.
Deploying
For most changes, you only need to deploy Tempus and the Documentation. The installer only needs to be deployed if it was updated.
Deploying a new version of Tempus
Run the automated tests
test-tempus
Bump the version using
bump-version
Build the version using
build-tempus
Publish the version using
deploy-tempus
Test the latest version in the virtual machine
Rollback Deployment
To roll back a deployment, set the latest version to the previous known good version using set-version N.N
.
Deploying the documentation
Publish the documentation using
deploy-docs
Deploying the Installer
Build the version using
build-installer
Publish the version using
deploy-installer
Testing the Deployment
Open up the Virtual Machine for testing.
Install & Run the application from https://tempus.usspeedskating.org/
Ensure the version number is correct
Revert changes to the virtual machine