Skip to content

Commit 6783e72

Browse files
committed
updated web
1 parent 097b23d commit 6783e72

94 files changed

Lines changed: 1882 additions & 347 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lasso/package-lock.json

Lines changed: 1212 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lasso/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"react-dom": "^18.0.0",
3838
"react-pdf": "^9.2.1",
3939
"react-router": "^7.1.5",
40-
"react-router-dom": "^7.1.5"
40+
"react-router-dom": "^7.1.5",
41+
"react-spreadsheet": "^0.10.1"
4142
},
4243
"devDependencies": {
4344
"@docusaurus/module-type-aliases": "^3.7.0",

lasso/src/components/HomepageFeatures/index.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,6 @@ type FeatureItem = {
1212
};
1313

1414
const FeatureList: FeatureItem[] = [
15-
// {
16-
// title: 'Try LASSO now!',
17-
// //Svg: require('@site/static/img/undraw_services_re_hu5n.svg').default,
18-
// image: 'img/features/services.png',
19-
// description: (
20-
// <>
21-
// <div >
22-
// <p>Run the following two commands in a local directoy on your local machine (requires <a href="https://docs.docker.com/compose/">docker compose</a>):</p>
23-
// <CodeBlock
24-
// language="bash">
25-
// {`curl https://raw.githubusercontent.com/SoftwareObservatorium/lasso/refs/heads/develop/docker/compose/docker-compose-embedded.yml -o docker-compose.yml
26-
// docker compose up
27-
// `}
28-
// </CodeBlock>
29-
// <p>Then open LASSO's dashboard <a href="http://localhost:10222/webui/">http://localhost:10222/webui/</a> (login: admin / admin123)</p>
30-
// </div>
31-
// </>
32-
// ),
33-
// position: false,
34-
// },
3515
{
3616
title: 'Test-Driven Software Experimentation with LSL',
3717
//Svg: require('@site/static/img/undraw_services_re_hu5n.svg').default,

lasso/src/components/HubFeatures/HubFeatures.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ study(name: 'BoundedQueue-Mutation') {
139139
},
140140
OPENAI_GEN: {
141141
label: "Generate with OpenAI gpt4-o-mini",
142-
description: "Explore how OpenAI's GPT models can be used with LASSO to prompt for code solutions and tests. The functionality sought after is taken from the HumanEval benchmark (e.g., coding problem HumanEval_13_greatest_common_divisor)",
142+
description: "Explore how OpenAI's GPT models can be used with LASSO to prompt for code solutions and tests. The functionality sought after is taken from the HumanEval benchmark (e.g., coding problem HumanEval_13_greatest_common_divisor). Note: We strictly advise against using your personal API keys for OpenAI in our LASSO Playground (Demo) Instance.",
143143
lsl: `dataSource 'lasso_quickstart'
144144
study(name: 'ChatGPT') {
145145
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { useEffect, useState } from "react";
2+
import Spreadsheet, { CellBase, Matrix } from "react-spreadsheet";
3+
import "./Sheet.css";
4+
import { Box, Card, CardContent, Divider, TextField, Typography } from "@mui/material";
5+
6+
// just display records
7+
const ActuationSheet = ({ sheetSignature, sheetData, implementation}: any) => {
8+
return (
9+
<Box sx={{ minWidth: 275 }}>
10+
<Card variant="outlined">
11+
<CardContent>
12+
<Typography gutterBottom sx={{ color: 'text.secondary', fontSize: 14 }}>
13+
Actuation Sheet for {implementation?.className} ({implementation?.id})
14+
</Typography>
15+
<Typography variant="h5" component="div">
16+
<TextField value={sheetSignature} id="outlined-basic" label="Sheet Signature" variant="outlined" />
17+
</Typography>
18+
<Typography sx={{ color: 'text.secondary', mb: 1.5 }}>Body</Typography>
19+
<Typography variant="body2">
20+
<Spreadsheet data={sheetData} />
21+
</Typography>
22+
23+
{implementation?.codeUnit ? <Typography variant="body2">
24+
<Divider>Implementation</Divider><TextField multiline fullWidth value={implementation.codeUnit.content} id="outlined-basic" label="Code" variant="outlined" /></Typography> : null }
25+
26+
</CardContent>
27+
</Card>
28+
</Box>
29+
);
30+
31+
}
32+
33+
export default ActuationSheet;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.Sheet {
2+
text-align: center;
3+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import { SheetSpec } from "@site/src/services/models";
2+
3+
4+
const parseActuationSheet = (sheet: SheetSpec) => {
5+
const matrix = loadSheetJsonl(sheet?.body)
6+
7+
return matrix
8+
}
9+
10+
function loadSheetJsonl(jsonl: any) {
11+
console.log(`body = ${jsonl}`)
12+
13+
const sheetData: any[][] = []
14+
for (const line of jsonl.trim().split(/[\r\n]+/)) {
15+
if (!line) {
16+
continue;
17+
}
18+
//console.log(line);
19+
const row = JSON.parse(line + "")
20+
//sheetData.push({value: row.})
21+
22+
const cols: any[] = Object.keys(row.cells).sort().map(key => {
23+
//console.log(`Property: ${key}, Value: ${row.cells[key]}`);
24+
25+
let myVal = row.cells[key];
26+
if (myVal.toString() == "[object Object]") {
27+
myVal = "";
28+
}
29+
30+
//console.log(`myVal: ${myVal}`);
31+
32+
return { value: myVal, readOnly: false, className: "text-danger" }
33+
});
34+
35+
sheetData.push(cols)
36+
}
37+
38+
// make certain rows larger if necessary
39+
const maxLength = findLargestRow(sheetData)
40+
const matrix = sheetData.map((row) => {
41+
const nextRow = [...row];
42+
if (nextRow.length < maxLength) {
43+
let diff = maxLength - nextRow.length
44+
nextRow.length += diff;
45+
46+
//console.log(nextRow.length)
47+
}
48+
return nextRow;
49+
})
50+
51+
return matrix
52+
}
53+
54+
function findLargestRow(sheetData: any[][]): number {
55+
let length = -1
56+
for (let i = 0; i < sheetData.length; i++) {
57+
const currentLength = sheetData[i].length
58+
59+
if (currentLength > length) {
60+
length = currentLength
61+
}
62+
}
63+
64+
return length
65+
}
66+
67+
const SheetService = {
68+
parseActuationSheet
69+
};
70+
71+
export default SheetService;

lasso/src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export default function Home(): JSX.Element {
149149
docker compose up
150150
`}
151151
</CodeBlock>
152-
<p>Wait until all services started (LASSO platform, Code Search Index and Artifact Repository) and then open LASSO's dashboard at <a href="http://localhost:10222/webui/">http://localhost:10222/webui/</a> (login: admin / admin123). See <a href="./docs/quickstart/scenario">5 Minute Tutorial</a> for more details.</p>
152+
<p>Wait until all services started (LASSO platform, Code Search Index and Artifact Repository) and then open LASSO's dashboard at <a href="http://localhost:10222/webui/">http://localhost:10222/webui/</a> (login: admin / admin123). See <a href="./docs/quickstart/scenario">5 Minute Tutorial</a> for details, and <a href="./labs">Labs (Playground)</a> for more options.</p>
153153
</div>
154154
</div>
155155
</div>

lasso/src/pages/labs.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# LASSO Labs
22

3+
## LASSO Platform (Demo Instance)
4+
5+
A public demo LASSO instance (i.e., playground) is available. To try LASSO, head over to [TDSEHub](./hub), select an example LSL pipeline script and press the `Try Now!` button.
6+
7+
### Generative AI (LLM) - Code Generation
8+
9+
For example, run your first code/test generation workflow with OpenAI models [here](lasso/submit?exampleId=OPENAI_GEN).
10+
311
## LSLFlow - A Visual Graph Editor for LSL Pipelines
412

513
A first visual representation of a graph editor for designing and managing LSL pipelines is now available.
@@ -15,8 +23,4 @@ The project is actively developed by **David Cebulla**, a business informatics s
1523

1624
### Preview
1725

18-
Visit the Project Website: Explore the preview version of LSLFlow here: [LSLFlow](https://softwareobservatorium.github.io/lslflow/)
19-
20-
## LASSO Platform (Demo Instance)
21-
22-
A public demo LASSO instance (i.e., playground) is available. To try LASSO, head over to [TDSEHub](./hub), select an example LSL pipeline script and press the `Try Now!` button.
26+
Visit the Project Website: Explore the preview version of LSLFlow here: [LSLFlow](https://softwareobservatorium.github.io/lslflow/)

0 commit comments

Comments
 (0)