Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nsavinda authored Jun 14, 2024
2 parents 8366393 + 678586e commit 458d98f
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"Build: Automation":
- changed-files:
- any-glob-to-any-file: ['.github/**']
22 changes: 22 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler

name: Labeler
on: [pull_request_target]

jobs:
label:

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
29 changes: 29 additions & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow executes several linters on changed files based on languages used in your code base whenever
# you push a code or open a pull request.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/github/super-linter
name: Lint Code Base

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: "main"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pip install -r requirements.txt

3. Run the app using `uvicorn app.main:app --reload`


```bash
uvicorn app.main:app --reload --port 7401
```
Expand Down
1 change: 1 addition & 0 deletions app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# app/__init__.py

from .routers.upload import router as upload_router
from .routers.questionGenerate import router as questionGenerate_router

Expand Down
1 change: 1 addition & 0 deletions app/routers/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
async def upload_pdf(file: UploadFile = None, examid: str = Query(..., description="The ID of the exam related to the uploaded PDF")) -> dict:
if file is None:
file = File(...)

"""Endpoint to upload a PDF and upsert its contents into a Pinecone vector store."""
if file.content_type != 'application/pdf':
raise HTTPException(status_code=415, detail="Unsupported file type. Please upload a PDF.")
Expand Down

0 comments on commit 458d98f

Please sign in to comment.