-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from odu-emse/ALMP-591
Completed recommendation logic for API access
- Loading branch information
Showing
29 changed files
with
973 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build and Deploy Docs | ||
|
||
on: | ||
push: | ||
branches: [ 'dev', 'master', 'ALMP-**' ] | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
name: Create Docs | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9.13' | ||
cache: 'pip' # caching pip dependencies | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
- name: Set env variables | ||
run: | | ||
echo "DATABASE_URL=${{secrets.DATABASE_URL}}" > .env | ||
echo "DIRECT_URL=${{secrets.DIRECT_URL}}" > .env | ||
- name: Generate Prisma types | ||
run: prisma generate | ||
- name: Generate docs | ||
run: pdoc --html --output-dir docs --force . | ||
- name: Deploy docs | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: docs/emse-mms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
input/ | ||
.DS_Store | ||
/.env | ||
__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
FROM python:3.9.13 | ||
FROM python:3.9.13 as base | ||
|
||
RUN apt-get update | ||
RUN apt-get -y update | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY requirements.txt ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
CMD [ "python", "./app.py" ] | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
from fastapi import FastAPI | ||
|
||
from app import getUserProfile | ||
import json | ||
from recommend import Recommender, Recs | ||
|
||
app = FastAPI() | ||
|
||
|
||
@app.get("/recommend/") | ||
async def read_item(userID: str): | ||
account = await getUserProfile(userID) | ||
print(account) | ||
return {"user": account} | ||
rec = Recs() | ||
res = await rec.run() | ||
|
||
cleaned_data = json.loads(res) | ||
|
||
return {"user": userID, "data": cleaned_data[0:50]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.