Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
fb83203
move deployment scripts to infra
adaurat Jul 19, 2024
016a2d0
v2 wip
adaurat Aug 25, 2024
a619b98
add raw public data
adaurat Aug 26, 2024
bd207c9
update gh deploy action
adaurat Aug 26, 2024
6721106
update infra
Aug 26, 2024
0e3834b
merge with main
adaurat Aug 26, 2024
1036652
Merge pull request #1 from KWB-R/antoine
adaurat Aug 26, 2024
1db00c6
change deploy cmd
adaurat Aug 26, 2024
9dec42b
Merge branch 'antoine' of https://github.com/KWB-R/qmra-webapp
adaurat Aug 26, 2024
2e1f586
fix deploy cmd wd
adaurat Aug 26, 2024
85a335b
add -d
adaurat Aug 26, 2024
5a6c76d
SPA v0
adaurat Oct 4, 2024
2f7844c
add migrations
adaurat Oct 4, 2024
0ab6b11
update requirements
adaurat Oct 4, 2024
d6af86f
more dependencies cleanup
adaurat Oct 4, 2024
b66d02c
move management commands to docker-compose and basic prometheus setup
adaurat Oct 4, 2024
ab4d2c7
fix startup command and inflows-plot bugs
adaurat Oct 4, 2024
c3963a7
add localhost to allowed hosts
adaurat Oct 4, 2024
35bc974
add infra sketches
Oct 6, 2024
fa89d51
wip
Oct 8, 2024
1294896
working k8 on dev
Oct 9, 2024
6e7a262
cleanup infra/
Oct 9, 2024
0156909
more cleanup
Oct 9, 2024
26aadaf
cleanup bootstrapping script
Oct 9, 2024
7ef5b1b
Merge pull request #2 from KWB-R/feature/k8
adaurat Oct 9, 2024
704f240
try other outputs in build step
Oct 9, 2024
0a32ae2
Merge pull request #3 from KWB-R/feature/k8
adaurat Oct 9, 2024
b48f457
ci work
Oct 9, 2024
35653fc
use ssh gh actions
Oct 9, 2024
cba3c82
use ssh gh actions
Oct 9, 2024
2db8f23
ci work
Oct 9, 2024
1e91083
ci work
Oct 9, 2024
c0756b0
ci work
Oct 9, 2024
b532104
other output type...
Oct 9, 2024
f488315
other output type...
Oct 9, 2024
008fc2c
other output type... and save
Oct 9, 2024
6917475
with load
Oct 9, 2024
355427f
revert sources choices
adaurat Oct 10, 2024
c563dd4
add regression test, ci test step, minor layout fixes
adaurat Oct 10, 2024
a66598e
add requirements.test
adaurat Oct 10, 2024
a8ac27e
add requirements.test
adaurat Oct 10, 2024
0ee65fc
fix ref to sha
adaurat Oct 10, 2024
ef7ae83
add monitoring_domain and cleanup deployment
Oct 10, 2024
6782f59
extend tests
adaurat Oct 11, 2024
2f3d3d3
add structlog
adaurat Oct 11, 2024
a6f1d86
configure logging
adaurat Oct 11, 2024
98b9cb3
fix /health logging
adaurat Oct 11, 2024
0b4e787
presentation version
adaurat Oct 22, 2024
b917126
smaller retention for prometheus
Oct 22, 2024
6905ace
Merge pull request #4 from KWB-R/experimental/plotly-js
adaurat Oct 22, 2024
ed6fd99
dont dockerignore static/data
adaurat Oct 22, 2024
be15eae
dont ignore static/...
adaurat Oct 22, 2024
5ab9fc9
add instructions in README
adaurat Oct 22, 2024
0d11d7d
styling improvements and minor fixes
Oct 29, 2024
7258157
calculator layout
Oct 29, 2024
adeda26
fix layout of result modal
adaurat Dec 1, 2024
9bb6f52
add references tab & add suffix to existing assessment name
adaurat Dec 2, 2024
ab1d26d
add user guide and improve zip export
adaurat Dec 4, 2024
35d8cb3
add trial mode of the calculator and misc improvements
adaurat Dec 10, 2024
0baefdf
update tour text, add welcome text and update refs links
adaurat Dec 19, 2024
f8a07f6
add cmd to purge k8 images [skip ci]
adaurat Dec 19, 2024
507529e
fix treatment references and welcome markup
adaurat Dec 19, 2024
2331741
fix z-index of close.png
adaurat Dec 19, 2024
7e8810e
add tooltip to assessment-summary buttons
adaurat Dec 20, 2024
4fad553
minor fixes and wip user exposures, sources & treatments
adaurat Feb 12, 2025
5f90b22
add faqs, update gdpr, add home tour, new layout index, add partial r…
adaurat Feb 24, 2025
b12fb3d
fix tests, remove treatments
adaurat Feb 25, 2025
4e15c9b
update tests
adaurat Feb 25, 2025
14d7026
revert user.id migration and fix QA -> FAQS
adaurat Feb 25, 2025
c8ad75b
add assessment name and descr in export, add LRV tresholds for irriga…
adaurat Feb 26, 2025
c608f29
improve colors and axes in plots
adaurat Feb 26, 2025
61936a2
improve plot styles
adaurat Feb 27, 2025
62f6a86
add impressum, extend FAQs, fix inconsistent trace colors
adaurat Feb 27, 2025
10636ce
last minor fixes before go live
adaurat Feb 28, 2025
d4fed88
add prod deployment
adaurat Feb 28, 2025
124e119
fix typos in ci.yaml
adaurat Feb 28, 2025
374781e
inherit secrets in reusable workflows
adaurat Feb 28, 2025
038b490
fix file not found for helm values
adaurat Feb 28, 2025
cbcdefe
update imprint
adaurat Apr 29, 2025
190dc31
fixes from user testing feedbacks
adaurat Jul 23, 2025
3c119d0
fix typo in configmap.yaml
adaurat Jul 23, 2025
93538de
quote debug values
adaurat Jul 23, 2025
cd65459
other attempt
adaurat Jul 23, 2025
2bbf71d
trigger cicd
adaurat Jul 24, 2025
5cc54fb
redeclare env.sha_short in deploy.yaml
adaurat Jul 24, 2025
8514652
echo sha_short...
adaurat Jul 24, 2025
a9ce0d4
try to pass sha_short differently
adaurat Jul 24, 2025
37a9b2b
try other formatting
adaurat Jul 24, 2025
bf8c081
echo sha_short
adaurat Jul 24, 2025
4a97cc4
add checkout action
adaurat Jul 24, 2025
a75652a
re-add deploy command
adaurat Jul 24, 2025
1134ee4
pass tag without quotes
adaurat Jul 25, 2025
69e1fe0
simplify passing sha_short
adaurat Jul 25, 2025
03bb021
add QMRA models for the admin page
adaurat Sep 17, 2025
e9b6d51
fix tests
adaurat Sep 17, 2025
58361b1
checkout the branch being deployed in the server
adaurat Sep 17, 2025
28dbede
fix wrong branche name
adaurat Sep 17, 2025
8c5136d
fix mustaches in deployment.yaml
adaurat Sep 17, 2025
cb4855c
fix pv & pvc value for qmra-default
adaurat Sep 17, 2025
bc1fc06
other attempt
adaurat Sep 17, 2025
de6e628
and another
adaurat Sep 17, 2025
8ca944a
fix path to default qmra db
adaurat Sep 17, 2025
d862be6
cleanup code
adaurat Sep 19, 2025
6045c5b
test git commit
Nov 4, 2025
0cfcd2b
add change notice modal
adaurat Dec 4, 2025
3117421
Merge pull request #6 from KWB-R/feature/admin-page
adaurat Dec 4, 2025
4549b38
update GDPR, remove steps in number inputs, add warning when LRV > 6
adaurat Dec 17, 2025
8e67a56
fix wrongful warning display and buggy treatment summaries
adaurat Dec 17, 2025
38eac10
update dsg
adaurat Jan 14, 2026
389dad8
add m2m field for QMRAReference in QMRATreatment
adaurat Jan 15, 2026
4757c00
update static data from prod and fix tests
adaurat Jan 21, 2026
00b4452
run migrate_references only on the qmra db
adaurat Jan 21, 2026
76ee051
fix migrate_reference
adaurat Jan 21, 2026
278cf18
display multiple treatment references in configurator
adaurat Jan 21, 2026
9ff86af
export_default after migrate_reference
adaurat Jan 21, 2026
9ebe05f
update default treatments.json to contain multiple references and mov…
adaurat Jan 22, 2026
55c2a7f
fix mustaches...
adaurat Jan 22, 2026
3916820
Merge pull request #9 from KWB-R/feature/many-to-many-references
adaurat Jan 22, 2026
f135f27
remove one2one fields to References in QMRATreatment
adaurat Jan 22, 2026
c170ece
Merge pull request #10 from KWB-R/feature/many-to-many-references
adaurat Jan 22, 2026
a35175c
fix uninitialised *_tmp fields in QMRATreatment
adaurat Feb 4, 2026
5132912
export default after the model AND its related have been saved
adaurat Feb 4, 2026
19fdab1
Merge branch 'main' of https://github.com/KWB-R/qmra-webapp into qmra…
yaniv-kwb Feb 13, 2026
01c739f
support csv upload , calclulate negative binomial
yaniv-kwb Feb 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# example
39 changes: 39 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Build & Push Docker Image

on:
workflow_call:
inputs:
environment:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Declare image's tag
shell: bash
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Build
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: qmra:${{ env.sha_short }}
load: true
- name: Save
run: docker save qmra > img.tar
- name: Push
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_SERVER_SSH_KEY }}
source: "img.tar"
target: ${{ secrets.DEPLOY_PATH }}
47 changes: 47 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: CICD Pipeline

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
name: test app
uses: ./.github/workflows/test.yaml
build-dev:
needs: test
name: build-dev
uses: ./.github/workflows/build.yaml
with:
environment: dev
secrets: inherit
deploy-dev:
needs: build-dev
name: deploy-dev
uses: ./.github/workflows/deploy.yaml
with:
environment: dev
secrets: inherit
build-prod:
if: github.ref_name == 'main'
needs: test
name: build-prod
uses: ./.github/workflows/build.yaml
with:
environment: prod
secrets: inherit
deploy-prod:
if: github.ref_name == 'main'
needs:
- build-prod
- deploy-dev
name: deploy-prod
uses: ./.github/workflows/deploy.yaml
with:
environment: prod
secrets: inherit
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Deploy Django Application

on:
workflow_call:
inputs:
environment:
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Declare image's tag
shell: bash
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Deploy
uses: appleboy/ssh-action@v1.1.0
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_SERVER_SSH_KEY }}
script: |
cd ${{ secrets.DEPLOY_PATH }} && git pull && git checkout ${{ github.head_ref || github.ref_name }}
microk8s ctr image import img.tar && rm img.tar
cd infra/helm
microk8s helm upgrade --install -f ./qmra/${{ inputs.environment }}.values.yaml qmra ./qmra -n qmra --set app_secret_key.value=${{ secrets.APP_SECRET_KEY }},image.tag=${{ env.sha_short }}
35 changes: 0 additions & 35 deletions .github/workflows/deploy.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Test Django Application

on:
workflow_call:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r requirements.txt && pip install -r requirements.test.txt
- name: Test
run: python manage.py test
138 changes: 10 additions & 128 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,131 +1,13 @@
# Byte-compiled / optimized / DLL files
.DS_Store
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints
email_service.ipynb

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
.idea
.static
qmra.db
notebooks
default_qmra_data.db
qmra-prod.db
dump*
prod-migrations/
*.tar
.vscode
test.zip
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# pull official base image
FROM python:3.12.5-slim

# set work directory
WORKDIR qmra

# set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

RUN apt-get update -y && apt upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/*
# install dependencies
COPY ./requirements.txt .
RUN pip install --upgrade pip &&\
pip install --no-cache-dir -r requirements.txt &&\
pip install --no-cache-dir gunicorn

# copy project
COPY ./qmra ./qmra
COPY ./manage.py .
Loading