Skip to content

Commit

Permalink
Rename presentation-hierarchy-builder to presentation-hierarchies (
Browse files Browse the repository at this point in the history
  • Loading branch information
grigasp authored Mar 20, 2024
1 parent 72b2190 commit 02c1741
Show file tree
Hide file tree
Showing 136 changed files with 247 additions and 253 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
paths:
- apps/performance-tests/**
- packages/core-interop/**
- packages/hierarchy-builder/**
- packages/hierarchies/**
- packages/models-tree/**
- pnpm-lock.yaml
- .github/workflows/benchmark-pr.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
paths:
- apps/performance-tests/**
- packages/core-interop/**
- packages/hierarchy-builder/**
- packages/hierarchies/**
- packages/models-tree/**

jobs:
Expand Down
20 changes: 14 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"name": "[test-app] Start Frontend Server",
"cwd": "${workspaceRoot}/apps/test-app/frontend",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "start"]
"runtimeArgs": [
"run",
"start"
]
},
{
"type": "node",
Expand Down Expand Up @@ -131,25 +134,30 @@
"type": "node",
"request": "launch",
"runtimeExecutable": "npx",
"runtimeArgs": ["mocha", "--config", "./.mocharc.json", "./lib/*test.js"],
"runtimeArgs": [
"mocha",
"--config",
"./.mocharc.json",
"./lib/*test.js"
],
"env": {
"NODE_OPTIONS": "--enable-source-maps"
}
},
{
"name": "Tests: Hierarchy builder",
"cwd": "${workspaceFolder}/packages/hierarchy-builder",
"cwd": "${workspaceFolder}/packages/hierarchies",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/packages/hierarchy-builder/node_modules/mocha/bin/_mocha",
"program": "${workspaceFolder}/packages/hierarchies/node_modules/mocha/bin/_mocha",
"args": [
"--config",
"./.mocharc.json",
"--no-timeouts",
"lib/cjs/test/**/*.test.js"
],
"outFiles": [
"${workspaceFolder}/packages/hierarchy-builder/lib/**/*.js"
"${workspaceFolder}/packages/hierarchies/lib/**/*.js"
],
"env": {
"NODE_ENV": "development"
Expand Down Expand Up @@ -188,7 +196,7 @@
"outFiles": [
"${workspaceFolder}/packages/components/lib/**/*.js",
"${workspaceFolder}/packages/core-interop/lib/**/*.js",
"${workspaceFolder}/packages/hierarchy-builder/lib/**/*.js",
"${workspaceFolder}/packages/hierarchies/lib/**/*.js",
"${workspaceFolder}/packages/models-tree/lib/**/*.js",
"${workspaceFolder}/packages/testing/lib/**/*.js",
"${workspaceFolder}/packages/full-stack-tests/lib/**/*.js"
Expand Down
4 changes: 2 additions & 2 deletions apps/load-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Script to run the scenario: `npm run start:full-models-tree`.

#### Full Models tree load - stateless implementation

The scenario simulates 1 user fully loading the Models Tree hierarchy using the `@itwin/presentation-hierarchy-builder` package that makes `IModelReadRpcInterface-queryRows` RPC calls to execute ECSQL queries.
The scenario simulates 1 user fully loading the Models Tree hierarchy using the `@itwin/presentation-hierarchies` package that makes `IModelReadRpcInterface-queryRows` RPC calls to execute ECSQL queries.

Script to run the scenario: `npm run start:full-models-tree-stateless`.

Expand All @@ -49,7 +49,7 @@ Script to run the scenario: `npm run start:initial-models-tree`.

#### Initial Models tree load - stateless implementation

The scenario simulates 1 user loading 2 first levels of Models Tree hierarchy using the `@itwin/presentation-hierarchy-builder` package that makes `IModelReadRpcInterface-queryRows` RPC calls to execute ECSQL queries.
The scenario simulates 1 user loading 2 first levels of Models Tree hierarchy using the `@itwin/presentation-hierarchies` package that makes `IModelReadRpcInterface-queryRows` RPC calls to execute ECSQL queries.

Script to run the scenario: `npm run start:initial-models-tree-stateless`.

Expand Down
2 changes: 1 addition & 1 deletion apps/load-tests/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@itwin/ecschema-rpcinterface-common": "^4.4.0",
"@itwin/eslint-plugin": "4.0.0-dev.48",
"@itwin/presentation-common": "^4.4.0",
"@itwin/presentation-hierarchy-builder": "workspace:*",
"@itwin/presentation-hierarchies": "workspace:*",
"@itwin/presentation-core-interop": "workspace:*",
"@itwin/presentation-models-tree": "workspace:*",
"@types/artillery": "^1.7.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Guid, StopWatch } from "@itwin/core-bentley";
import { DbQueryRequest, DbQueryResponse, DbRequestExecutor, ECSqlReader } from "@itwin/core-common";
import { ISchemaLocater, Schema, SchemaContext, SchemaInfo, SchemaKey, SchemaMatchType, SchemaProps } from "@itwin/ecschema-metadata";
import { createECSqlQueryExecutor, createMetadataProvider } from "@itwin/presentation-core-interop";
import { createLimitingECSqlQueryExecutor, HierarchyNode, HierarchyProvider } from "@itwin/presentation-hierarchy-builder";
import { createLimitingECSqlQueryExecutor, HierarchyNode, HierarchyProvider } from "@itwin/presentation-hierarchies";
import { ModelsTreeDefinition } from "@itwin/presentation-models-tree";
import { doRequest, getCurrentIModelName, getCurrentIModelPath, loadNodes } from "./common";

Expand Down
2 changes: 1 addition & 1 deletion apps/performance-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@itwin/core-common": "^4.4.0",
"@itwin/ecschema-metadata": "^4.4.0",
"@itwin/presentation-core-interop": "workspace:*",
"@itwin/presentation-hierarchy-builder": "workspace:*",
"@itwin/presentation-hierarchies": "workspace:*",
"@itwin/presentation-models-tree": "workspace:*",
"as-table": "^1.0.55",
"blocked": "^1.3.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/performance-tests/src/StatelessHierarchyProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
HierarchyProvider,
IHierarchyLevelDefinitionsFactory,
IMetadataProvider,
} from "@itwin/presentation-hierarchy-builder";
} from "@itwin/presentation-hierarchies";

