Skip to content

Commit

Permalink
moredevcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Babb committed Nov 15, 2024
1 parent 3a167a1 commit a86e9b6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
27 changes: 24 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,29 @@
"runServices": ["roundware-db"],
"shutdownAction": "stopCompose",
"containerEnv": {
"DJANGO_SETTINGS_MODULE": "roundware.settings.testing"
"DJANGO_SETTINGS_MODULE": "roundware.settings.testing",
"MANAGE_PY_PATH": "/code/roundware/manage.py"
},
"workspaceFolder": "/code",
"postCreateCommand": ["./.devcontainer/postCreate.sh"]
}
"postCreateCommand": ["./.devcontainer/postCreate.sh"],
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.debugpy",
"Pachwenko.django-test-runner"
],
"settings": {
"python.terminal.activateEnvInCurrentTerminal": true,
"python.defaultInterpreterPath": "/pythonenv/roundware-venv/bin/python",
"python.experiments.optInto": ["pythonTestAdapter"],
"python.testing.unittestArgs": [
"test",
"--noinput"
],
"python.djangoTestRunner.manageProgram": "python3 -m roundware.manage test",
// "python.djangoTestRunner.rootPackageName": "roundware"
}
}
}
}
2 changes: 2 additions & 0 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ apt-get install -y git
apt-get clean
rm -rf /var/lib/apt/lists/*

pip install -e .[dev,test]

# migrate the database
python -m roundware.manage migrate

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ static
local_settings.py
.coverage
.idea/*

roundware.egg-info/**/*
.DS_Store
4 changes: 2 additions & 2 deletions roundware/rw/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

from roundware.rw.admin import *
from roundware.rw.models import Project, Asset, Session, UIGroup
from roundware.settings import DEFAULT_SESSION_ID
from roundware.rw.tests.common import FakeRequest, RWTestCase

from guardian.shortcuts import assign_perm
from model_bakery import baker

from rw.tests.common import FakeRequest, RWTestCase

TEST_POLYGONS = {
"crazy_shape": "MULTIPOLYGON(((-0.774183051414968 -0.120296667618684,-0.697181433024807 0.197879831012361,-0.52645517133469 0.200040922932489,-0.444333678369823 -0.0571290155627506,-0.468105689491232 -0.245144012613892,-0.774183051414968 -0.120296667618684)),((-1.25042096457759 0.204363106772745,-1.01702303720376 0.504754883670546,-0.599932296619044 0.625776031197718,-0.152586269152534 0.448566493747217,0.0354287278986072 0.00122046628070716,-0.109364430749973 -0.30349349445735,-0.340601266203676 -0.487186307668236,-0.811719304791594 -0.487186307668236,-1.0969834382485 -0.331587689419015,-1.25042096457759 0.204363106772745),(-0.774183051414968 -0.120296667618684,-0.811719304791594 -0.275399299495685,-0.504844252133409 -0.374809527821576,-0.314668163162139 -0.327265505578759,-0.239029945957657 -0.0506457398023664,-0.362212185404957 0.325384254299917,-0.796591661350698 0.35563954118171,-0.880874246235692 0.122241613807879,-0.958673555360303 -0.0917064862847996,-0.889518613916205 -0.0247126367608296,-0.796591661350698 -0.111156313565952,-0.774183051414968 -0.120296667618684)))",
Expand Down

0 comments on commit a86e9b6

Please sign in to comment.