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

cd: internal testing #158

Merged
merged 13 commits into from
Mar 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -16,4 +16,6 @@ models/

*/**/database.sqlite
./backend/src/database.sqlite
.codefox
.codefox

.env
Loading

Unchanged files with check annotations Beta

);
//To do integrate FileStructureAndArchitectureHandler
const fileStructureAndArchitectureHandler = this.readMockFile(

Check warning on line 41 in backend/src/build-system/__tests__/mock/MockBuilderContext.ts

GitHub Actions / autofix

'fileStructureAndArchitectureHandler' is assigned a value but never used. Allowed unused vars must match /^_/u

Check warning on line 41 in backend/src/build-system/__tests__/mock/MockBuilderContext.ts

GitHub Actions / autofix

'fileStructureAndArchitectureHandler' is assigned a value but never used. Allowed unused vars must match /^_/u
path.join(__dirname, 'test_files', 'File_Structure_Architecture_Node.md'),
);
this.mockNodeData.set(UXSMSHandler, uxSitemapStructure);
const absolutePath = resolve(filePath); // Resolve the file path
return readFileSync(absolutePath, 'utf-8'); // Read the file content
} catch (err) {
console.error(`Error reading file at ${filePath}:`, err);

Check warning on line 107 in backend/src/build-system/__tests__/mock/MockBuilderContext.ts

GitHub Actions / autofix

Unexpected console statement

Check warning on line 107 in backend/src/build-system/__tests__/mock/MockBuilderContext.ts

GitHub Actions / autofix

Unexpected console statement
return ''; // Return an empty string if file read fails
}
}
});
it('should create and return the root directory', async () => {
const rootDir = getRootDir();

Check warning on line 47 in backend/src/build-system/__tests__/test-file-create-and-path.spec.ts

GitHub Actions / autofix

'rootDir' is assigned a value but never used. Allowed unused vars must match /^_/u

Check warning on line 47 in backend/src/build-system/__tests__/test-file-create-and-path.spec.ts

GitHub Actions / autofix

'rootDir' is assigned a value but never used. Allowed unused vars must match /^_/u
await generateAndSaveCode();
});
path.normalize(path.resolve(mdFilePath)),
'utf8',
);
const structMarkdownContent = fs.readFileSync(

Check warning on line 43 in backend/src/build-system/__tests__/test-file-create.spec.ts

GitHub Actions / autofix

'structMarkdownContent' is assigned a value but never used. Allowed unused vars must match /^_/u

Check warning on line 43 in backend/src/build-system/__tests__/test-file-create.spec.ts

GitHub Actions / autofix

'structMarkdownContent' is assigned a value but never used. Allowed unused vars must match /^_/u
path.normalize(path.resolve(structMdFilePath)),
'utf8',
);
fs.mkdirSync(logFolderPath, { recursive: true });
const context = new BuilderContext(sequence, 'test-env');
const monitor = BuildMonitor.getInstance();

Check warning on line 90 in backend/src/build-system/__tests__/utils.ts

GitHub Actions / autofix

'monitor' is assigned a value but never used. Allowed unused vars must match /^_/u

Check warning on line 90 in backend/src/build-system/__tests__/utils.ts

GitHub Actions / autofix

'monitor' is assigned a value but never used. Allowed unused vars must match /^_/u
await context.execute();
dependencies = dependencyFile
? JSON.parse(dependencyFile)
: defaultDependencies;
} catch (error) {

Check warning on line 24 in backend/src/build-system/handlers/backend/code-generate/prompt.ts

GitHub Actions / autofix

'error' is defined but never used

Check warning on line 24 in backend/src/build-system/handlers/backend/code-generate/prompt.ts

GitHub Actions / autofix

'error' is defined but never used
dependencies = defaultDependencies;
}
generateDatabaseSchema: (
dbAnalysis: string,
databaseType: string = 'PostgreSQL',
fileExtension: string,

Check warning on line 80 in backend/src/build-system/handlers/database/schemas/prompt.ts

GitHub Actions / autofix

'fileExtension' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 80 in backend/src/build-system/handlers/database/schemas/prompt.ts

GitHub Actions / autofix

'fileExtension' is defined but never used. Allowed unused args must match /^_/u
): string => {
return `You are a Database Engineer specializing in ${databaseType}. Generate the complete database schema based on the following analysis, using appropriate ${databaseType} syntax and features:
`Layer #${layerIndex + 1}, generating code for file: ${file}`,
);
const currentFullFilePath = normalizePath(

Check warning on line 119 in backend/src/build-system/handlers/frontend-code-generate/index.ts

GitHub Actions / autofix

'currentFullFilePath' is assigned a value but never used. Allowed unused vars must match /^_/u

Check warning on line 119 in backend/src/build-system/handlers/frontend-code-generate/index.ts

GitHub Actions / autofix

'currentFullFilePath' is assigned a value but never used. Allowed unused vars must match /^_/u
path.resolve(frontendPath, file),
);