Skip to content

Commit

Permalink
Trying to fix a build error.
Browse files Browse the repository at this point in the history
  • Loading branch information
benleejr committed Nov 27, 2023
1 parent a744409 commit e6d4a48
Show file tree
Hide file tree
Showing 13 changed files with 106 additions and 163 deletions.
Binary file modified api/__pycache__/unit_test_call.cpython-312.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions api/unit_test_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ def load_file_contents(file):
return file_contents

#Function will generate unit tests using an API call with GPT
def generate_tests(file, file_content, api_key):
def generate_tests(file, file_content, key):
file_name = os.path.splitext(file)[0]
file_content = f"{file_content}"

client = OpenAI(api_key=api_key)
client = OpenAI(api_key=key)
response = client.ChatCompletion.create(
model="gpt-3.5-turbo-16k-0613",
messages=[
Expand Down
60 changes: 0 additions & 60 deletions app/UploadButtonClientComponent.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions app/layout.tsx

This file was deleted.

24 changes: 24 additions & 0 deletions components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// components/Layout.tsx
import React, { ReactNode } from 'react';
import Head from 'next/head';

interface LayoutProps {
children: ReactNode;
}

const Layout: React.FC<LayoutProps> = ({ children }) => {
return (
<>
<Head>
<title>Unit Test Generator and Runner</title>
<link rel="icon" href="/mcneesefavicon.png" />
</Head>
<div className="w-full bg-blue-500 text-white text-center py-4 mb-8">
<h1 style={{fontSize: '1.5em'}}>Automatic Unit Test Generator and Runner</h1>
</div>
{children}
</>
);
};

export default Layout;
19 changes: 19 additions & 0 deletions components/UploadButtonClientComponent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//UploadButtonClientComponent
'use client';
import React from 'react';

const UploadButtonClientComponent = ({ inputId }: { inputId: string}) => {
const processFile = () => {
const fileInput = document.getElementById(inputId) as HTMLInputElement;
const files = fileInput.files;
if (!files) return;

return (
<button onClick={processFile}>
Process Files
</button>
);
};
}

export default UploadButtonClientComponent;
File renamed without changes.
84 changes: 42 additions & 42 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"flask-dev": "cross-env FLASK_DEBUG=1 pip3 install -r requirements.txt && python -m flask --app api/unit_test_call run -p 8000 --reload",
"flask-dev": "cross-env FLASK_DEBUG=1 pip3 install -r requirements.txt && python -m flask --app api/unit_test_call run -p 8000 --reload",
"next-dev": "next dev",
"dev": "concurrently \"npm run next-dev\" \"npm run flask-dev\"",
"lint": "next lint",
Expand All @@ -12,7 +12,7 @@
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.14.17",
"@mui/material": "^5.14.18",
"@react-pdf/renderer": "^3.1.14",
"@types/node": "20.6.1",
"@types/react-dom": "18.2.7",
Expand Down
8 changes: 8 additions & 0 deletions pages/_app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// pages/_app.ts
import '../components/globals.css';
import type { AppProps } from 'next/app'

function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />
}
export default MyApp
18 changes: 0 additions & 18 deletions pages/_document.tsx

This file was deleted.

Loading

0 comments on commit e6d4a48

Please sign in to comment.