export interface ProviderOptions {
iModel: IModelDb;
Expand Down
2 changes: 1 addition & 1 deletion apps/performance-tests/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { IModelHost } from "@itwin/core-backend";
import { Logger, LogLevel } from "@itwin/core-bentley";
import { createLogger } from "@itwin/presentation-core-interop";
import { setLogger } from "@itwin/presentation-hierarchy-builder";
import { setLogger } from "@itwin/presentation-hierarchies";
import { Datasets } from "./Datasets";

before(async () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/performance-tests/src/stateless.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { expect } from "chai";
import { IModelDb, PhysicalElement, SnapshotDb } from "@itwin/core-backend";
import { IMetadataProvider, NodeSelectClauseProps, NodeSelectQueryFactory } from "@itwin/presentation-hierarchy-builder";
import { IMetadataProvider, NodeSelectClauseProps, NodeSelectQueryFactory } from "@itwin/presentation-hierarchies";
import { ModelsTreeDefinition } from "@itwin/presentation-models-tree";
import { Datasets, IModelName } from "./Datasets";
import { ProviderOptions, StatelessHierarchyProvider } from "./StatelessHierarchyProvider";
Expand Down
2 changes: 1 addition & 1 deletion apps/test-app/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@itwin/presentation-common": "^4.4.0",
"@itwin/presentation-components": "workspace:*",
"@itwin/presentation-frontend": "^4.4.0",
"@itwin/presentation-hierarchy-builder": "workspace:*",
"@itwin/presentation-hierarchies": "workspace:*",
"@itwin/presentation-hierarchies-react": "workspace:*",
"@itwin/presentation-core-interop": "workspace:*",
"@itwin/presentation-models-tree": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ import {
} from "@itwin/presentation-components";
import { createECSqlQueryExecutor, createHierarchyLevelDescriptor, createMetadataProvider } from "@itwin/presentation-core-interop";
import { Presentation } from "@itwin/presentation-frontend";
import {
createLimitingECSqlQueryExecutor,
GenericInstanceFilter,
HierarchyProvider,
ILimitingECSqlQueryExecutor,
IMetadataProvider,
NonGroupingHierarchyNode,
TypedPrimitiveValue,
} from "@itwin/presentation-hierarchies";
import {
HierarchyLevelFilteringOptions,
PresentationHierarchyNode,
Expand All @@ -28,15 +37,6 @@ import {
UnifiedSelectionStore,
useUnifiedSelectionTree,
} from "@itwin/presentation-hierarchies-react";
import {
createLimitingECSqlQueryExecutor,
GenericInstanceFilter,
HierarchyProvider,
ILimitingECSqlQueryExecutor,
IMetadataProvider,
NonGroupingHierarchyNode,
TypedPrimitiveValue,
} from "@itwin/presentation-hierarchy-builder";
import { ModelsTreeDefinition } from "@itwin/presentation-models-tree";

interface MetadataProviders {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { useCallback, useEffect, useRef, useState } from "react";
import { RenderedItemsRange, TreeDataProvider, TreeModelSource, TreeNodeLoader } from "@itwin/components-react";
import { HierarchyProvider, IPrimitiveValueFormatter } from "@itwin/presentation-hierarchy-builder";
import { HierarchyProvider, IPrimitiveValueFormatter } from "@itwin/presentation-hierarchies";
import { startTreeReload } from "./TreeReloader";

interface ControlledTreeComponents {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
IMetadataProvider,
RowsLimitExceededError,
TypedPrimitiveValue,
} from "@itwin/presentation-hierarchy-builder";
} from "@itwin/presentation-hierarchies";
import { ModelsTreeDefinition } from "@itwin/presentation-models-tree";
import { TreeWidgetHeader, useTreeHeight } from "../TreeHeader";
import { TreeWidgetProps } from "../TreeWidget";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { PropertyRecord } from "@itwin/appui-abstract";
import { DelayLoadedTreeNodeItem, TreeNodeItem } from "@itwin/components-react";
import { InfoTreeNodeItemType, PresentationInfoTreeNodeItem } from "@itwin/presentation-components";
import { HierarchyNode, HierarchyNodeKey } from "@itwin/presentation-hierarchy-builder";
import { HierarchyNode, HierarchyNodeKey } from "@itwin/presentation-hierarchies";

export function getHierarchyNode(item: TreeNodeItem): HierarchyNode | undefined {
if ("__internal" in item) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Guid, IDisposable } from "@itwin/core-bentley";
import { IModelConnection } from "@itwin/core-frontend";
import { GroupingNodeKey, Key, KeySet, PresentationQuery, PresentationQueryBinding, StandardNodeTypes } from "@itwin/presentation-common";
import { Presentation, SelectionChangeEventArgs, SelectionChangeType, SelectionHandler } from "@itwin/presentation-frontend";
import { HierarchyNode, InstanceKey, parseFullClassName } from "@itwin/presentation-hierarchy-builder";
import { HierarchyNode, InstanceKey, parseFullClassName } from "@itwin/presentation-hierarchies";
import { getHierarchyNode, serializeNodeKey } from "./TreeNodeItemUtils";

export interface UnifiedSelectionTreeEventHandlerParams {
Expand Down
12 changes: 6 additions & 6 deletions packages/core-interop/api/presentation-core-interop.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import { ContentDescriptorRequestOptions } from '@itwin/presentation-common';
import { Descriptor } from '@itwin/presentation-common';
import { ECSqlReader } from '@itwin/core-common';
import { HierarchyProvider } from '@itwin/presentation-hierarchy-builder';
import { IECSqlQueryExecutor } from '@itwin/presentation-hierarchy-builder';
import { ILogger } from '@itwin/presentation-hierarchy-builder';
import { IMetadataProvider } from '@itwin/presentation-hierarchy-builder';
import { IPrimitiveValueFormatter } from '@itwin/presentation-hierarchy-builder';
import { HierarchyProvider } from '@itwin/presentation-hierarchies';
import { IECSqlQueryExecutor } from '@itwin/presentation-hierarchies';
import { ILogger } from '@itwin/presentation-hierarchies';
import { IMetadataProvider } from '@itwin/presentation-hierarchies';
import { IPrimitiveValueFormatter } from '@itwin/presentation-hierarchies';
import { KeySet } from '@itwin/presentation-common';
import { NonGroupingHierarchyNode } from '@itwin/presentation-hierarchy-builder';
import { NonGroupingHierarchyNode } from '@itwin/presentation-hierarchies';
import { QueryBinder } from '@itwin/core-common';
import { QueryOptions } from '@itwin/core-common';
import { RulesetVariable } from '@itwin/presentation-common';
Expand Down
6 changes: 3 additions & 3 deletions packages/core-interop/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@itwin/presentation-core-interop",
"version": "0.0.0",
"description": "A package that has peer dependencies on both `@itwin/presentation-hierarchy-builder` and core packages and provides an interop layer between them.",
"description": "A package that has peer dependencies on both `@itwin/presentation-hierarchies` and core packages and provides an interop layer between them.",
"private": true,
"repository": {
"type": "git",
Expand Down Expand Up @@ -44,7 +44,7 @@
"@itwin/core-quantity": "^4.1.0",
"@itwin/ecschema-metadata": "^4.1.0",
"@itwin/presentation-common": "^4.1.0",
"@itwin/presentation-hierarchy-builder": "workspace:^"
"@itwin/presentation-hierarchies": "workspace:^"
},
"devDependencies": {
"@itwin/build-tools": "^4.4.0",
Expand All @@ -58,7 +58,7 @@
"@types/chai-as-promised": "^7.1.8",
"@types/mocha": "^10.0.6",
"@itwin/presentation-common": "^4.4.0",
"@itwin/presentation-hierarchy-builder": "workspace:^",
"@itwin/presentation-hierarchies": "workspace:^",
"@types/sinon": "^17.0.3",
"@types/sinon-chai": "^3.2.12",
"chai": "^4.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-interop/src/core-interop/Formatting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
SchemaUnitProvider,
Unit,
} from "@itwin/ecschema-metadata";
import { createDefaultValueFormatter, IPrimitiveValueFormatter, parseFullClassName, TypedPrimitiveValue } from "@itwin/presentation-hierarchy-builder";
import { createDefaultValueFormatter, IPrimitiveValueFormatter, parseFullClassName, TypedPrimitiveValue } from "@itwin/presentation-hierarchies";

/**
* Creates a formatter that knows how to format values of properties with assigned kind of quantity. In case the property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
InstancesNodeKey,
NodeSelectClauseColumnNames,
NonGroupingHierarchyNode,
} from "@itwin/presentation-hierarchy-builder";
} from "@itwin/presentation-hierarchies";
import { ICoreECSqlReaderFactory } from "./QueryExecutor";

/**
Expand Down Expand Up @@ -124,7 +124,7 @@ function recursivelyGetInstanceKeys(
visible.pipe(map(({ key }) => key)),
// return child node keys of hidden instances
hidden.pipe(
// handling similar to `createHideNodesInHierarchyOperator` in `presentation-hierarchy-builder` package - first
// handling similar to `createHideNodesInHierarchyOperator` in `presentation-hierarchies` package - first
// merge all keys by class
reduce<{ key: InstanceKey; hide: boolean }, InstanceClassMergeMap>((acc, { key }) => {
addToMergeMap(acc, key);
Expand Down
2 changes: 1 addition & 1 deletion packages/core-interop/src/core-interop/Logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { Logger as CoreLogger, LogLevel as CoreLogLevel } from "@itwin/core-bentley";
import { ILogger, LogLevel } from "@itwin/presentation-hierarchy-builder";
import { ILogger, LogLevel } from "@itwin/presentation-hierarchies";

/**
* Create an `ILogger` that uses [Logger]($core-bentley) API to log messages.
Expand Down
2 changes: 1 addition & 1 deletion packages/core-interop/src/core-interop/Metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { SchemaContext, SchemaKey } from "@itwin/ecschema-metadata";
import { IMetadataProvider } from "@itwin/presentation-hierarchy-builder";
import { IMetadataProvider } from "@itwin/presentation-hierarchies";
import { createECSchema } from "./MetadataInternal";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/core-interop/src/core-interop/MetadataInternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import {
ECStructArrayProperty,
ECStructClass,
ECStructProperty,
} from "@itwin/presentation-hierarchy-builder";
} from "@itwin/presentation-hierarchies";

/** @internal */
export function createECSchema(schema: CoreSchema): ECSchema {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-interop/src/core-interop/QueryExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { OrderedId64Iterable } from "@itwin/core-bentley";
import { ECSqlReader, QueryBinder, QueryOptions, QueryOptionsBuilder, QueryRowFormat } from "@itwin/core-common";
import { Point2d, Point3d } from "@itwin/core-geometry";
import { ECSqlBinding, ECSqlQueryReader, ECSqlQueryReaderOptions, ECSqlQueryRow, IECSqlQueryExecutor } from "@itwin/presentation-hierarchy-builder";
import { ECSqlBinding, ECSqlQueryReader, ECSqlQueryReaderOptions, ECSqlQueryRow, IECSqlQueryExecutor } from "@itwin/presentation-hierarchies";

/**
* An interface for something that knows how to create an `ECSqlReader`. Generally, this represents either [IModelDb]($core-backend)
Expand Down
2 changes: 1 addition & 1 deletion packages/core-interop/src/test/Formatting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
Unit,
UnitSystem,
} from "@itwin/ecschema-metadata";
import { IPrimitiveValueFormatter, TypedPrimitiveValue } from "@itwin/presentation-hierarchy-builder";
import { IPrimitiveValueFormatter, TypedPrimitiveValue } from "@itwin/presentation-hierarchies";
import { createValueFormatter } from "../core-interop/Formatting";

describe("createValueFormatter", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ import {
KeySet,
Ruleset,
} from "@itwin/presentation-common";
import {
DefineHierarchyLevelProps,
ECSqlQueryDef,
HierarchyNode,
HierarchyProvider,
InstanceKey,
InstancesNodeKey,
} from "@itwin/presentation-hierarchy-builder";
import { DefineHierarchyLevelProps, ECSqlQueryDef, HierarchyNode, HierarchyProvider, InstanceKey, InstancesNodeKey } from "@itwin/presentation-hierarchies";
import { createHierarchyLevelDescriptor } from "../core-interop/HierarchyLevelDescriptor";

describe("createHierarchyLevelDescriptor", () => {
Expand Down
Loading

0 comments on commit 02c1741

Please sign in to comment.