Skip to content

Commit

Permalink
0.25.3 Spell update
Browse files Browse the repository at this point in the history
Spell update
  • Loading branch information
Tomansion committed Oct 23, 2023
2 parents 3e13920 + f2f9aea commit 8b2bc6e
Show file tree
Hide file tree
Showing 71 changed files with 636 additions and 864 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/black-format-check.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/prettier-format-check.yml

This file was deleted.

131 changes: 131 additions & 0 deletions .github/workflows/pull-request-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Pull Request Checks

on:
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
black-format-check: # Check that the backend codebase is formatted with black
name: Black format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies and check black format
run: |
cd backend
python -m pip install --upgrade pip
pip install black
black --check --diff .
prettier-check: # Check that the frontend codebase is formatted with prettier
name: Prettier format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node 16
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies and check prettier format
run: cd frontend && npm install && npm run prettier:check

cspell-check: # Check that the project does not contain spelling errors
name: CSpell check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node 16
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies and check prettier format
run: npm install -g cspell && cspell --no-summary --no-progress --no-color .

version-upgrade-check: # Check that the version is greater than the previous commit version
name: Version upgrade check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Check that the version in backend and frontend are the same
id: version-check
run: |
cd frontend
FRONTEND_VERSION=$(cat package.json | grep -m1 version | cut -d '"' -f 4)
cd ../backend
BACKEND_VERSION=$(cat swagger.yaml | grep -m1 version | cut -d ':' -f 2 | sed 's/ //g')
if [ "$FRONTEND_VERSION" != "$BACKEND_VERSION" ]; then
echo "Version mismatch: frontend/package.json version '$FRONTEND_VERSION' != backend/swagger.yaml version '$BACKEND_VERSION'."
exit 1
fi
echo "Version match: frontend/package.json version '$FRONTEND_VERSION' == backend/swagger.yaml version '$BACKEND_VERSION'."
echo "BRANCH_VERSION=$FRONTEND_VERSION" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
with:
ref: main

- name: Check that the version is greater than the previous commit version
run: |
BRANCH_VERSION=${{ steps.version-check.outputs.BRANCH_VERSION }}
cd frontend
PREVIOUS_VERSION=$(cat package.json | grep -m1 version | cut -d '"' -f 4)
echo "PREVIOUS_VERSION=$PREVIOUS_VERSION"
echo "BRANCH_VERSION=$BRANCH_VERSION"
if [ "$BRANCH_VERSION" == "" ]; then
echo "No version found in current branch."
exit 1
fi
if [ "$PREVIOUS_VERSION" == "" ]; then
echo "No version found in main branch."
exit 1
fi
if [[ $PREVIOUS_VERSION == $BRANCH_VERSION ]]; then
echo "Version not upgraded: frontend/package.json version '$PREVIOUS_VERSION' == branch version '$BRANCH_VERSION'."
exit 1
fi
if [[ $PREVIOUS_VERSION > $BRANCH_VERSION ]]; then
echo "Version not upgraded: frontend/package.json version '$PREVIOUS_VERSION' > branch version '$BRANCH_VERSION'."
exit 1
fi
echo "Version upgraded: frontend/package.json version '$PREVIOUS_VERSION' < branch version '$BRANCH_VERSION'."
python-tests: # Install dependencies and run tests with pytest
name: Python tests
needs:
[black-format-check, prettier-check, cspell-check, version-upgrade-check]
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
cd backend
python -m pip install --upgrade pip
pip install pytest
pip install -r requirements.txt
- name: Test with pytest
run: |
cd backend
python websrv.py & sleep 5 && pytest tests/
45 changes: 0 additions & 45 deletions .github/workflows/python-tests.yml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/workflows/version-upgrade-check.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ DebiAI provides data scientists with features to:

## Dashboard

DebiAI has a Web Graphical User Interface with a complete data visualisation toolkit offering many statistical analysis tools:
DebiAI has a Web Graphical User Interface with a complete data visualization toolkit offering many statistical analysis tools:

<p align="center">
<img src="./images/DebiAI_dashboard.png">
Expand Down
4 changes: 2 additions & 2 deletions backend/config/config.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
; Exemple env file that will be read by DebiAI in a production environment
; Example env file that will be read by DebiAI in a production environment
; This file is for documentation purpose only, it will not be used by DebiAI
; In a local environment, you can modify the config.ini file

; More explainations about the configurations in the config.ini file
; More details about the configurations in the config.ini file

; ==== Data providers ====
; Data provider configuration
Expand Down
6 changes: 3 additions & 3 deletions backend/controller/algoProviders.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_algo_providers():


def post_algo_provider(data):
# Check if we are allowed to add AlgoProviderss from the config file
# Check if we are allowed to add AlgoProviders from the config file
config = get_config()
creation_allowed = config["ALGO_PROVIDERS_CONFIG"]["creation"]
if not creation_allowed:
Expand Down Expand Up @@ -49,8 +49,8 @@ def use_algo(algoProviderName, algoId, data):

try:
# Use algoProviders
algo_prodier = algo_provider_manager.get_single_algo_provider(algoProviderName)
return algo_prodier.use_algorithm(algoId, data), 200
algo_provider = algo_provider_manager.get_single_algo_provider(algoProviderName)
return algo_provider.use_algorithm(algoId, data), 200
except AlgoProviderException as e:
return e.message, e.status_code

Expand Down
9 changes: 4 additions & 5 deletions backend/controller/pythonModuleDp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from modules.dataProviders.DataProviderException import DataProviderException
import modules.dataProviders.dataProviderManager as data_provider_manager
import modules.dataProviders.pythonDataProvider.PythonDataProvider as PythonDataProvider


# Project
Expand All @@ -27,12 +26,12 @@ def post_project(data):
return e.message, e.status_code


# Blocklevel
def post_blocklevels(dataProviderId, projectId, blocklevels):
# Block level
def post_block_levels(dataProviderId, projectId, block_levels):
try:
data_provider = data_provider_manager.get_single_data_provider(dataProviderId)
data_provider.update_block_structure(projectId, blocklevels)
return blocklevels, 200
data_provider.update_block_structure(projectId, block_levels)
return block_levels, 200
except DataProviderException as e:
return e.message, e.status_code

Expand Down
Loading

0 comments on commit 8b2bc6e

Please sign in to comment.