From 59f645d8c968723e5ca0824c06e4dabad4bf877c Mon Sep 17 00:00:00 2001 From: Anand Patel Date: Thu, 29 Feb 2024 01:29:25 +0000 Subject: [PATCH] Documentation updates for devcontainer based development. --- .vscode/launch.json | 1 + docs/contribute.md | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 44a2e0f05..e1c25328c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,7 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { "name": "Python Debugger: Django", "type": "debugpy", diff --git a/docs/contribute.md b/docs/contribute.md index 52ff187b7..ad1900734 100644 --- a/docs/contribute.md +++ b/docs/contribute.md @@ -22,6 +22,26 @@ If you want to contribute bug fixes or small tweaks then your pull requests are !!! info The dev setup is a little messy as this application combines the best (at least in my opinion) of both Django and Vue.js. +### Devcontainer Setup +There is a [devcontainer](https://containers.dev) set up to ease development. It is optimized for VSCode, but should be able to +be used by other editors as well. Once the container is running, you can do things like start a Django dev server, start a Vue.js +dev server, run python tests, etc. by either using the VSCode tasks below, or manually running commands described in the individual +technology sections below. + +#### VSCode Tasks +If you use dev containers with VSCode, there are a number of tasks that are available. Here are a few of the key ones: + +* `Setup Dev Server` - Runs all the prerequisite steps so that the dev server can be run inside VSCode. +* `Setup Tests` - Runs all prerequisites so tests can be run inside VSCode. + +Once these are run, you should be able to run/debug a django server in VSCode as well as run/debug tests directly through VSCode. +There are also a few other tasks specified in case you have specific development needs: + +* `Run Dev Server` - Runs a django development server not connected to VSCode. +* `Run all pytests` - Runs all the pytests outside of VSCode. +* `Yarn Serve` - Runs development Vue.js server not connected to VSCode. Useful if you want to make Vue changes and see them in realtime. +* `Serve Documentation` - Runs a documentation server. Useful if you want to see how changes to documentation show up. + ### Django This application is developed using the Django framework for Python. They have excellent [documentation](https://www.djangoproject.com/start/) on how to get started, so I will only give you the basics here.