1+ <!-- omit in toc -->
12# dsd-pythonanywhere
23
34A plugin for deploying Django projects to [ PythonAnywhere] ( https://www.pythonanywhere.com/ ) , using django-simple-deploy.
@@ -8,6 +9,11 @@ For full documentation, see the documentation for [django-simple-deploy](https:/
89repository to PythonAnywhere, but it doesn't configure the web app just yet. Not
910yet recommended for actual deployments yet.
1011
12+ - [ Motivation] ( #motivation )
13+ - [ Quickstart] ( #quickstart )
14+ - [ Plugin Development] ( #plugin-development )
15+ - [ Automated Tests] ( #automated-tests )
16+
1117## Motivation
1218
1319This plugin hopes to provide a deployment option for ` django-simple-deploy ` that
@@ -32,7 +38,15 @@ requires a few prerequisites:
3238## Plugin Development
3339
3440To set up a development environment for working on this plugin alongside
35- ` django-simple-deploy ` , follow these steps.
41+ ` django-simple-deploy ` , follow these steps. This will create a directory
42+ structure that looks like this:
43+
44+ ``` sh
45+ dsd-dev/
46+ ├── django-simple-deploy # ← parent project needed to run integration tests
47+ ├── dsd-pythonanywhere # ← our plugin development directory
48+ └── dsd-dev-project_[random_string] # ← sample project for testing deployments
49+ ```
3650
37511 . Create a parent directory to hold your development work:
3852
5367``` sh
5468git clone
[email protected] :django-simple-deploy/django-simple-deploy.git
5569cd django-simple-deploy/
56- # Builds a copy of the sample project in parent dir for testing (../dsd-dev-project- [random_string]/)
70+ # Builds a copy of the sample project in parent dir for testing (../dsd-dev-project_ [random_string]/)
5771uv run python tests/e2e_tests/utils/build_dev_env.py
5872```
5973
60744 . Setup the development environment:
6175
6276``` sh
6377cd ../
64- cd dsd-dev-project- [random_string]/
78+ cd dsd-dev-project_ [random_string]/
6579source .venv/bin/activate
6680# Install dsd-pythonanywhere plugin in editable mode
6781pip install -e " ../dsd-pythonanywhere/[dev]"
@@ -135,3 +149,25 @@ in your sample project to point to the ngrok URL for `scripts/setup.sh`:
135149``` sh
136150export REMOTE_SETUP_SCRIPT_URL=" https://<your_ngrok_subdomain>.ngrok-free.app/scripts/setup.sh"
137151```
152+
153+ ### Automated Tests
154+
155+ To run the unit tests for this plugin, run:
156+
157+ ``` sh
158+ cd dsd-pythonanywhere/
159+ uv run pytest
160+ ```
161+
162+ To run the integration tests (and unit tests), which exercise the mechanics of
163+ ` python manage.py deploy ` locally without actually deploying to PythonAnywhere,
164+ run:
165+
166+ ``` sh
167+ cd django-simple-deploy/
168+ # Install dsd-pythonanywhere plugin in editable mode
169+ uv add --editable " ../dsd-pythonanywhere[dev]"
170+ uv run pytest
171+ # To skip platform_agnostic_tests for faster feedback during plugin development:
172+ uv run pytest --ignore=tests/integration_tests/platform_agnostic_tests
173+ ```
0 commit comments