Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3090 commits
Select commit Hold shift + click to select a range
027d2f0
first version of sdoc block memos
bigabig Oct 24, 2024
453a7a1
project logbook is always editable
bigabig Oct 24, 2024
e465099
fixed frong initialization for content_json
bigabig Oct 24, 2024
33b7cfb
create memo directly
bigabig Oct 24, 2024
29ce3a2
fixed tests
bigabig Oct 24, 2024
a261649
Merge pull request #454 from uhh-lt/block-note-editor
bigabig Oct 24, 2024
6ecf129
Release v1.0.7
bigabig Oct 24, 2024
2635825
Release v1.0.7
bigabig Oct 24, 2024
2883455
updated dats_api & importer to conform with new api endpoints
bigabig Oct 28, 2024
017e984
fixed bug with filter reset
bigabig Oct 28, 2024
ad98cf4
first idea to fix filter column reset
bigabig Oct 29, 2024
b93ba9a
improved filter reset
bigabig Oct 29, 2024
e996344
add small comments
bigabig Oct 29, 2024
8ed22d9
fixed typo
bigabig Oct 29, 2024
45752f1
fixed some extraReducers not working correctly
bigabig Oct 29, 2024
48992c4
reworked memo create: only one endpoint for all cases
bigabig Oct 30, 2024
819e1a9
fixed crud tests
bigabig Oct 30, 2024
5cd086a
removed unused memo endpoint
bigabig Oct 30, 2024
1e2cbdc
fixed typo in endpoint
bigabig Oct 30, 2024
ede867b
fixed test stories
bigabig Oct 30, 2024
287c55e
updated api, now only one memo create endpoint
bigabig Oct 30, 2024
1ed0e37
updated memo components: new block editor for all memos, use new Memo…
bigabig Oct 30, 2024
886ffff
reorganized memo components
bigabig Oct 30, 2024
d9f1c61
finalzed Annotation Memos
bigabig Oct 30, 2024
466a6fd
Merge pull request #457 from uhh-lt/block-note-for-all-memos
bigabig Oct 30, 2024
84dcfe2
implemented global voices v2 spider (crawler tool)
floschne Oct 31, 2024
2320e0b
added missing deps for crawler env
floschne Oct 31, 2024
c3f9e9c
updated crawler settings to include image download pipelines again
floschne Oct 31, 2024
2919f5e
changed default storage path for GV V2 Crawler
floschne Oct 31, 2024
51b2e20
added missing tqdm dep for crawler env
floschne Oct 31, 2024
65d8bef
changed default log level for scrapy
floschne Oct 31, 2024
a568bdc
improved log message
floschne Oct 31, 2024
9e17e76
global voices v2 crawler spider
floschne Oct 31, 2024
f9a4b4f
Improve ci (#458)
bigabig Nov 5, 2024
adcf43f
Update ray models (#460)
bigabig Nov 6, 2024
e9c8558
fixed ""
bigabig Nov 7, 2024
efb350a
improved timeline analysis with dynamic joins / selects
bigabig Nov 7, 2024
55fc94b
first working version (for sdoc search)
bigabig Nov 10, 2024
4a98ed5
first working version for search & span search
bigabig Nov 11, 2024
eeedae7
memo & bbox search
bigabig Nov 11, 2024
3df604d
timeline analysis search
bigabig Nov 11, 2024
f27bba4
move db services to db folder
bigabig Nov 11, 2024
b1303bc
move FilterValue type definition
bigabig Nov 11, 2024
a540d23
move the search system to search
bigabig Nov 11, 2024
1981cd7
updated api implementing similarity search endpoint changes
bigabig Nov 11, 2024
6ad7e26
renamed search columns
bigabig Nov 11, 2024
e2b4d68
implemented search column rename change
bigabig Nov 11, 2024
3a8d0e0
wordfrequency analysis search
bigabig Nov 11, 2024
25b8ea5
fixed search column name
bigabig Nov 11, 2024
4712931
Merge pull request #462 from uhh-lt/improve-search
bigabig Nov 11, 2024
af9bf18
updated release script
bigabig Nov 11, 2024
666a606
Release v1.1.0
bigabig Nov 11, 2024
d06866e
update deploy.sh script to set JWT_SECRET
bigabig Nov 11, 2024
cccf0c4
update release action to execute jobs sequentially
bigabig Nov 12, 2024
bcc95ab
reset selectedRows when search params / filter change
bigabig Nov 12, 2024
5348ff2
fixed small bug in tag menu when adding new tag
bigabig Nov 12, 2024
d93ca16
stop creating actions in bulk to improve performance
bigabig Nov 12, 2024
9922007
removed action
bigabig Nov 12, 2024
c734b28
added migration to delete actions
bigabig Nov 12, 2024
cdaccb0
removed actions & autologbook
bigabig Nov 12, 2024
905cc05
Merge pull request #464 from uhh-lt/yannick-feedback
bigabig Nov 12, 2024
7c60060
Merge pull request #465 from uhh-lt/remove-autologbook
bigabig Nov 12, 2024
dec52f7
Release v1.1.1
bigabig Nov 12, 2024
4edbbee
new compose override files to simplify configuration & have fewer exp…
bigabig Nov 13, 2024
12d4e6c
renamed docker-compose to compose
bigabig Nov 13, 2024
c1b6cac
no healthcheck for lighttpd
bigabig Nov 13, 2024
ac0e51b
expose backend api in production
bigabig Nov 14, 2024
2584438
added a script to make the initial development setup easier
bigabig Nov 14, 2024
61b88d2
Merge pull request #467 from uhh-lt/improve-configurations
bigabig Nov 14, 2024
cea4cc7
fixed slow migration
bigabig Nov 14, 2024
7767297
fixed issues with new compose setup
bigabig Nov 14, 2024
f306212
sim search refactoring (#466)
fynnos Nov 20, 2024
0211cbd
added new scripts to create & restore backups
bigabig Nov 14, 2024
bdf9a7d
updated deploy script to create backups first
bigabig Nov 14, 2024
9669dbd
added comments
bigabig Nov 14, 2024
167b528
renamed variable
bigabig Nov 14, 2024
f0f3613
set stability to UNSTABLE by default
bigabig Nov 14, 2024
5fa4693
added scripts to backup/restore weaviate db
bigabig Nov 20, 2024
18df348
add elasticsearch backup/restore scripts
bigabig Nov 20, 2024
09b0f73
fix small issues in new scripts
bigabig Nov 20, 2024
05bc936
updated deploy script
bigabig Nov 20, 2024
5328e21
update formatting
bigabig Nov 20, 2024
f5912d3
moved setup-folders.sh script
bigabig Nov 20, 2024
a47f12c
fixed typo
bigabig Nov 20, 2024
85b27d3
Merge pull request #468 from uhh-lt/backup-scripts
bigabig Nov 20, 2024
5102b4e
Pinned BLIP2 Revision
Alienmaster Nov 27, 2024
7147257
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 27, 2024
ea3b1f2
Merge pull request #475 from uhh-lt/blip2fix
bigabig Nov 27, 2024
393815d
fix weaviate backup
bigabig Nov 27, 2024
cd41750
updated weaviate backup script
bigabig Nov 27, 2024
700fa06
Release v1.1.2
bigabig Nov 27, 2024
4ea02e8
updated importer to add tags
bigabig Nov 28, 2024
ae4ede9
annotation scaling backend v1
fynnos Dec 2, 2024
b381562
Update OpenAPI spec and client
github-actions[bot] Dec 2, 2024
ad13478
annotation scaling frontend v1
fynnos Dec 4, 2024
841f340
rename anti-code to opposing-code
fynnos Dec 4, 2024
05d756e
added sentence annotations
bigabig Nov 24, 2024
f9c8e2b
updated api
bigabig Nov 24, 2024
b7e1725
first version of sentence annotator
bigabig Nov 24, 2024
f074f99
new icons
bigabig Nov 24, 2024
ce22eae
highlight annotations on code explorer hover
bigabig Nov 24, 2024
a5cda1d
highlight annotation during annotation meu
bigabig Nov 24, 2024
784900a
fast annotation with "mostRecentCode"
bigabig Nov 24, 2024
06bad90
fixed fast annotation issue
bigabig Nov 24, 2024
b0e5d4c
removed virtualization
bigabig Nov 24, 2024
214148e
fixed cursor
bigabig Nov 24, 2024
97b405e
add sentence annotation explorer placeholder
bigabig Nov 24, 2024
4466ba9
first version of sentence annotation comparison
bigabig Nov 25, 2024
4a4d113
changed endpoint to only accept a single user id
bigabig Nov 26, 2024
cff8e08
updated api
bigabig Nov 26, 2024
2d75633
working version of sentence comparison
bigabig Nov 26, 2024
b20947f
first version of zero-shot sentence annotation
bigabig Dec 4, 2024
29bce8a
updated api
bigabig Dec 4, 2024
1c8f92f
added SentenceAnnotation to LLM Dialog
bigabig Dec 4, 2024
afd0e9c
fixed hex/rgb color issue
bigabig Dec 4, 2024
edd56ce
fixed issue with keys
bigabig Dec 4, 2024
97bb1c6
add llm dialog button to annotator
bigabig Dec 4, 2024
5dcd89e
remove logging
bigabig Dec 4, 2024
1c09484
fix docker issue
bigabig Jan 13, 2025
f4aa612
fix linting issue
bigabig Jan 13, 2025
6bfe33c
fixed typo in cota
bigabig Jan 14, 2025
d519102
added endpoints for bulk create / delete
bigabig Jan 16, 2025
ea4e25a
added new checks to sss
bigabig Jan 16, 2025
e820692
added function to retrieve all sent embeddings by sdoc_id
bigabig Jan 16, 2025
1f66e35
new ray feature: seq sentence tagger training (first working version)
bigabig Jan 16, 2025
54abc13
new llm assistant feature: model training for sentence annotation
bigabig Jan 16, 2025
d466db1
updated api
bigabig Jan 16, 2025
f833f61
updated LLM Assistant for new feature: Train Sent Anno Model
bigabig Jan 16, 2025
04a25b6
added status descriptions to llm job
bigabig Jan 17, 2025
78ca6c2
updated status step to show new status messages
bigabig Jan 17, 2025
878962a
added missing result to ray sent anno
bigabig Jan 17, 2025
2a5e5fd
remove unnecessary log msg
bigabig Jan 17, 2025
5534ea1
updated Background Jobs View to correctly show LLM Jobs
bigabig Jan 17, 2025
e7b9740
use newer ollama container
bigabig Jan 17, 2025
316b2d1
updated ollama dependency
bigabig Jan 17, 2025
9f51860
updated llm service to use structured generation
bigabig Jan 17, 2025
0159db2
updated ollama_service to new api
bigabig Jan 17, 2025
443edf4
replace demo by system user
bigabig Jan 17, 2025
1a056da
added "finished" as final step
bigabig Jan 17, 2025
85214f1
delete existing sentence annotations before creating the suggestions
bigabig Jan 20, 2025
3cf6a3a
removed wrong nextStep call
bigabig Jan 20, 2025
654e81e
automatic reload of updated sentence annotations
bigabig Jan 20, 2025
9768e39
refactor: split code into multiple files
bigabig Jan 20, 2025
b553d9f
implemented SentenceAnnotationExplorer
bigabig Jan 20, 2025
50595c1
removed unused endpoint /annotation_occurrences
bigabig Jan 21, 2025
e01ead6
updated api
bigabig Jan 21, 2025
aa87a0f
refactored analysis service into new folder structure
bigabig Jan 21, 2025
712bfdc
updated code frequency view to support sentence annotations
bigabig Jan 21, 2025
e4fdf09
added sentence annotation search
bigabig Jan 21, 2025
e33a84d
updated api
bigabig Jan 21, 2025
8f4f64d
added SentenceAnnotationTable
bigabig Jan 21, 2025
8d622ac
added whiteboard support for sentence annotations
bigabig Jan 21, 2025
1eb6fb0
refactored span and bbox anno search to be more similar to new sent a…
bigabig Jan 21, 2025
9f07964
renaming according to refactor
bigabig Jan 21, 2025
b988312
fixed bug
bigabig Jan 21, 2025
204d496
refactored annotated segments -> span annotation analysis
bigabig Jan 22, 2025
b452c7d
added sentence annotation export
bigabig Jan 22, 2025
bb92a18
updated api
bigabig Jan 22, 2025
316afa4
created Sentence Annotation Analysis feature
bigabig Jan 22, 2025
5fe59e8
updated annotation searchs to return all users' annotations
bigabig Jan 22, 2025
55b64e5
updated api
bigabig Jan 22, 2025
d7a9982
implemented api change: no user id for searches
bigabig Jan 22, 2025
9a7e50b
fixed bug: all annotations were deleted
bigabig Jan 22, 2025
b92e488
virtualization for sentence annotator
bigabig Jan 22, 2025
eb99fad
virtualization for sentence annotation comparison
bigabig Jan 22, 2025
f4dd8d4
change logdir to temporary_files
bigabig Jan 23, 2025
0298b1c
added few shot prompt template generation
bigabig Jan 23, 2025
43e9aaf
fixed warning in pipeline step
bigabig Jan 23, 2025
5cfda59
updated api to support few shot prompt generation
bigabig Jan 23, 2025
0290dcc
disabled training parameter editor for now
bigabig Jan 23, 2025
f48749e
added ollama model customization
bigabig Jan 24, 2025
112d2bf
added ollama model customization
bigabig Jan 24, 2025
d820d96
customize ollama context size (this time correctly)
bigabig Jan 24, 2025
78f2360
added assistant users
bigabig Jan 24, 2025
ec6f31f
use assistant ids for llm assistance
bigabig Jan 24, 2025
a9c83b3
changed assistant user ids
bigabig Jan 24, 2025
1ba8113
fixed bug: missing @
bigabig Jan 24, 2025
e98bbc4
added log message
bigabig Jan 24, 2025
c463d80
updated api
bigabig Jan 24, 2025
bb7de7c
fixed type issue
bigabig Jan 24, 2025
2015f62
fixed tests
bigabig Jan 24, 2025
8168fa0
build backend, ray container in frontend workflow, if there are depen…
bigabig Jan 25, 2025
bf558aa
small fix
bigabig Jan 25, 2025
19f2574
fixed checks for pull requests
bigabig Jan 25, 2025
6f3292b
fixed typo
bigabig Jan 25, 2025
cbb60ff
add a requirements check also for push requests
bigabig Jan 25, 2025
5feeb92
Merge pull request #481 from uhh-lt/sentence-annotations
bigabig Jan 25, 2025
10a63d1
Release v1.2.0
bigabig Jan 25, 2025
3847821
change success messages slightly
bigabig Jan 25, 2025
bcca889
fixed ssh connection timeout
bigabig Jan 25, 2025
845648a
added status and status message to llm results
bigabig Jan 27, 2025
ae7396e
updated api
bigabig Jan 27, 2025
65c3192
fixed bug: missing project id
bigabig Jan 27, 2025
93aeca3
used new status and status message to build better background task view
bigabig Jan 27, 2025
05b83b6
compare with correct assistant user
bigabig Jan 27, 2025
eec177d
Release v1.2.1
bigabig Jan 27, 2025
0e5c878
export project metadata and user data when exporting project (full)
AhmadHAW Jun 25, 2024
660ec0a
implement import job for user codes.
AhmadHAW Jul 2, 2024
d80d3b9
starting to implement import tags
AhmadHAW Jul 15, 2024
6acb416
export project and certain sdocs now also exports the relevant metada…
AhmadHAW Jul 16, 2024
eea5e4c
make export metadata more user friendly and implement import tags
AhmadHAW Jul 23, 2024
dbfa19c
removing redundant sdoc medatadata export, change name of sdoc annota…
AhmadHAW Jul 23, 2024
e17b681
when importing tags also applied tags to documents if document filena…
AhmadHAW Jul 23, 2024
139258d
import project project metadata
AhmadHAW Jul 23, 2024
bf26938
import project metadata
AhmadHAW Jul 23, 2024
8309108
adjust import service and text cargo pipeline
AhmadHAW Oct 1, 2024
45838d4
fixing merge conflicts
AhmadHAW Oct 1, 2024
ef3837d
fixing minor bugs
AhmadHAW Oct 8, 2024
6c64aa3
make is_init as obsolete as possible
AhmadHAW Oct 8, 2024
ae33dee
fixinf logs and annotation passing to pptd on init
AhmadHAW Oct 8, 2024
e764ff9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 8, 2024
3c3a6f8
Update OpenAPI spec and client
github-actions[bot] Oct 8, 2024
e28292e
Remving all ids and project names from exported dfs where not needed.…
AhmadHAW Oct 8, 2024
fe96bd5
finish text import pipeline and start image pipeline (still buggy)
AhmadHAW Oct 15, 2024
eab69fa
Update OpenAPI spec and client
github-actions[bot] Oct 15, 2024
fbfef1e
Fixing bbox import
AhmadHAW Oct 22, 2024
62696f1
finishing image pipeline
AhmadHAW Nov 19, 2024
9b3a11a
transcript is no longer an sdoc. transcript is linked to the audio do…
AhmadHAW Nov 28, 2024
9d06c6b
fixed for video pipeline as well
AhmadHAW Nov 28, 2024
06734a3
changing audio video and image pipeline, so transcript is not saved s…
AhmadHAW Dec 3, 2024
0a55aa9
fix export fso import could work on image and text
AhmadHAW Dec 3, 2024
1513956
import audio and video pipeline
AhmadHAW Dec 10, 2024
f263bfa
finishing import export and transcript in original sdoc merge
AhmadHAW Jan 9, 2025
fbfc418
Update OpenAPI spec and client
github-actions[bot] Jan 9, 2025
9c3fd78
add new field to sdoc data: repo_url
bigabig Jan 13, 2025
7f7a54e
update api
bigabig Jan 13, 2025
dcdfb60
updated image / video / audio rendering to use the new repo_url
bigabig Jan 13, 2025
9130fa4
Update OpenAPI spec and client
github-actions[bot] Jan 13, 2025
03e9315
added preprocessing concept readme
bigabig Jan 13, 2025
738c1de
fixing bug where orders changed in payload cargo
AhmadHAW Jan 14, 2025
aa321cd
refactored preprocessing pipeline structure and add word level transc…
AhmadHAW Jan 28, 2025
70b2371
updated api
AhmadHAW Jan 28, 2025
75d4b87
added migration todos
AhmadHAW Jan 28, 2025
c1d0742
updated api
AhmadHAW Jan 28, 2025
2495602
added back annotation for audio and video docs
AhmadHAW Jan 28, 2025
2ac3359
added the import endpoints
AhmadHAW Jan 28, 2025
b67de2f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 28, 2025
c04c3f9
added sentence annotation export / import
bigabig Jan 29, 2025
867bf98
refactored import & export service, splitting into multiple files
bigabig Jan 29, 2025
528eb8f
add sentencea annotator to video and audio
bigabig Jan 29, 2025
0d8ae15
add sentence annotation comparison to audio and video docs
bigabig Jan 29, 2025
4ec06c6
fixed bug in metadata copying
bigabig Jan 29, 2025
087dea7
Update OpenAPI spec and client
github-actions[bot] Jan 29, 2025
8fde822
updated api
bigabig Jan 29, 2025
5612cbe
fixed typo
bigabig Jan 29, 2025
ddb28ef
fixed typo
bigabig Jan 29, 2025
64fc497
Merge pull request #435 from uhh-lt/import
bigabig Jan 29, 2025
73caf90
updated README
bigabig Feb 3, 2025
0f8c843
Merge pull request #483 from uhh-lt/import
bigabig Feb 3, 2025
0d05888
updated READMEs
bigabig Feb 4, 2025
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
  •  
  •  
  •  
79 changes: 79 additions & 0 deletions .github/workflows/backend_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: backend checks
on:
push:
branches:
- main
- mwp_v1
pull_request:
paths:
- "backend/**"
- ".github/**"
- "docker/**"
- "tools/**"

jobs:
backend-checks:
runs-on: self-hosted
env:
API_WORKERS: 1
RAY_CONFIG: "config_gpu.yaml"
JWT_SECRET: ${{ secrets.JWT_SECRET }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare environment
run: |
./bin/setup-folders.sh
./bin/setup-envs.sh --project_name action-runner --port_prefix 131
sed -i 's/\(DATS_BACKEND_DOCKER_VERSION=[0-9.]*\)/\1-${{ github.run_id }}/' docker/.env
sed -i 's/\(DATS_RAY_DOCKER_VERSION=[0-9.]*\)/\1-${{ github.run_id }}/' docker/.env
echo "SPACY_CACHE_DIR=$HOME/spacy_models" >> docker/.env
echo "MODELS_CACHE_DIR=$HOME/models_cache" >> docker/.env
mkdir -p $HOME/spacy_models
mkdir -p $HOME/models_cache
- name: Build & Start Docker Containers
working-directory: docker
run: |
COMPOSE_PROFILES="weaviate,ray,background,backend" docker compose build
COMPOSE_PROFILES="weaviate,ray,background" docker compose up --wait --quiet-pull
- name: Check 1 - pytest runs without errors
working-directory: docker
run: |
docker compose run dats-backend-api /opt/envs/dats/bin/python -m pytest
- name: Check 2 - Database migrates without errors database
working-directory: docker
run: |
docker compose run -e PYTHONPATH='/dats_code/src' dats-backend-api /opt/envs/dats/bin/python migration/run_migrations.py
- name: Check 3 - Database schema is up-to-date after migration
working-directory: docker
run: |
docker compose run dats-backend-api /opt/envs/dats/bin/alembic check
- name: Start Remaining Docker Containers
working-directory: docker
run: |
COMPOSE_PROFILES="weaviate,ray,background,backend" docker compose up --wait --quiet-pull
- name: Check 4 - Test End-2-End importer script
working-directory: tools/importer
env:
TESTDATA_PASSWORD: ${{ secrets.TESTDATA_PASSWORD }}
run: |
pip install -r requirements.txt
wget -q http://ltdata1.informatik.uni-hamburg.de/dwts/totalitarismo.zip
unzip -q -P "$TESTDATA_PASSWORD" totalitarismo.zip
python dats_importer.py --input_dir json --backend_url http://localhost:13120/ --is_json --doctype text
python dats_importer.py --input_dir images --backend_url http://localhost:13120/ --doctype image
- name: Check 5 - pyright runs without errors
run: |
micromamba env create -f backend/environment.yml --yes
micromamba run -n dats pip install -r backend/src/app/preprocessing/ray_model_worker/requirements.txt
micromamba run -n dats pip install ray==2.32.0
micromamba run -n dats pyright
- name: Cleanup
working-directory: docker
if: always()
run: |
docker compose down -v --remove-orphans
micromamba env remove -n dats --yes
BACKEND_IMAGE=uhhlt/dats_backend:$(grep -oP 'DATS_BACKEND_DOCKER_VERSION=\K.*' .env)
RAY_IMAGE=uhhlt/dats_ray:$(grep -oP 'DATS_RAY_DOCKER_VERSION=\K.*' .env)
docker rmi $BACKEND_IMAGE $RAY_IMAGE
115 changes: 115 additions & 0 deletions .github/workflows/frontend_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: frontend checks
on:
push:
branches:
- main
- mwp_v1
pull_request:
paths:
- ".github/**"
- "docker/**"
- "frontend/**"

jobs:
frontend-checks:
runs-on: self-hosted
env:
API_WORKERS: 1
VITE_APP_SERVER: http://localhost:13120
COMPOSE_PROFILES: "weaviate,ray,background,backend,frontend"
RAY_CONFIG: "config_gpu.yaml"
JWT_SECRET: ${{ secrets.JWT_SECRET }}
BACKEND_HAS_NEW_REQUIREMENTS: false
RAY_HAS_NEW_REQUIREMENTS: false
steps:
- uses: actions/checkout@v3
- name: Checkout PR
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr checkout ${{ github.event.pull_request.number }}
- name: Check for new backend requirements
id: check_backend_requirements
if: github.event_name == 'pull_request'
run: |
base_branch=$(git merge-base origin/${{ github.event.pull_request.base.ref }} HEAD)
if git diff --name-only $base_branch HEAD | grep -q -e '^backend/requirements.txt' -e '^backend/environment.yml'; then
echo "BACKEND_HAS_NEW_REQUIREMENTS=true" >> $GITHUB_ENV
fi
- name: Check for new backend requirements on push
id: check_backend_requirements2
if: github.event_name == 'push'
run: |
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q -e '^backend/requirements.txt' -e '^backend/environment.yml'; then
echo "BACKEND_HAS_NEW_REQUIREMENTS=true" >> $GITHUB_ENV
fi
- name: Check for new ray requirements
id: check_ray_requirements
if: github.event_name == 'pull_request'
run: |
base_branch=$(git merge-base origin/${{ github.event.pull_request.base.ref }} HEAD)
if git diff --name-only $base_branch HEAD | grep -q -e '^backend/src/app/preprocessing/ray_model_worker/requirements.txt'; then
echo "RAY_HAS_NEW_REQUIREMENTS=true" >> $GITHUB_ENV
fi
- name: Check for new ray requirements on push
id: check_ray_requirements2
if: github.event_name == 'push'
run: |
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q -e '^backend/src/app/preprocessing/ray_model_worker/requirements.txt'; then
echo "RAY_HAS_NEW_REQUIREMENTS=true" >> $GITHUB_ENV
fi
- name: Prepare environment
run: |
./bin/setup-folders.sh
./bin/setup-envs.sh --project_name action-runner --port_prefix 131
sed -i 's/\(DATS_FRONTEND_DOCKER_VERSION=[0-9.]*\)/\1-${{ github.run_id }}/' docker/.env
if [ "${{ env.RAY_HAS_NEW_REQUIREMENTS }}" = "true" ]; then
sed -i 's/\(DATS_RAY_DOCKER_VERSION=[0-9.]*\)/\1-${{ github.run_id }}/' docker/.env
fi
if [ "${{ env.BACKEND_HAS_NEW_REQUIREMENTS }}" = "true" ]; then
sed -i 's/\(DATS_BACKEND_DOCKER_VERSION=[0-9.]*\)/\1-${{ github.run_id }}/' docker/.env
fi
echo "SPACY_CACHE_DIR=$HOME/spacy_models" >> docker/.env
echo "MODELS_CACHE_DIR=$HOME/models_cache" >> docker/.env
mkdir -p $HOME/spacy_models
mkdir -p $HOME/models_cache
- name: Build & Start Docker Containers
working-directory: docker
run: |
if [ "${{ env.RAY_HAS_NEW_REQUIREMENTS }}" = "true" ]; then
docker compose build ray
fi
if [ "${{ env.BACKEND_HAS_NEW_REQUIREMENTS }}" = "true" ]; then
docker compose build dats-backend-api
fi
docker compose build dats-frontend
docker compose up --wait --quiet-pull
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Check 1 - api client is up-to-date
working-directory: frontend
run: |
npm run update-api
npm run generate-api
- name: Add and commit changes
uses: EndBug/add-and-commit@v9
if: github.event_name == 'pull_request'
with:
add: "frontend/src/api"
message: "Update OpenAPI spec and client"
pathspec_error_handling: exitImmediately
default_author: github_actions
- name: Cleanup
working-directory: docker
if: always()
run: |
docker compose down -v
FRONTEND_IMAGE=uhhlt/dats_frontend:$(grep -oP 'DATS_FRONTEND_DOCKER_VERSION=\K.*' .env)
docker rmi $FRONTEND_IMAGE
106 changes: 106 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Release

on:
push:
tags:
- "v*.*.*"

jobs:
build_release:
name: build_release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Get version from tag
id: extract_version
run: |
echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
shell: bash

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
docker-images: false
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true

- name: Build and push backend container
uses: docker/build-push-action@v4
with:
context: ./backend
push: true
tags: |
"uhhlt/dats_backend:${{ steps.extract_version.outputs.version }}"
- name: Prepare environment
working-directory: frontend
run: cp .env.production.example .env.production
- name: Build and push frontend container
uses: docker/build-push-action@v4
with:
context: ./frontend
push: true
tags: |
"uhhlt/dats_frontend:${{ steps.extract_version.outputs.version }}"
- name: Build and push ray container
uses: docker/build-push-action@v4
with:
context: ./backend/src/app/preprocessing/ray_model_worker
push: true
tags: |
"uhhlt/dats_ray:${{ steps.extract_version.outputs.version }}"

- name: Create Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
deploy_demo:
name: deploy_demo
needs: build_release
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v3

- name: Write SSH config & key
id: write_ssh_keys
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_CONFIG: ${{ secrets.SSH_CONFIG }}
run: |
install -m 600 -D /dev/null ~/.ssh/id_ed25519
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
echo "$SSH_CONFIG" > ~/.ssh/config
shell: bash

- name: Add server to known hosts
env:
SSH_JUMP_HOST: ${{ secrets.SSH_JUMP_HOST }}
run: |
ssh-keyscan -H $SSH_JUMP_HOST >> ~/.ssh/known_hosts
shell: bash

- name: Deploy
id: deploy
env:
SSH_HOST: ${{ secrets.SSH_HOST }}
run: |
scp -o StrictHostKeyChecking=no bin/deploy.sh $SSH_HOST:~/deploy.sh
ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=5 -o StrictHostKeyChecking=no $SSH_HOST './deploy.sh'
ssh -o StrictHostKeyChecking=no $SSH_HOST 'rm ./deploy.sh'
shell: bash
51 changes: 51 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ci:
skip: [eslint, pyright]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.7
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: pyright
name: "Pyright"
types: [python]
entry: bash -c 'ENV_NAME=dats source backend/_activate_current_env.sh && pyright $@'
language: system
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.11.0
hooks:
- id: eslint
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]
args: [--max-warnings=0]
additional_dependencies:
- "@tanstack/[email protected]"
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
files: \.([jt]sx?|json)$ # *.js, *.jsx, *.ts, *.tsx, *.json
args: [
--print-width,
"120",
# Without this, prettier will create a `node_modules` folder in the repository root
"--cache-location",
"frontend/node_modules/.cache/prettier",
]
17 changes: 17 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"recommendations": [
"ms-azuretools.vscode-docker",
// git
"eamodio.gitlens",
"github.vscode-github-actions",
"github.copilot",
// backend
"ms-python.python",
"ms-python.debugpy",
"ms-python.vscode-pylance",
"charliermarsh.ruff",
// frontend
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
Loading
Loading