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

Dynamodb simplification #769

Closed
wants to merge 10 commits into from
Closed

Dynamodb simplification #769

wants to merge 10 commits into from

Conversation

farisdurrani
Copy link
Member

Dynamodb simplification

What user problem are we solving?
To simplify the dynamodb utils CRUD functions

Testing Methodology
Endpoints have their unit test cases in the MD file

karkir0003 and others added 8 commits April 15, 2023 14:08
* Fixed exempt paths, init swagger docs

* open api documentation - initial start

* putting open api docs into openapi directory within backend

* remove debug print

* rename some open api yamls

* open api github action

* 🎨 Format Python code with psf/black

* github action fix

* gh action fix

* open api validator install cmd fix

* spectral

* rename file

* typo

* fix

* debug

* swagger cli

* fix

* typo

* gh action debug

* --no color args

* ensure all files get validated by swagger-cli

* created yaml file for default dataset

* Added yaml files for all apis and updates dlapi.openapi.yaml

* removed duplicates from dlpai and edited updateUserProgressData descriptions

* removed duplicate keys from dlpapi

* corrected types

---------

Co-authored-by: Faris Durrani <fdurrani@mythics.com>
Co-authored-by: karkir0003 <karkir0003@users.noreply.github.com>
Co-authored-by: Austin Tsang <47958374+Dashrekker@users.noreply.github.com>
* attempt at ecr put image:

* relaxed ecr rules to push every time

* skipped tests

* new commands

* mini docker

* complete example

* complete

* example

* reverted example

* fixed Dockerfile
@farisdurrani farisdurrani requested a review from dwu359 May 26, 2023 02:16
@farisdurrani farisdurrani self-assigned this May 26, 2023
@farisdurrani farisdurrani changed the base branch from dev to nextjs May 26, 2023 02:18
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

pyright

backend/endpoints/trainspace_endpoints.py|90 col 36| Expected 0 positional arguments (reportGeneralTypeIssues)
backend/endpoints/trainspace_endpoints.py|120 col 41| Expected 0 positional arguments (reportGeneralTypeIssues)
backend/endpoints/trainspace_endpoints.py|147 col 28| Expected 0 positional arguments (reportGeneralTypeIssues)
backend/endpoints/utils.py|21 col 17| Expression of type "ExecutionData" cannot be assigned to declared type "dict[Unknown, Unknown]"
  "ExecutionData" is incompatible with "dict[Unknown, Unknown]" (reportGeneralTypeIssues)

import os
import traceback
import datetime
from werkzeug.utils import secure_filename
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [pyright] reported by reviewdog 🐶
Import "werkzeug.utils" could not be resolved (reportMissingImports)


from flask import Flask, request, send_from_directory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [pyright] reported by reviewdog 🐶
Import "flask" could not be resolved (reportMissingImports)

)
from backend.middleware import middleware
from flask_cors import CORS
from flasgger import Swagger
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [pyright] reported by reviewdog 🐶
Import "flasgger" could not be resolved (reportMissingImports)

from backend.middleware import middleware
from flask_cors import CORS
from flasgger import Swagger
from flasgger.utils import swag_from
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [pyright] reported by reviewdog 🐶
Import "flasgger.utils" could not be resolved (reportMissingImports)

from backend.common.utils import *
from backend.firebase_helpers.firebase import init_firebase
from backend.middleware import middleware
from backend.aws_helpers.dynamo_db_utils.learnmod_db import (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [pyright] reported by reviewdog 🐶
Import "backend.aws_helpers.dynamo_db_utils.learnmod_db" could not be resolved (reportMissingImports)

created: str = None
data_source: str = None
dataset_data: dict = None
name: str = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [pyright] reported by reviewdog 🐶
Expression of type "None" cannot be assigned to declared type "str"
  Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)

data_source: str = None
dataset_data: dict = None
name: str = None
parameters_data: dict = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [pyright] reported by reviewdog 🐶
Expression of type "None" cannot be assigned to declared type "dict[Unknown, Unknown]"
  Type "None" cannot be assigned to type "dict[Unknown, Unknown]" (reportGeneralTypeIssues)

dataset_data: dict = None
name: str = None
parameters_data: dict = None
review_data: str = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [pyright] reported by reviewdog 🐶
Expression of type "None" cannot be assigned to declared type "str"
  Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)

name: str = None
parameters_data: dict = None
review_data: str = None
status: str = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [pyright] reported by reviewdog 🐶
Expression of type "None" cannot be assigned to declared type "str"
  Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)



def getAllUserTrainspaceData(user_id: str) -> str:
def updateStatus(trainspace_id: str, status: str, entryData: dict = None) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [pyright] reported by reviewdog 🐶
Expression of type "None" cannot be assigned to parameter of type "dict[Unknown, Unknown]"
  Type "None" cannot be assigned to type "dict[Unknown, Unknown]" (reportGeneralTypeIssues)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants