Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release(v2.6.1): Dart 3, Offline Mode, and more... #433

Merged
merged 431 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
431 commits
Select commit Hold shift + click to select a range
8806aab
feat(#458): tbls documentation docker compose
jannis-baum Jun 23, 2023
c0d4470
feat(#458): db documentation workflow
jannis-baum Jun 23, 2023
c194bea
docs: update database documentation
Jun 23, 2023
76fda0b
feat(#458): path restriction for doc gen
jannis-baum Jun 23, 2023
f9478f4
feat(#458): ignore generated files in markdown lint
jannis-baum Jun 23, 2023
3768777
fix(deps): new temporary wakelock fix repo
johannesvedder Jun 22, 2023
9f62a24
fix(#460): restrict paths for fb hosting workflow
jannis-baum Jun 23, 2023
46e58cb
fix(#460): additional restrictions & whitelists based on review comment
jannis-baum Jun 23, 2023
5ae8579
feat(#464): auto-label prs
jannis-baum Jun 23, 2023
9e4cf76
feat(#464): auto assign pr author
jannis-baum Jun 23, 2023
321ba81
refactor(#455): github workflow
johannesvedder Jun 15, 2023
0438a74
feat(#455): wait on check action
johannesvedder Jun 23, 2023
6bf69b5
fix(deps): new temporary wakelock fix repo
johannesvedder Jun 22, 2023
b119c02
chore: temporarily ignore branches for app deploy and dry run pubdev
johannesvedder Jun 23, 2023
7dbab84
chore(release): publish packages
johannesvedder Jun 23, 2023
5804dc4
chore: pubspec lock
johannesvedder Jun 23, 2023
75d6076
Revert "chore: temporarily ignore branches for app deploy and dry run…
johannesvedder Jun 23, 2023
35c629a
fix: upgrade deps
johannesvedder Jun 23, 2023
414364c
fix(deps): new temporary wakelock fix repo
johannesvedder Jun 22, 2023
f0c0e78
Merge branch '455-chore-refactor-github-workflows' into release/2023-…
johannesvedder Jun 23, 2023
bf740f1
chore(release): publish packages
johannesvedder Jun 23, 2023
7206a00
fix: add await-workflow action to wait for pub.dev publishing
johannesvedder Jun 23, 2023
b87ab55
Merge branch 'dev' into issue/460-restrict-paths-for-fb-hosting-workflow
johannesvedder Jun 26, 2023
fb7f570
fix(#462): zone mismatch
johannesvedder Jun 23, 2023
5444a7c
Merge branch 'issue/458-automatic-database-documentation' into dev
johannesvedder Jun 26, 2023
5ab50db
Merge branch 'issue/464-auto-assign-prs' into dev
johannesvedder Jun 26, 2023
75e507c
chore(release): publish packages
johannesvedder Jun 26, 2023
42b03c9
chore: add docker to labeler.yml
johannesvedder Jul 1, 2023
a6e6a0d
feat: modify supabase compose files to use persistent storage
florian-papsdorf Jul 1, 2023
d71b394
chore: document and cleanup
johannesvedder Jul 1, 2023
65af172
chore(#468): update to recommended xcode settings
jannis-baum Jun 29, 2023
a638275
chore(#468): update cocoapods
jannis-baum Jun 29, 2023
1629003
fix: const constructor
jannis-baum Jun 29, 2023
f6567ab
fix(#468): correctly link entitlement file
jannis-baum Jun 29, 2023
5d84a1f
fix: change provisioning profile name
johannesvedder Jul 3, 2023
67ec156
fix: modify xcode version and ios target platform
johannesvedder Jul 3, 2023
7467f2b
chore: update Gemfiles
johannesvedder Jul 3, 2023
4de0e29
fix(#475): general docker improvements
johannesvedder Jul 4, 2023
225f823
chore(#475): update supabase selfhost
johannesvedder Jul 4, 2023
8fb58af
docs(#475): update database documentation
Jul 4, 2023
fce67b1
chore(#475): format
johannesvedder Jul 4, 2023
55bfa31
chore(#475): force supabase env values
johannesvedder Jul 5, 2023
177e505
fix: upgrade deps (switch to wakelock_plus)
johannesvedder Jul 3, 2023
38cdca5
chore(release): publish packages
johannesvedder Jul 4, 2023
f4191dd
chore: lockfiles
johannesvedder Jul 4, 2023
96d642a
chore: remove studyu root package again from melos.yaml
johannesvedder Jul 4, 2023
74fb501
chore: revise readme
johannesvedder Jun 14, 2023
348c425
chore: format
johannesvedder Jun 14, 2023
2b4ef13
chore: better description
johannesvedder Jun 30, 2023
f871e8e
chore: linting ignore database docs
johannesvedder Jun 30, 2023
408fac6
chore: add app store badges
johannesvedder Jul 3, 2023
69467aa
refactor: restructure markdown files
johannesvedder Jul 3, 2023
e78f053
chore: add studyu logo to README.md
johannesvedder Jul 3, 2023
8333803
chore: fix suggestions
johannesvedder Jul 5, 2023
f91cce3
feat(#432): dashboard search and filter
johannesvedder Jun 13, 2023
362a4fe
fix: remove Designer V2 version number from page title
johannesvedder Jun 22, 2023
01510b4
feat(#432): dashboard pin and unpin studies
johannesvedder Jun 22, 2023
0c3d225
refactor: rename .env.selfhost to .env.hpi
johannesvedder Jun 22, 2023
9f0e8ac
feat(#432): add pins to study table and refactor code
johannesvedder Jun 23, 2023
eda8ccf
refactor: fix dashboard pin null value
johannesvedder Jun 27, 2023
615d5b6
feat: initial study tags
johannesvedder Jun 27, 2023
2aa65e2
use custom multiselect
johannesvedder Jun 27, 2023
515785b
fix: update copyright
johannesvedder Jun 27, 2023
66ba324
style: typo
johannesvedder Jun 27, 2023
cf39195
fix: tag type
johannesvedder Jun 27, 2023
b96dcf8
feat: display and update tags correctly
johannesvedder Jun 27, 2023
d7cb5f3
refactor: make tags more reactive
johannesvedder Jun 29, 2023
ef7532a
fix: make color nullable and int, add tags to dashboard
johannesvedder Jun 29, 2023
c1bf13d
refactor: rename
johannesvedder Jun 30, 2023
8d4eaa9
feat: working tags with foreign key study_tag
johannesvedder Jun 30, 2023
db57e09
fix: study_tags was null for new studies
johannesvedder Jun 30, 2023
354313c
style: dashboard study rows pin and tags improvement
johannesvedder Jun 30, 2023
59882b7
fix: tag related sql
johannesvedder Jun 30, 2023
73c207f
docs: update database documentation
Jun 30, 2023
0cbb4a6
fix: user related policies
johannesvedder Jun 30, 2023
052f977
fix: add user policy
johannesvedder Jun 30, 2023
9baddd1
fix: tag color
johannesvedder Jun 30, 2023
5729a09
fix: non-working pin
johannesvedder Jun 30, 2023
0bd0b30
docs: update database documentation
Jun 30, 2023
18158bb
chore: format
johannesvedder Jun 30, 2023
95f3306
feat: refactor Search to widget and make tags clickable
johannesvedder Jul 1, 2023
d0a96ea
fix: make Repo urls optional
johannesvedder Jul 1, 2023
324e2ce
fix: study was not returned completely
johannesvedder Jul 1, 2023
53430fb
chore(release): publish packages
johannesvedder Jul 5, 2023
fde3500
chore: lock files
johannesvedder Jul 5, 2023
ae48447
chore(#453): remove legacy fhir app widgets
jannis-baum Jun 15, 2023
1c218cc
chore(#453): remove fhir dependencies & usage
jannis-baum Jun 15, 2023
548a674
chore(#453): adjust sql schema
jannis-baum Jun 15, 2023
a929784
docs: update database documentation
Jul 6, 2023
aed59f3
Merge pull request #454 from hpi-studyu/issue/453-remove-legacy-fhir-…
jannis-baum Jul 6, 2023
de2d9d2
Merge pull request #478 from hpi-studyu/release/2023-07-05
johannesvedder Jul 6, 2023
69bcb33
feat(#480): uml generator script
jannis-baum Jul 12, 2023
831d7d8
feat(#480): find uml dirty dirs
jannis-baum Jul 12, 2023
f8f2e0c
feat(#480): regenerate only umls of dirty dirs
jannis-baum Jul 12, 2023
8bb90c1
refactor(#480): improve change discovery
jannis-baum Jul 12, 2023
ccd1f22
fix(#480): path traversal
jannis-baum Jul 12, 2023
9f571c4
docs(#480): add docs/README
jannis-baum Jul 13, 2023
7136f56
fix: consistent yml without a
jannis-baum Jul 13, 2023
c00c4fd
fix: don't run db-docs on dev
jannis-baum Jul 13, 2023
822b503
feat(#480): add workflow
jannis-baum Jul 13, 2023
ccbe4f2
docs: update UML documentation
Jul 13, 2023
d5bd539
chore: remove designer readme because it has no relevant content
jannis-baum Jul 13, 2023
0775c07
change(#480): run uml workflow only on .dart files
jannis-baum Jul 13, 2023
265f767
fix(#483): fixes study visibility rules
johannesvedder Jul 17, 2023
2d5076a
Merge branch 'dev' into issue/2-432-feature-designer-dashboard-improv…
johannesvedder Jul 17, 2023
e586369
chore: lock files
johannesvedder Jul 12, 2023
b4a987e
refactor: cleanup
johannesvedder Jul 14, 2023
611541f
fix(#482): docker networks
johannesvedder Jul 17, 2023
f2f8eca
feat: make study tags reactive
johannesvedder Jul 17, 2023
5df6619
remove tag color and parent from schema
johannesvedder Jul 17, 2023
e6579c8
refactor: pin changes to user_repository.dart
johannesvedder Jul 17, 2023
d820e77
chore: format
johannesvedder Jul 17, 2023
17ef604
Merge pull request #481 from hpi-studyu/issue/480-automatic-uml-diagrams
jannis-baum Jul 17, 2023
6376ee2
fix(#486): prevent docs commit race condition
jannis-baum Jul 22, 2023
56f153d
Merge pull request #485 from hpi-studyu/issue/483-bug-study-registry-…
johannesvedder Jul 26, 2023
3bb5bd1
Merge pull request #487 from hpi-studyu/issue/486-fix-uml-docs-concur…
jannis-baum Jul 26, 2023
39d4a80
feat(#482): add postgresql schema export script
johannesvedder Jul 15, 2023
3989141
feat(#482): dump current schema
johannesvedder Jul 15, 2023
16df2ed
feat(#482): add supabase test framework
johannesvedder Jul 15, 2023
659efc7
fix(#482): docker networks
johannesvedder Jul 17, 2023
3b4a8b1
feat(#482): add more tests
johannesvedder Jul 17, 2023
e8e3fbd
docs: update database documentation
Jul 26, 2023
6a5c606
feat(#482): gh action
johannesvedder Jul 26, 2023
aa9dccb
feat(#482): update supabase image versions and add env subst for kong…
johannesvedder Jul 27, 2023
e66c8b3
Merge branch 'issue/482-supabase-test-framework' into issue/432-featu…
johannesvedder Jul 27, 2023
a47d7fc
feat(#432): partially reactive tags with validation
johannesvedder Jul 27, 2023
3da4423
feat(#482): add k6 load test example
johannesvedder Jul 27, 2023
1b57070
docs: update database documentation
Jul 27, 2023
c59debb
fix(#432): Move tags to different branch
johannesvedder Jul 30, 2023
052517f
docs: update database documentation
Jul 30, 2023
aa2cb25
fix: upgrade deps
johannesvedder Jul 30, 2023
67d5888
fix: make analytics fully optional
johannesvedder Jul 30, 2023
50adaf7
chore: lock files
johannesvedder Jul 30, 2023
ec4d029
feat: add analytics migration script
johannesvedder Jul 30, 2023
c7ac697
chore: ignore const constructors for average_section_widget.dart
johannesvedder Jul 30, 2023
12b01c3
docs: update UML documentation
Jul 30, 2023
47a2445
chore: Remove legacy designer from project
johannesvedder Jul 30, 2023
1245304
chore: Remove notebook_uploader from project
johannesvedder Jul 30, 2023
46eefbd
chore: Remove repo_generator from project
johannesvedder Jul 30, 2023
47cd038
fix(#497): Designer resizing issue
johannesvedder Jul 30, 2023
a82fc6d
chore: update footer text
johannesvedder Jul 30, 2023
6c407b7
Merge pull request #498 from hpi-studyu/issue/497-bug-designer-breaks…
johannesvedder Aug 1, 2023
85b8e54
chore: k6 additions
johannesvedder Aug 1, 2023
3b8bf71
Merge pull request #484 from hpi-studyu/issue/482-supabase-test-frame…
johannesvedder Aug 1, 2023
dae7d46
refactor: rename .env.selfhost to .env.hpi
johannesvedder Jun 22, 2023
f60ff64
refactor(#489): rename staging to dev, add hosting for hpi
johannesvedder Jul 27, 2023
07f8f3f
refactor(#489): fix docker envs
johannesvedder Jul 28, 2023
02aeba7
fix: switch dev tasks to .env.local
johannesvedder Aug 1, 2023
3f3c427
Merge pull request #490 from hpi-studyu/issue/489-refactor-environments
johannesvedder Aug 1, 2023
f2876e3
feat(#491): add studyu cli
johannesvedder Jul 29, 2023
17facc7
fix: requested changes
johannesvedder Aug 1, 2023
50e286f
fix: bash version check
johannesvedder Aug 1, 2023
15bedfa
feat: studyu-cli take config env variable
johannesvedder Aug 1, 2023
ba17bf4
fix: rename to studyu-cli
johannesvedder Aug 1, 2023
a5c115e
chore(#491): make cli executable
jannis-baum Aug 8, 2023
c5757ce
Merge branch 'dev' into issue/432-feature-designer-dashboard-improvem…
johannesvedder Aug 8, 2023
db3a074
fix supabase tests
johannesvedder Aug 8, 2023
ac6738f
fix(#491): compose paths
johannesvedder Aug 8, 2023
62d2060
feat(#491): check if docker daemon is running
johannesvedder Aug 8, 2023
42fc211
feat(#491): add container status check
johannesvedder Aug 8, 2023
9d0cd94
fix(#491): remove kitty-dev
johannesvedder Aug 8, 2023
3f9f4a9
Merge pull request #492 from hpi-studyu/issue/491-feat-studyu-selfhos…
johannesvedder Aug 8, 2023
4be269e
Merge branch 'dev' into issue/432-feature-designer-dashboard-improvem…
johannesvedder Aug 8, 2023
76865d5
refactor: move migrate-user_preferences.sql
johannesvedder Aug 8, 2023
6a6fce9
fix(#432): remove search shadow and set correct color
johannesvedder Aug 15, 2023
691415c
refactor(#432): remove default case
johannesvedder Aug 15, 2023
cf811b0
refactor(#432): remove comment
johannesvedder Aug 15, 2023
152e66d
fix(#432): fallback to id sorting if predicates provide equal result
johannesvedder Aug 15, 2023
595a717
refactor: format
johannesvedder Aug 15, 2023
35f74ea
docs: update UML documentation
Aug 16, 2023
c57401b
Merge pull request #457 from hpi-studyu/issue/432-feature-designer-da…
johannesvedder Aug 16, 2023
9ff4ff7
Merge branch 'dev' into release/2023-07-31
johannesvedder Aug 16, 2023
50d0290
chore: upgrade deps
johannesvedder Aug 16, 2023
3405c2c
chore(release): publish packages
johannesvedder Aug 16, 2023
3cb2d05
chore: lock files
johannesvedder Aug 16, 2023
6c577f6
chore: remove deprecated packages from pubdev publish
johannesvedder Aug 16, 2023
92bec53
fix: bump minimum required sdk version to 33 and set target to flutte…
johannesvedder Aug 21, 2023
4d11ab4
chore: add newline
johannesvedder Aug 22, 2023
5c9e8bd
Merge pull request #495 from hpi-studyu/release/2023-07-31
johannesvedder Aug 22, 2023
f73258f
chore: upgrade podfile
jannis-baum Aug 18, 2023
7d61658
fix: chart import
jannis-baum Aug 18, 2023
d546c4b
chore: remove old color code
jannis-baum Aug 18, 2023
8031b88
feat: legend widgets
jannis-baum Aug 18, 2023
7062d4f
refactor: pass diagram data
jannis-baum Aug 21, 2023
8525cc7
feat: get intervention names
jannis-baum Aug 21, 2023
5142f0e
refactor: remove unnecessary passing of instance variable
jannis-baum Aug 21, 2023
4a5984e
feat: chart legend
jannis-baum Aug 21, 2023
0450f92
feat: add question title
jannis-baum Aug 21, 2023
5b6921a
feat: phase separator lines
jannis-baum Aug 21, 2023
a3ff420
refactor: remove code duplication
jannis-baum Aug 21, 2023
3b642f5
feat: enable tooltips
jannis-baum Aug 21, 2023
0dab026
feat: display phase number as integer
jannis-baum Aug 21, 2023
31afe9f
chore: remove comments that are no longer needed
jannis-baum Aug 21, 2023
a05c780
refactor: bar generator
jannis-baum Aug 21, 2023
474f922
feat: dynamic bar width
jannis-baum Aug 21, 2023
d26572f
chore: adjust comments
jannis-baum Aug 21, 2023
19c2b84
chore: format code
jannis-baum Aug 21, 2023
e2c9914
feat: bold title
jannis-baum Aug 21, 2023
0d5694d
feat: add 20% y-padding
jannis-baum Aug 21, 2023
aeac14a
refactor: hardcoded baseline id
jannis-baum Aug 21, 2023
5b3577a
fix: day offset when baseline is excluded
jannis-baum Aug 21, 2023
74a6552
change: reduce y padding to 10% & ceil
jannis-baum Aug 21, 2023
fbc97ae
docs: update UML documentation
Aug 18, 2023
231915a
fix: reports for studies without baseline
jannis-baum Aug 22, 2023
f38479f
Merge pull request #501 from hpi-studyu/fix/app/average-section
jannis-baum Aug 22, 2023
79b411c
fix: regenerate ids when duplicating a study
jannis-baum Aug 22, 2023
f7de742
docs: update UML documentation
Aug 22, 2023
92d5e23
chore: remove legacy designer melos scripts
jannis-baum Aug 22, 2023
c9fe2e3
Merge pull request #502 from hpi-studyu/fix/designer/duplicated-ids
jannis-baum Aug 22, 2023
c15f4da
Merge pull request #504 from hpi-studyu/chore/remove-legacy-designer-…
jannis-baum Aug 22, 2023
0a990bf
chore: cocoa pod updates
jannis-baum Aug 22, 2023
7d48f79
Merge pull request #503 from hpi-studyu/chore/app/pod-upgrade
jannis-baum Aug 22, 2023
cdecedc
chore: remove hpi deployment
johannesvedder Aug 22, 2023
f916a01
Merge pull request #506 from hpi-studyu/fix/remove-hpi-deployment
johannesvedder Aug 23, 2023
54d6f7c
chore: rename master to main
johannesvedder Aug 25, 2023
f1c797a
chore: remove outdated notebook-uploader gh action
johannesvedder Aug 25, 2023
a07aeab
chore: remove hpi env (addition)
johannesvedder Aug 25, 2023
e1c211b
chore: documentation
johannesvedder Aug 25, 2023
e490db0
chore: remove hpi env addition 2
johannesvedder Aug 25, 2023
99daed1
fix: report button visible for read-only studies
johannesvedder Aug 25, 2023
787f2ba
feat: localization additions
johannesvedder Aug 25, 2023
6676672
chore: format
johannesvedder Aug 25, 2023
d833d39
docs: fix broken supabase api link
johannesvedder Sep 26, 2023
cae3c0b
Update README.md
johannesvedder Sep 26, 2023
c11b366
Update README.md
johannesvedder Sep 26, 2023
c928cf9
fix: revert minSdkVersion to 19
johannesvedder Sep 13, 2023
f14f3d1
chore: lock files
johannesvedder Sep 13, 2023
1721374
fix: upgrade deps
johannesvedder Sep 19, 2023
7cdc7c5
fix: upgrade deps
johannesvedder Sep 27, 2023
51e8cff
chore(release): publish packages
johannesvedder Sep 27, 2023
613e14a
fix: rename custom MustMatchValidator
johannesvedder Sep 27, 2023
35c3687
chore: lock files
johannesvedder Sep 27, 2023
1cf79bc
chore: format and style
johannesvedder Sep 27, 2023
e633b43
chore(release): publish packages
johannesvedder Sep 27, 2023
083f74a
docs: fix md
johannesvedder Sep 27, 2023
ed45f6f
fix: update cocoapod
johannesvedder Sep 28, 2023
192b8f5
chore: refactor migrate code
johannesvedder Oct 11, 2023
7f1a181
feat: switch to hpi env
johannesvedder Oct 11, 2023
6fa0e8b
fix: upgrade deps
johannesvedder Oct 11, 2023
2d7767b
chore(release): publish packages
johannesvedder Oct 11, 2023
956170d
chore: lock files
johannesvedder Oct 11, 2023
e37e9f8
feat: update and rework docker setup
johannesvedder Oct 13, 2023
da7e8f8
fix: remove .htaccess and prefix nginx files
johannesvedder Oct 13, 2023
5beedb9
docs: refactor docker documentation
johannesvedder Oct 13, 2023
379c53c
Merge pull request #512 from hpi-studyu/feat/update-docker-setup
johannesvedder Oct 13, 2023
5ab7b0d
fix: bugfix docker setup
johannesvedder Oct 13, 2023
c8b0ee7
feat: add and modify supabase helper scripts for export and dump
johannesvedder Oct 17, 2023
7c72bb5
feat: cleanup supabase scripts
johannesvedder Oct 18, 2023
2786fd0
fix: rename scripts and add x permissions
johannesvedder Oct 18, 2023
e08692f
Merge branch 'main' into dev
johannesvedder Oct 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ LICENSE
*.md
*.iml
.supabase
supabase/

# Flutter specific
**/.dart_tool
Expand All @@ -17,4 +16,4 @@ supabase/
**/.analysis-options
**/.flutter-plugins
**/.flutter-plugins-dependencies
**/.packages
**/.packages
16 changes: 14 additions & 2 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"projects": {
"default": "studyu-e37af"
"default": "studyu-e37af",
"dev": "studyu-dev"
},
"targets": {
"studyu-e37af": {
Expand All @@ -12,6 +13,17 @@
"studyu-designer-v2"
]
}
},
"studyu-dev": {
"hosting": {
"app": [
"studyu-dev-app"
],
"designer-v2": [
"studyu-dev-designer"
]
}
}
}
},
"etags": {}
}
35 changes: 0 additions & 35 deletions .github/dependabot.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/docker/db-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3'
name: 'studyu'

services:
autodocs:
image: ghcr.io/k1low/tbls
depends_on:
db:
condition: service_healthy
command:
- doc
- --force
- postgres://postgres:${POSTGRES_PASSWORD}@supabase-db:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable
- output
working_dir: /work
volumes:
- ${DB_DOCS_DEST}:/work/output
16 changes: 16 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'core':
- 'core/**/*'
'designer_v2':
- 'designer_v2/**/*'
'app':
- 'app/**/*'
'flutter_common':
- 'flutter_common/**/*'
'dependencies':
- '**/pubspec.yaml'
- '**/pubspec.lock'
'documentation':
- 'docs/**/*'
- '**/*.md'
'docker':
- 'docker/**/*'
69 changes: 69 additions & 0 deletions .github/scripts/generate-uml.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/bash

# repo root at ../.. from this file's directory
root=$(realpath $(dirname $(realpath $0))/../..)

docs_dir="$root/docs/uml"

# find directories whose umls need updates -------------------------------------
# regenerating all umls every time is too slow

# find latest commit that updated uml diagrams (or use initial commit)
prev_update="$(git log -n 1 --pretty=format:%H -- "$docs_dir")"
[[ -z "$prev_update" ]] && prev_update="$(git rev-list --max-parents=0 HEAD)"

# associative array, keys will be all directories whose uml has to be
# regenerated
declare -A dirty
# get all directories that have changed since prev_update
for changed in $(git diff --name-only $prev_update \
| grep --extended-regexp '(flutter_common|core|designer_v2|app)/lib/.*\.dart' \
| xargs dirname \
| sort --unique \
); do
# set changed dir as dirty for all parents until we reach lib
while [[ -n $(grep --extended-regexp '[^/]*/lib' <<< "$changed") ]]; do
dirty[$changed]=1
changed="$(dirname "$changed")"
done
done

# generate needed umls ---------------------------------------------------------

# temporary file for uml data
tmpf=$(mktemp)

# iterate keys of dirty
for d in "${!dirty[@]}"; do
out="$docs_dir/$d/uml.svg"
# remove old uml if it exists
rm -rf "$out"
# skip to next if directory doesn't exist (i.e. git diff showed it because
# it was deleted
test -d "$root/$d" || continue

echo "Generating diagram for $d"

# ensure destination dir extists
mkdir -p $(dirname "$out")

# go to package dir, i.e. first path component
cd "$root/$(cut -d/ -f1 <<< "$d")"
# uml generator gets confused with generated files so we have to remove
# them
find . -type f -name '*.g.dart' -exec rm {} \;

# generate uml & svg
dart pub global run dcdg \
--exclude=State --exclude=StatefulWidget --exclude=StatelessWidget \
-b nomnoml \
-s "$(cut -d/ -f2- <<< "$d")" \
> $tmpf
npx --yes nomnoml "$tmpf" "$out"

# get deleted generated files back from git
git checkout HEAD -- .
done

# remove temporary file
rm "$tmpf"
11 changes: 7 additions & 4 deletions .github/workflows/all_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: All packages
on:
push:
branches:
- master
- main
- dev
paths:
- "app/**"
Expand All @@ -30,7 +30,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install melos
Expand All @@ -45,7 +46,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install melos
Expand All @@ -60,7 +62,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install melos
Expand Down
62 changes: 0 additions & 62 deletions .github/workflows/build-docker-generator.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/build-docker-notebook-uploader.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/db-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Generate database docs

on:
push:
branches:
- '**'
- '!dev'
- '!main'
paths:
- 'database/**'
- 'docker/supabase/**'

concurrency:
group: ${{ github.ref }}-db-docs
cancel-in-progress: true


jobs:
generate-docs:
runs-on: ubuntu-latest

steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Generate documentation
env:
POSTGRES_PORT: 5432
POSTGRES_PASSWORD: your-super-secret-and-long-postgres-password
POSTGRES_DB: postgres
DB_DOCS_DEST: ${{ github.workspace }}/docs/database
run: |
docker compose -f docker/supabase/docker-compose-db.yml -f .github/docker/db-docs.yml up --abort-on-container-exit

- name: Commit documentation
run: |
git config --global user.name "StudyU Documenter"
git config --global user.email "studyu-documenter"
git add --all
git commit -m 'docs: update database documentation' || true
git push
27 changes: 0 additions & 27 deletions .github/workflows/dependencies.yml

This file was deleted.

Loading