Skip to content

Commit

Permalink
Merge pull request #137 from debiai/hotfix_no_model_found
Browse files Browse the repository at this point in the history
Hotfix no model found & new workflow
  • Loading branch information
Tomansion committed Oct 30, 2023
2 parents 4af36db + 313596d commit dd052db
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 11 deletions.
40 changes: 38 additions & 2 deletions .github/workflows/pull-request-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ jobs:
with:
node-version: 16
- name: Install dependencies and check prettier format
run: cd frontend && npm install && npm run prettier:check
run: |
cd frontend
npm install prettier
npm run prettier:check
cspell-check: # Check that the project does not contain spelling errors
name: CSpell check
Expand Down Expand Up @@ -128,4 +131,37 @@ jobs:
- name: Test with pytest
run: |
cd backend
python websrv.py & sleep 5 && pytest tests/
python websrv.py & sleep 5 && pytest tests/
docker-build-check: # Build the docker image and check that it can run
name: Docker build check
needs:
[black-format-check, prettier-check, cspell-check, version-upgrade-check]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build the Docker image
run: docker build -t debiai .
- name: Run the Docker image
run: docker run -d -p 3000:3000 debiai
- name: Wait for the Docker container to start
run: |
echo "Waiting for container status..."
for i in {1..10}; do
sleep 3
container_id=$(docker ps -q -f "ancestor=debiai")
status=$(docker inspect --format='{{.State.Status}}' $container_id | tr -d '[:space:]')
echo "Docker status: '$status'";
if [ "$status" = "running" ]; then
echo "Container is running"
exit 0
elif [ "$status" = "exited" ]; then
echo "Container exited"
exit 1
fi
done
echo "Container did not start in time"
exit 1
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,7 @@ def add_results_dict(project_id, modelId, data):

if not model_exist(project_id, modelId):
raise (
"Model '"
+ modelId
+ "' in project : '"
+ projects.getProjectNameFromId(project_id)
+ "' doesn't exist"
"Model '" + modelId + "' in project : '" + project_id + "' doesn't exist"
)

# Get resultStructure & project_block_structure
Expand Down
2 changes: 1 addition & 1 deletion backend/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
swagger: "2.0"
info:
version: 0.25.4
version: 0.25.5
title: DebiAI_BACKEND_API
description: DebiAI backend api
contact:
Expand Down
3 changes: 3 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"*index",
"applymap",
"astype",
"buildx",
"cacheout",
"ckdtree",
"Confiance",
Expand All @@ -16,6 +17,7 @@
"Drange",
"dtype",
"dvec",
"elif",
"fromlist",
"groundtruth",
"kneighbors",
Expand Down Expand Up @@ -61,6 +63,7 @@
"*.png",
"*.yaml",
".vscode/*",
"backend/requirements.txt",
"backend/data/*",
"__pycache__/",
"frontend/dist",
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "debiai_frontend",
"version": "0.25.4",
"version": "0.25.5",
"description": "Frontend for Debiai, made with Vuejs",
"license": "Apache-2.0",
"scripts": {
Expand Down

0 comments on commit dd052db

Please sign in to comment.