This is the stub project for the 2023 State Farm Coding Competition Round 1 in Python. This will be the same project you'll use once Round 1 begins.
Once Round 1 begins, we'll add the problem statement and the actual JSON files and unit tests you'll be using.
- Python - version 3.8 or higher
- pip - Python package installer (usually comes with Python)
- pytest - version 6.0 or higher (for unit testing)
You can download the latest version of Python from the official website:
After ensuring pip
is installed, you can install pytest:
pip install -r requirements.txt
For setting up Git and VSCode, please see the overall README.md.
When you open this folder in VSCode, you should see a dialog box open in the bottom-right hand corner of your screen. We've added several extensions that should help you spend less time on your environment, syntax, and manual work and more time on working on the problem statement.
You can view this file in .vscode/extensions.json
.
To test this project:
pytest
or
python -m pytest
In VSCode, you can also run the unit tests by clicking on the play button beside each test when you open the test file. If you have the Python extension installed in VSCode, it will automatically detect pytest and give you the option to run and debug tests directly from the editor.
For more details on testing with pytest, refer to the official documentation: Getting Started with pytest.
Note: Use this functionality for quick and easy testing, but, before you turn your submission in, please attempt to run the pytest
command at least once to determine how many unit tests have been passed.
To install additional packages, follow this guide. You can also search around the Internet for more guidance.