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

setting steps to private-alpha, and a few to private-beta #279

Merged
Merged
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions cognite/neat/app/api/routers/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ def get_rules(
except Exception as e:
error_text = str(e)

logging.info(
{
"properties": properties,
"metadata": rules.metadata.model_dump(),
"classes": classes,
"file_name": path.name,
"hash": get_file_hash(path),
"error_text": error_text,
"src": src,
}
)

return {
"properties": properties,
"metadata": rules.metadata.model_dump(),
Expand Down
6 changes: 3 additions & 3 deletions cognite/neat/app/ui/neat-app/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"files": {
"main.css": "./static/css/main.38a62222.css",
"main.js": "./static/js/main.c4a886b6.js",
"main.js": "./static/js/main.1ea9c083.js",
"static/media/logo.svg": "./static/media/logo.4bdbcf8396881de06a6723a92fed910b.svg",
"index.html": "./index.html",
"main.38a62222.css.map": "./static/css/main.38a62222.css.map",
"main.c4a886b6.js.map": "./static/js/main.c4a886b6.js.map"
"main.1ea9c083.js.map": "./static/js/main.1ea9c083.js.map"
},
"entrypoints": [
"static/css/main.38a62222.css",
"static/js/main.c4a886b6.js"
"static/js/main.1ea9c083.js"
]
}
2 changes: 1 addition & 1 deletion cognite/neat/app/ui/neat-app/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="NEAT controll panel"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>React App</title><script defer="defer" src="./static/js/main.c4a886b6.js"></script><link href="./static/css/main.38a62222.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="NEAT controll panel"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>React App</title><script defer="defer" src="./static/js/main.1ea9c083.js"></script><link href="./static/css/main.38a62222.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cognite/neat/app/ui/neat-app/src/MainContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default function BasicTabs() {
<Box sx={{ width: '100%' }}>
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
<Tabs value={value} onChange={handleChange} aria-label="basic tabs example">
<Tab label="Solutions" {...a11yProps(0)} />
<Tab label="Execution history" {...a11yProps(1)} />
<Tab label="Workflows" {...a11yProps(0)} />
{/* <Tab label="Execution history" {...a11yProps(1)} /> */}
<Tab label="Statistics" {...a11yProps(2)} />
<Tab icon={<BuildRoundedIcon />} aria-label="Global config" {...a11yProps(3)} />
<Tab icon={<HelpIcon />} aria-label="Global config" {...a11yProps(4)} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ return (
<Box>
<Stack direction="row" spacing={2}>
<Typography sx={{marginRight:7}}>
Version : {selectedStepTemplate?.version}
{selectedStepTemplate?.version.toLowerCase().includes("alpha") && (
<Tooltip title="Caution: This step is in the alpha stage and may be subject to changes or deprecation.">
Version : <span style={{ color: selectedStepTemplate?.version.toLowerCase().includes("private-alpha") ? "red" : "green", fontWeight: selectedStepTemplate?.version.toLowerCase().includes("private-beta") ? "bold" : "bold" }}>{selectedStepTemplate?.version}</span>
{selectedStepTemplate?.version.toLowerCase().includes("private-alpha") && (
<Tooltip title="Caution: This step is in the private alpha stage and may be subject to changes or deprecation.">
<WarningIcon sx={{ marginLeft: 1, marginBottom: -0.5, color: "orange" }} />
</Tooltip>
)}
Expand Down
80 changes: 46 additions & 34 deletions cognite/neat/app/ui/neat-app/src/views/TransformationView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default function TransformationTable() {
setData(data);
}).catch((err) => {
console.log(err);
setAlertMsg("Transformation rules file "+fileName+" is either invalid or missing. Please ensure that you have a valid data model and the necessary transformation rules file in place.");
setAlertMsg("Rules file "+fileName+" is either invalid or missing. Please ensure that you have a valid Rules file.");
}
)}

Expand Down Expand Up @@ -188,36 +188,48 @@ export default function TransformationTable() {

{selectedTab === 0 && (
<Box sx={{marginTop:5}}>
<Typography variant="body1" gutterBottom>
Title: {data.metadata.title}
</Typography>
<Typography variant="body2" gutterBottom>
Description: {data.metadata.description}
</Typography>
<Typography variant="body1" gutterBottom>
Prefix/DM Space: {data.metadata.prefix}
</Typography>
<Typography variant="body1" gutterBottom>
Data Model ID: {data.metadata.dataModelId}
</Typography>
<Typography variant="body2" gutterBottom>
Namespace: {data.metadata.namespace}
</Typography>
<Typography variant="body2" gutterBottom>
Version: {data.metadata.version}
</Typography>
<Typography variant="body2" gutterBottom>
Created: {data.metadata.created}
</Typography>
<Typography variant="body2" gutterBottom>
Updated: {data.metadata.updated}
</Typography>
<Typography variant="body2" gutterBottom>
Creator: {data.metadata.creator.join(", ")}
</Typography>
<Typography variant="body2" gutterBottom>
Source: {data.metadata.source}
</Typography>
<TableContainer component={Paper}>
<Table aria-label="metadata table">
<TableBody>
<TableRow>
<TableCell><b>Title</b></TableCell>
<TableCell>{data.metadata.title}</TableCell>
</TableRow>
<TableRow>
<TableCell><b>Description</b></TableCell>
<TableCell>{data.metadata.description}</TableCell>
</TableRow>
<TableRow>
<TableCell><b>Prefix and DMS Space</b></TableCell>
<TableCell>{data.metadata.prefix}</TableCell>
</TableRow>
<TableRow>
<TableCell><b>Data Model ID</b></TableCell>
<TableCell>{data.metadata.suffix}</TableCell>
</TableRow>
<TableRow>
<TableCell><b>Namespace</b></TableCell>
<TableCell>{data.metadata.namespace}</TableCell>
</TableRow>
<TableRow>
<TableCell><b>Version</b></TableCell>
<TableCell>{data.metadata.version}</TableCell>
</TableRow>
<TableRow>
<TableCell><b>Created</b></TableCell>
<TableCell>{data.metadata.created}</TableCell>
</TableRow>
<TableRow>
<TableCell><b>Updated</b></TableCell>
<TableCell>{data.metadata.updated}</TableCell>
</TableRow>
<TableRow>
<TableCell><b>Creator</b></TableCell>
<TableCell>{data.metadata.creator.join(", ")}</TableCell>
</TableRow>
</TableBody>
</Table>
</TableContainer>
</Box>
)}
{selectedTab === 1 && (
Expand All @@ -226,11 +238,11 @@ export default function TransformationTable() {
<TableHead>
<TableRow>
<TableCell />
<TableCell> <b>Solution class</b></TableCell>
{/* <TableCell> <b>Solution class</b></TableCell> */}
<TableCell align="right"><b>Description</b></TableCell>
<TableCell align="right"><b>CDF resource</b></TableCell>
{/* <TableCell align="right"><b>CDF resource</b></TableCell> */}
<TableCell align="right"><b>Parent resource</b></TableCell>
<TableCell align="right"><b>Action</b></TableCell>
{/* <TableCell align="right"><b>Action</b></TableCell> */}
</TableRow>
</TableHead>
<TableBody>
Expand Down
10 changes: 5 additions & 5 deletions cognite/neat/app/ui/neat-app/src/views/WorkflowView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ return (
<div style={{ height: '85vh', width: '97vw' }}>
<Box>
<FormControl sx={{ width: 300, marginBottom: 2 }}>
<InputLabel id="workflowSelectorLabel">Workflow selector</InputLabel>
<InputLabel id="workflowSelectorLabel">Selector</InputLabel>
<Select
labelId="workflowSelectorLabel"
id="workflowSelector"
Expand All @@ -525,12 +525,12 @@ return (
onChange={handleViewTypeChange}
aria-label="View type"
>
<ToggleButton value="system">Solution overview</ToggleButton>
{/* <ToggleButton value="system">Solution overview</ToggleButton> */}
<ToggleButton value="steps">Workflow</ToggleButton>
<ToggleButton value="src">Files</ToggleButton>
<ToggleButton value="configurations">Configurations</ToggleButton>
{/* <ToggleButton value="src">Files</ToggleButton> */}
{/* <ToggleButton value="configurations">Configurations</ToggleButton> */}
<ToggleButton value="transformations">Data model and transformations</ToggleButton>
<ToggleButton value="data_explorer">Data explorer</ToggleButton>
<ToggleButton value="data_explorer">Graph explorer</ToggleButton>
</ToggleButtonGroup>
</Box>
{ editState && (<Typography color={"red"} variant="overline"> {editState} </Typography> ) }
Expand Down
Binary file modified cognite/neat/rules/examples/Rules-Nordic44-to-TNT.xlsx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@


class SimpleGraphEntityMatcher(Step):
version = "private-alpha"
description = "The step matches entities in the graph and creates links based on provided configurations"
category = "Contextualization"
configurables: ClassVar[list[Configurable]] = [
Expand Down
13 changes: 8 additions & 5 deletions cognite/neat/workflows/steps/lib/graph_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class ExtractGraphFromRdfFile(Step):
"""

description = "This step extract instances from a file into the source graph. The file must be in RDF format."
version = "private-beta"
category = CATEGORY
configurables: ClassVar[list[Configurable]] = [
Configurable(
Expand Down Expand Up @@ -90,7 +91,7 @@ class ExtractGraphFromDexpiFile(Step):
"""

description = "This step converts DEXPI P&ID (XML) into Knowledge Graph"
version = "0.1.0-alpha"
version = "private-alpha"
category = CATEGORY
configurables: ClassVar[list[Configurable]] = [
Configurable(
Expand Down Expand Up @@ -129,6 +130,7 @@ class ExtractGraphFromGraphCapturingSheet(Step):
"""

description = "This step extracts nodes and edges from graph capturing spreadsheet and load them into graph"
version = "private-alpha"
category = CATEGORY
configurables: ClassVar[list[Configurable]] = [
Configurable(
Expand Down Expand Up @@ -185,6 +187,7 @@ class ExtractGraphFromMockGraph(Step):
"""

description = "This step extracts instances from graph capture spreadsheet and loads them into solution graph"
version = "private-alpha"
category = CATEGORY
configurables: ClassVar[list[Configurable]] = [
Configurable(
Expand Down Expand Up @@ -236,7 +239,7 @@ class ExtractGraphFromRulesInstanceSheet(Step):

description = "This step extracts instances from Rules object and loads them into the graph."
category = CATEGORY
version = "0.1.0-alpha"
version = "private-alpha"

configurables: ClassVar[list[Configurable]] = [
Configurable(
Expand Down Expand Up @@ -273,7 +276,7 @@ class ExtractGraphFromRulesDataModel(Step):

description = "This step extracts data model from rules file and loads it into source graph."
category = CATEGORY
version = "0.1.0-alpha"
version = "private-alpha"

def run( # type: ignore[override, syntax]
self, transformation_rules: RulesData, source_graph: SourceGraph
Expand Down Expand Up @@ -318,7 +321,7 @@ class ExtractGraphFromJsonFile(Step):

description = "This step extracts instances from json file and loads them into a graph store"
category = CATEGORY
version = "0.1.0-alpha"
version = "private-alpha"
configurables: ClassVar[list[Configurable]] = [
Configurable(
name="file_name", value="data_dump.json", label="Full path to the file containing data dump in JSON format"
Expand Down Expand Up @@ -502,7 +505,7 @@ class ExtractGraphFromAvevaPiAssetFramework(Step):

description = "This step extracts instances from Aveva PI AF and loads them into a graph store"
category = CATEGORY
version = "0.1.0-alpha"
version = "private-alpha"
configurables: ClassVar[list[Configurable]] = [
Configurable(
name="file_name",
Expand Down
12 changes: 8 additions & 4 deletions cognite/neat/workflows/steps/lib/graph_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class LoadLabelsToCDF(Step):

description = "This step creates default NEAT labels in CDF"
category = CATEGORY

version = "private-alpha"
configurables: ClassVar[list[Configurable]] = [
Configurable(name="data_set_id", value="", label=("CDF dataset id to which the labels will be added."))
]
Expand Down Expand Up @@ -157,7 +157,7 @@ class LoadGraphToRdfFile(Step):

description = "The step generates nodes and edges from the graph"
category = CATEGORY

version = "private-beta"
configurables: ClassVar[list[Configurable]] = [
Configurable(
name="graph_name",
Expand Down Expand Up @@ -208,6 +208,7 @@ class LoadNodesToCDF(Step):

description = "This step uploads nodes to CDF"
category = CATEGORY
version = "private-alpha"

def run(self, cdf_client: CogniteClient, nodes: Nodes) -> FlowMessage: # type: ignore[override, syntax]
if nodes.nodes:
Expand All @@ -224,6 +225,7 @@ class LoadEdgesToCDF(Step):

description = "This step uploads edges to CDF"
category = CATEGORY
version = "private-alpha"

def run(self, cdf_client: CogniteClient, edges: Edges) -> FlowMessage: # type: ignore[override, syntax]
if edges.edges:
Expand All @@ -242,7 +244,7 @@ class GenerateAssetsFromGraph(Step):
"The step generates assets from the graph ,categorizes them and stores them in CategorizedAssets object"
)
category = CATEGORY

version = "private-alpha"
configurables: ClassVar[list[Configurable]] = [
Configurable(name="data_set_id", value="", label=("CDF dataset id to which the labels will be added.")),
Configurable(
Expand Down Expand Up @@ -448,6 +450,7 @@ class LoadAssetsToCDF(Step):

description = "This step uploads categorized assets to CDF"
category = CATEGORY
version = "private-alpha"

def run( # type: ignore[override]
self, cdf_client: CogniteClient, categorized_assets: CategorizedAssets, flow_msg: FlowMessage
Expand Down Expand Up @@ -506,7 +509,7 @@ class GenerateRelationshipsFromGraph(Step):

description = "This step generates relationships from the graph and saves them to CategorizedRelationships object"
category = CATEGORY

version = "private-alpha"
configurables: ClassVar[list[Configurable]] = [
Configurable(name="data_set_id", value="", label=("CDF dataset id to which the labels will be added.")),
Configurable(
Expand Down Expand Up @@ -575,6 +578,7 @@ class LoadRelationshipsToCDF(Step):

description = "This step uploads relationships to CDF"
category = CATEGORY
version = "private-alpha"

def run( # type: ignore[override, syntax]
self, client: CogniteClient, categorized_relationships: CategorizedRelationships
Expand Down
3 changes: 3 additions & 0 deletions cognite/neat/workflows/steps/lib/graph_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ConfigureDefaultGraphStores(Step):

description = "This step initializes the source and solution graph stores."
category = CATEGORY
version = "private-alpha"
configurables: ClassVar[list[Configurable]] = [
Configurable(
name="source_rdf_store.type",
Expand Down Expand Up @@ -151,6 +152,7 @@ class ResetGraphStores(Step):

description = "This step resets graph stores to their initial state (clears all data)."
category = CATEGORY
version = "private-alpha"
configurables: ClassVar[list[Configurable]] = [
Configurable(
name="graph_name",
Expand Down Expand Up @@ -180,6 +182,7 @@ class ConfigureGraphStore(Step):
"""

description = "This step initializes the source and solution graph stores."
version = "private-beta"
category = CATEGORY
configurables: ClassVar[list[Configurable]] = [
Configurable(
Expand Down
1 change: 1 addition & 0 deletions cognite/neat/workflows/steps/lib/graph_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TransformSourceToSolutionGraph(Step):

description = "The step transforms source graph to solution graph"
category = CATEGORY
version = "private-alpha"
configurables: ClassVar[list[Configurable]] = [
Configurable(
name="cdf_lookup_database",
Expand Down
Loading
Loading