Move the v1 explorer to explorer/legacy

This is a bulk rename of all the old explorer code into
`explorer/legacy`. Now that the timeline explorer exists, I intend to
prioritize development on that going forwards. Once the timeline
explorer is as good as the old explorer at decomposing a node's sources
of cred, I will remove the legacy explorer entirely.

Test plan: `yarn test`
This commit is contained in:
Dandelion Mané 2019-07-11 02:17:08 +01:00
parent 5dc7f440ce
commit 93ceb9ca05
27 changed files with 118 additions and 118 deletions

View File

@ -2,19 +2,19 @@
import React from "react"; import React from "react";
import type {Assets} from "../webutil/assets"; import type {Assets} from "../../webutil/assets";
import type {LocalStore} from "../webutil/localStore"; import type {LocalStore} from "../../webutil/localStore";
import CheckedLocalStore from "../webutil/checkedLocalStore"; import CheckedLocalStore from "../../webutil/checkedLocalStore";
import BrowserLocalStore from "../webutil/browserLocalStore"; import BrowserLocalStore from "../../webutil/browserLocalStore";
import Link from "../webutil/Link"; import Link from "../../webutil/Link";
import type {RepoId} from "../core/repoId"; import type {RepoId} from "../../core/repoId";
import {type NodeAddressT} from "../core/graph"; import {type NodeAddressT} from "../../core/graph";
import {PagerankTable} from "./pagerankTable/Table"; import {PagerankTable} from "./pagerankTable/Table";
import {WeightConfig} from "./weights/WeightConfig"; import {WeightConfig} from "../weights/WeightConfig";
import {WeightsFileManager} from "./weights/WeightsFileManager"; import {WeightsFileManager} from "../weights/WeightsFileManager";
import {type Weights, defaultWeights} from "../analysis/weights"; import {type Weights, defaultWeights} from "../../analysis/weights";
import {Prefix as GithubPrefix} from "../plugins/github/nodes"; import {Prefix as GithubPrefix} from "../../plugins/github/nodes";
import { import {
createStateTransitionMachine, createStateTransitionMachine,
type AppState, type AppState,
@ -22,7 +22,7 @@ import {
initialState, initialState,
} from "./state"; } from "./state";
import {StaticExplorerAdapterSet} from "./adapters/explorerAdapterSet"; import {StaticExplorerAdapterSet} from "./adapters/explorerAdapterSet";
import {userNodeType} from "../plugins/github/declaration"; import {userNodeType} from "../../plugins/github/declaration";
const credOverviewUrl = const credOverviewUrl =
"https://discourse.sourcecred.io/t/a-gentle-introduction-to-cred/20"; "https://discourse.sourcecred.io/t/a-gentle-introduction-to-cred/20";

View File

@ -3,10 +3,10 @@
import React from "react"; import React from "react";
import {shallow} from "enzyme"; import {shallow} from "enzyme";
import {Graph} from "../core/graph"; import {Graph} from "../../core/graph";
import {makeRepoId} from "../core/repoId"; import {makeRepoId} from "../../core/repoId";
import {Assets} from "../webutil/assets"; import {Assets} from "../../webutil/assets";
import testLocalStore from "../webutil/testLocalStore"; import testLocalStore from "../../webutil/testLocalStore";
import { import {
DynamicExplorerAdapterSet, DynamicExplorerAdapterSet,
StaticExplorerAdapterSet, StaticExplorerAdapterSet,
@ -15,9 +15,9 @@ import {
import {PagerankTable} from "./pagerankTable/Table"; import {PagerankTable} from "./pagerankTable/Table";
import {createApp, LoadingIndicator, ProjectDetail} from "./App"; import {createApp, LoadingIndicator, ProjectDetail} from "./App";
require("../webutil/testUtil").configureEnzyme(); require("../../webutil/testUtil").configureEnzyme();
describe("explorer/App", () => { describe("explorer/legacy/App", () => {
function example() { function example() {
let setState, getState; let setState, getState;
const loadGraph = jest.fn(); const loadGraph = jest.fn();

View File

@ -1,10 +1,10 @@
// @flow // @flow
import {type Node as ReactNode} from "react"; import {type Node as ReactNode} from "react";
import {Graph, type NodeAddressT} from "../../core/graph"; import {Graph, type NodeAddressT} from "../../../core/graph";
import type {Assets} from "../../webutil/assets"; import type {Assets} from "../../../webutil/assets";
import type {RepoId} from "../../core/repoId"; import type {RepoId} from "../../../core/repoId";
import type {PluginDeclaration} from "../../analysis/pluginDeclaration"; import type {PluginDeclaration} from "../../../analysis/pluginDeclaration";
export interface StaticExplorerAdapter { export interface StaticExplorerAdapter {
declaration(): PluginDeclaration; declaration(): PluginDeclaration;

View File

@ -11,18 +11,18 @@
* be paramterized over the adapter choice. * be paramterized over the adapter choice.
*/ */
import {Graph, type NodeAddressT, type EdgeAddressT} from "../../core/graph"; import {Graph, type NodeAddressT, type EdgeAddressT} from "../../../core/graph";
import {NodeTrie, EdgeTrie} from "../../core/trie"; import {NodeTrie, EdgeTrie} from "../../../core/trie";
import type {NodeAndEdgeTypes} from "../../analysis/types"; import type {NodeAndEdgeTypes} from "../../../analysis/types";
import {combineTypes} from "../../analysis/pluginDeclaration"; import {combineTypes} from "../../../analysis/pluginDeclaration";
import type {Assets} from "../../webutil/assets"; import type {Assets} from "../../../webutil/assets";
import type {RepoId} from "../../core/repoId"; import type {RepoId} from "../../../core/repoId";
import type { import type {
StaticExplorerAdapter, StaticExplorerAdapter,
DynamicExplorerAdapter, DynamicExplorerAdapter,
} from "./explorerAdapter"; } from "./explorerAdapter";
import type {EdgeType, NodeType} from "../../analysis/types"; import type {EdgeType, NodeType} from "../../../analysis/types";
export class StaticExplorerAdapterSet { export class StaticExplorerAdapterSet {
_adapters: $ReadOnlyArray<StaticExplorerAdapter>; _adapters: $ReadOnlyArray<StaticExplorerAdapter>;

View File

@ -1,13 +1,13 @@
// @flow // @flow
import {NodeAddress, EdgeAddress, Graph} from "../../core/graph"; import {NodeAddress, EdgeAddress, Graph} from "../../../core/graph";
import {FactorioStaticAdapter} from "../../plugins/demo/explorerAdapter"; import {FactorioStaticAdapter} from "../../../plugins/demo/explorerAdapter";
import {StaticExplorerAdapterSet} from "./explorerAdapterSet"; import {StaticExplorerAdapterSet} from "./explorerAdapterSet";
import {Assets} from "../../webutil/assets"; import {Assets} from "../../../webutil/assets";
import {makeRepoId} from "../../core/repoId"; import {makeRepoId} from "../../../core/repoId";
import * as NullUtil from "../../util/null"; import * as NullUtil from "../../../util/null";
describe("explorer/adapters/explorerAdapterSet", () => { describe("explorer/legacy/adapters/explorerAdapterSet", () => {
describe("StaticExplorerAdapterSet", () => { describe("StaticExplorerAdapterSet", () => {
function example() { function example() {
const x = new FactorioStaticAdapter(); const x = new FactorioStaticAdapter();

View File

@ -1,9 +1,9 @@
// @flow // @flow
import React from "react"; import React from "react";
import * as NullUtil from "../../util/null"; import * as NullUtil from "../../../util/null";
import type {NodeAddressT} from "../../core/graph"; import type {NodeAddressT} from "../../../core/graph";
import {ConnectionRowList} from "./Connection"; import {ConnectionRowList} from "./Connection";
import {aggregateFlat, type FlatAggregation, aggregationKey} from "./aggregate"; import {aggregateFlat, type FlatAggregation, aggregationKey} from "./aggregate";

View File

@ -3,9 +3,9 @@
import React from "react"; import React from "react";
import {shallow} from "enzyme"; import {shallow} from "enzyme";
import * as NullUtil from "../../util/null"; import * as NullUtil from "../../../util/null";
import {NodeAddress, EdgeAddress} from "../../core/graph"; import {NodeAddress, EdgeAddress} from "../../../core/graph";
import type {EdgeType, NodeType} from "../../analysis/types"; import type {EdgeType, NodeType} from "../../../analysis/types";
import { import {
AggregationRowList, AggregationRowList,
AggregationRow, AggregationRow,
@ -16,11 +16,11 @@ import {Badge} from "./shared";
import {example} from "./sharedTestUtils"; import {example} from "./sharedTestUtils";
import {aggregateFlat, type FlatAggregation} from "./aggregate"; import {aggregateFlat, type FlatAggregation} from "./aggregate";
import {TableRow} from "./TableRow"; import {TableRow} from "./TableRow";
import {nodes as factorioNodes} from "../../plugins/demo/graph"; import {nodes as factorioNodes} from "../../../plugins/demo/graph";
require("../../webutil/testUtil").configureEnzyme(); require("../../../webutil/testUtil").configureEnzyme();
describe("explorer/pagerankTable/Aggregation", () => { describe("explorer/legacy/pagerankTable/Aggregation", () => {
describe("AggregationRowList", () => { describe("AggregationRowList", () => {
it("instantiates AggregationRows for each aggregation", async () => { it("instantiates AggregationRows for each aggregation", async () => {
const {adapters, pnd, sharedProps} = await example(); const {adapters, pnd, sharedProps} = await example();

View File

@ -1,11 +1,11 @@
// @flow // @flow
import React from "react"; import React from "react";
import * as NullUtil from "../../util/null"; import * as NullUtil from "../../../util/null";
import type {NodeAddressT} from "../../core/graph"; import type {NodeAddressT} from "../../../core/graph";
import type {Connection} from "../../core/attribution/graphToMarkovChain"; import type {Connection} from "../../../core/attribution/graphToMarkovChain";
import type {ScoredConnection} from "../../analysis/pagerankNodeDecomposition"; import type {ScoredConnection} from "../../../analysis/pagerankNodeDecomposition";
import {DynamicExplorerAdapterSet} from "../adapters/explorerAdapterSet"; import {DynamicExplorerAdapterSet} from "../adapters/explorerAdapterSet";
import {TableRow} from "./TableRow"; import {TableRow} from "./TableRow";
import {NodeRow} from "./Node"; import {NodeRow} from "./Node";

View File

@ -2,18 +2,18 @@
import React from "react"; import React from "react";
import {shallow} from "enzyme"; import {shallow} from "enzyme";
import * as NullUtil from "../../util/null"; import * as NullUtil from "../../../util/null";
import type {Connection} from "../../core/attribution/graphToMarkovChain"; import type {Connection} from "../../../core/attribution/graphToMarkovChain";
import {ConnectionRowList, ConnectionRow, ConnectionView} from "./Connection"; import {ConnectionRowList, ConnectionRow, ConnectionView} from "./Connection";
import {example} from "./sharedTestUtils"; import {example} from "./sharedTestUtils";
import {TableRow} from "./TableRow"; import {TableRow} from "./TableRow";
import {NodeRow} from "./Node"; import {NodeRow} from "./Node";
import {nodes as factorioNodes} from "../../plugins/demo/graph"; import {nodes as factorioNodes} from "../../../plugins/demo/graph";
require("../../webutil/testUtil").configureEnzyme(); require("../../../webutil/testUtil").configureEnzyme();
describe("explorer/pagerankTable/Connection", () => { describe("explorer/legacy/pagerankTable/Connection", () => {
describe("ConnectionRowList", () => { describe("ConnectionRowList", () => {
async function setup(maxEntriesPerList: number = 123) { async function setup(maxEntriesPerList: number = 123) {
let {sharedProps} = await example(); let {sharedProps} = await example();

View File

@ -2,9 +2,9 @@
import React from "react"; import React from "react";
import sortBy from "lodash.sortby"; import sortBy from "lodash.sortby";
import * as NullUtil from "../../util/null"; import * as NullUtil from "../../../util/null";
import {type NodeAddressT} from "../../core/graph"; import {type NodeAddressT} from "../../../core/graph";
import {TableRow} from "./TableRow"; import {TableRow} from "./TableRow";
import { import {
MIN_SLIDER, MIN_SLIDER,
@ -12,7 +12,7 @@ import {
formatWeight, formatWeight,
sliderToWeight, sliderToWeight,
weightToSlider, weightToSlider,
} from "../weights/WeightSlider"; } from "../../weights/WeightSlider";
import {nodeDescription, type SharedProps} from "./shared"; import {nodeDescription, type SharedProps} from "./shared";

View File

@ -3,7 +3,7 @@
import React from "react"; import React from "react";
import {shallow} from "enzyme"; import {shallow} from "enzyme";
import sortBy from "lodash.sortby"; import sortBy from "lodash.sortby";
import * as NullUtil from "../../util/null"; import * as NullUtil from "../../../util/null";
import {TableRow} from "./TableRow"; import {TableRow} from "./TableRow";
import {AggregationRowList} from "./Aggregation"; import {AggregationRowList} from "./Aggregation";
import { import {
@ -11,18 +11,18 @@ import {
MAX_SLIDER, MAX_SLIDER,
sliderToWeight, sliderToWeight,
weightToSlider, weightToSlider,
} from "../weights/WeightSlider"; } from "../../weights/WeightSlider";
import type {NodeAddressT} from "../../core/graph"; import type {NodeAddressT} from "../../../core/graph";
import {nodeDescription} from "./shared"; import {nodeDescription} from "./shared";
import {example} from "./sharedTestUtils"; import {example} from "./sharedTestUtils";
import {NodeRowList, NodeRow, type NodeRowProps} from "./Node"; import {NodeRowList, NodeRow, type NodeRowProps} from "./Node";
import {nodes as factorioNodes} from "../../plugins/demo/graph"; import {nodes as factorioNodes} from "../../../plugins/demo/graph";
require("../../webutil/testUtil").configureEnzyme(); require("../../../webutil/testUtil").configureEnzyme();
describe("explorer/pagerankTable/Node", () => { describe("explorer/legacy/pagerankTable/Node", () => {
describe("NodeRowList", () => { describe("NodeRowList", () => {
function sortedByScore(nodes: $ReadOnlyArray<NodeAddressT>, pnd) { function sortedByScore(nodes: $ReadOnlyArray<NodeAddressT>, pnd) {
return sortBy(nodes, (node) => -NullUtil.get(pnd.get(node)).score); return sortBy(nodes, (node) => -NullUtil.get(pnd.get(node)).score);

View File

@ -3,14 +3,14 @@
import React from "react"; import React from "react";
import sortBy from "lodash.sortby"; import sortBy from "lodash.sortby";
import {WeightConfig} from "../weights/WeightConfig"; import {WeightConfig} from "../../weights/WeightConfig";
import {WeightsFileManager} from "../weights/WeightsFileManager"; import {WeightsFileManager} from "../../weights/WeightsFileManager";
import {NodeAddress, type NodeAddressT} from "../../core/graph"; import {NodeAddress, type NodeAddressT} from "../../../core/graph";
import type {PagerankNodeDecomposition} from "../../analysis/pagerankNodeDecomposition"; import type {PagerankNodeDecomposition} from "../../../analysis/pagerankNodeDecomposition";
import {DynamicExplorerAdapterSet} from "../adapters/explorerAdapterSet"; import {DynamicExplorerAdapterSet} from "../adapters/explorerAdapterSet";
import type {DynamicExplorerAdapter} from "../adapters/explorerAdapter"; import type {DynamicExplorerAdapter} from "../adapters/explorerAdapter";
import {NodeRowList} from "./Node"; import {NodeRowList} from "./Node";
import {type NodeType} from "../../analysis/types"; import {type NodeType} from "../../../analysis/types";
type PagerankTableProps = {| type PagerankTableProps = {|
+pnd: PagerankNodeDecomposition, +pnd: PagerankNodeDecomposition,

View File

@ -3,16 +3,16 @@
import React from "react"; import React from "react";
import {shallow} from "enzyme"; import {shallow} from "enzyme";
import {NodeAddress} from "../../core/graph"; import {NodeAddress} from "../../../core/graph";
import {PagerankTable} from "./Table"; import {PagerankTable} from "./Table";
import {example, COLUMNS} from "./sharedTestUtils"; import {example, COLUMNS} from "./sharedTestUtils";
import {NodeRowList} from "./Node"; import {NodeRowList} from "./Node";
import {WeightConfig} from "../weights/WeightConfig"; import {WeightConfig} from "../../weights/WeightConfig";
import {type NodeType} from "../../analysis/types"; import {type NodeType} from "../../../analysis/types";
require("../../webutil/testUtil").configureEnzyme(); require("../../../webutil/testUtil").configureEnzyme();
describe("explorer/pagerankTable/Table", () => { describe("explorer/legacy/pagerankTable/Table", () => {
describe("PagerankTable", () => { describe("PagerankTable", () => {
async function setup(defaultNodeType?: NodeType) { async function setup(defaultNodeType?: NodeType) {
const { const {

View File

@ -5,10 +5,10 @@ import {shallow} from "enzyme";
import {TableRow, PaddingRow} from "./TableRow"; import {TableRow, PaddingRow} from "./TableRow";
import {COLUMNS} from "./sharedTestUtils"; import {COLUMNS} from "./sharedTestUtils";
require("../../webutil/testUtil").configureEnzyme(); require("../../../webutil/testUtil").configureEnzyme();
require("../../webutil/testUtil").configureAphrodite(); require("../../../webutil/testUtil").configureAphrodite();
describe("explorer/pagerankTable/TableRow", () => { describe("explorer/legacy/pagerankTable/TableRow", () => {
function example() { function example() {
return shallow( return shallow(
<TableRow <TableRow

View File

@ -1,8 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`explorer/pagerankTable/Table PagerankTable has a filter select with expected label text 1`] = `"Filter by node type: "`; exports[`explorer/legacy/pagerankTable/Table PagerankTable has a filter select with expected label text 1`] = `"Filter by node type: "`;
exports[`explorer/pagerankTable/Table PagerankTable has a filter select with expected option groups 1`] = ` exports[`explorer/legacy/pagerankTable/Table PagerankTable has a filter select with expected option groups 1`] = `
Array [ Array [
Object { Object {
"style": undefined, "style": undefined,

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`explorer/pagerankTable/TableRow depth parameter changes the color, but not the indentation 1`] = ` exports[`explorer/legacy/pagerankTable/TableRow depth parameter changes the color, but not the indentation 1`] = `
Object { Object {
"buttonStyle": Object { "buttonStyle": Object {
"marginLeft": 20, "marginLeft": 20,
@ -14,7 +14,7 @@ Object {
} }
`; `;
exports[`explorer/pagerankTable/TableRow depth parameter changes the color, but not the indentation 2`] = ` exports[`explorer/legacy/pagerankTable/TableRow depth parameter changes the color, but not the indentation 2`] = `
Object { Object {
"buttonStyle": Object { "buttonStyle": Object {
"marginLeft": 20, "marginLeft": 20,
@ -28,7 +28,7 @@ Object {
} }
`; `;
exports[`explorer/pagerankTable/TableRow depth parameter changes the color, but not the indentation 3`] = ` exports[`explorer/legacy/pagerankTable/TableRow depth parameter changes the color, but not the indentation 3`] = `
Object { Object {
"buttonStyle": Object { "buttonStyle": Object {
"marginLeft": 20, "marginLeft": 20,
@ -42,7 +42,7 @@ Object {
} }
`; `;
exports[`explorer/pagerankTable/TableRow indent parameter changes the button indentation 1`] = ` exports[`explorer/legacy/pagerankTable/TableRow indent parameter changes the button indentation 1`] = `
Object { Object {
"buttonStyle": Object { "buttonStyle": Object {
"marginLeft": 5, "marginLeft": 5,
@ -56,7 +56,7 @@ Object {
} }
`; `;
exports[`explorer/pagerankTable/TableRow indent parameter changes the button indentation 2`] = ` exports[`explorer/legacy/pagerankTable/TableRow indent parameter changes the button indentation 2`] = `
Object { Object {
"buttonStyle": Object { "buttonStyle": Object {
"marginLeft": 20, "marginLeft": 20,
@ -70,7 +70,7 @@ Object {
} }
`; `;
exports[`explorer/pagerankTable/TableRow indent parameter changes the button indentation 3`] = ` exports[`explorer/legacy/pagerankTable/TableRow indent parameter changes the button indentation 3`] = `
Object { Object {
"buttonStyle": Object { "buttonStyle": Object {
"marginLeft": 35, "marginLeft": 35,

View File

@ -2,12 +2,12 @@
import sortBy from "lodash.sortby"; import sortBy from "lodash.sortby";
import stringify from "json-stable-stringify"; import stringify from "json-stable-stringify";
import * as MapUtil from "../../util/map"; import * as MapUtil from "../../../util/map";
import * as NullUtil from "../../util/null"; import * as NullUtil from "../../../util/null";
import {NodeTrie, EdgeTrie} from "../../core/trie"; import {NodeTrie, EdgeTrie} from "../../../core/trie";
import {NodeAddress, EdgeAddress} from "../../core/graph"; import {NodeAddress, EdgeAddress} from "../../../core/graph";
import {type EdgeType, type NodeType} from "../../analysis/types"; import {type EdgeType, type NodeType} from "../../../analysis/types";
import type {ScoredConnection} from "../../analysis/pagerankNodeDecomposition"; import type {ScoredConnection} from "../../../analysis/pagerankNodeDecomposition";
// Sorted by descending `summary.score` // Sorted by descending `summary.score`
export type FlatAggregations = $ReadOnlyArray<FlatAggregation>; export type FlatAggregations = $ReadOnlyArray<FlatAggregation>;

View File

@ -1,7 +1,7 @@
// @flow // @flow
import {EdgeAddress, NodeAddress, type NodeAddressT} from "../../core/graph"; import {EdgeAddress, NodeAddress, type NodeAddressT} from "../../../core/graph";
import * as NullUtil from "../../util/null"; import * as NullUtil from "../../../util/null";
import { import {
aggregateByNodeType, aggregateByNodeType,
aggregateByConnectionType, aggregateByConnectionType,
@ -11,9 +11,9 @@ import {
fallbackEdgeType, fallbackEdgeType,
fallbackNodeType, fallbackNodeType,
} from "./aggregate"; } from "./aggregate";
import {type NodeType} from "../../analysis/types"; import {type NodeType} from "../../../analysis/types";
describe("explorer/pagerankTable/aggregate", () => { describe("explorer/legacy/pagerankTable/aggregate", () => {
// TODO: If making major modifications to these tests, consider switching // TODO: If making major modifications to these tests, consider switching
// from the hand-maintained connections and types, and instead use the demo // from the hand-maintained connections and types, and instead use the demo
// adadpters from app/adapters/demoAdapters // adadpters from app/adapters/demoAdapters

View File

@ -5,11 +5,11 @@ import {
type EdgeAddressT, type EdgeAddressT,
type NodeAddressT, type NodeAddressT,
NodeAddress, NodeAddress,
} from "../../core/graph"; } from "../../../core/graph";
import {DynamicExplorerAdapterSet} from "../adapters/explorerAdapterSet"; import {DynamicExplorerAdapterSet} from "../adapters/explorerAdapterSet";
import type {PagerankNodeDecomposition} from "../../analysis/pagerankNodeDecomposition"; import type {PagerankNodeDecomposition} from "../../../analysis/pagerankNodeDecomposition";
export function nodeDescription( export function nodeDescription(
address: NodeAddressT, address: NodeAddressT,

View File

@ -2,9 +2,9 @@
import React from "react"; import React from "react";
import {type NodeAddressT} from "../../core/graph"; import {type NodeAddressT} from "../../../core/graph";
import {pagerank} from "../../analysis/pagerank"; import {pagerank} from "../../../analysis/pagerank";
import {dynamicExplorerAdapterSet} from "../../plugins/demo/explorerAdapter"; import {dynamicExplorerAdapterSet} from "../../../plugins/demo/explorerAdapter";
import type {SharedProps} from "./shared"; import type {SharedProps} from "./shared";
export const COLUMNS = () => ["Description", "", "Cred"]; export const COLUMNS = () => ["Description", "", "Cred"];

View File

@ -2,23 +2,23 @@
import deepEqual from "lodash.isequal"; import deepEqual from "lodash.isequal";
import {Graph, type NodeAddressT} from "../core/graph"; import {Graph, type NodeAddressT} from "../../core/graph";
import type {Assets} from "../webutil/assets"; import type {Assets} from "../../webutil/assets";
import type {RepoId} from "../core/repoId"; import type {RepoId} from "../../core/repoId";
import {type EdgeEvaluator} from "../analysis/pagerank"; import {type EdgeEvaluator} from "../../analysis/pagerank";
import type {NodeAndEdgeTypes} from "../analysis/types"; import type {NodeAndEdgeTypes} from "../../analysis/types";
import { import {
type PagerankNodeDecomposition, type PagerankNodeDecomposition,
type PagerankOptions, type PagerankOptions,
pagerank, pagerank,
} from "../analysis/pagerank"; } from "../../analysis/pagerank";
import { import {
StaticExplorerAdapterSet, StaticExplorerAdapterSet,
DynamicExplorerAdapterSet, DynamicExplorerAdapterSet,
} from "./adapters/explorerAdapterSet"; } from "./adapters/explorerAdapterSet";
import type {Weights} from "../analysis/weights"; import type {Weights} from "../../analysis/weights";
import {weightsToEdgeEvaluator} from "../analysis/weightsToEdgeEvaluator"; import {weightsToEdgeEvaluator} from "../../analysis/weightsToEdgeEvaluator";
/* /*
This models the UI states of the credExplorer/App as a state machine. This models the UI states of the credExplorer/App as a state machine.

View File

@ -6,11 +6,11 @@ import {
type GraphWithAdapters, type GraphWithAdapters,
} from "./state"; } from "./state";
import {Graph, NodeAddress} from "../core/graph"; import {Graph, NodeAddress} from "../../core/graph";
import {Assets} from "../webutil/assets"; import {Assets} from "../../webutil/assets";
import {makeRepoId, type RepoId} from "../core/repoId"; import {makeRepoId, type RepoId} from "../../core/repoId";
import {type EdgeEvaluator} from "../analysis/pagerank"; import {type EdgeEvaluator} from "../../analysis/pagerank";
import {defaultWeights} from "../analysis/weights"; import {defaultWeights} from "../../analysis/weights";
import { import {
StaticExplorerAdapterSet, StaticExplorerAdapterSet,
DynamicExplorerAdapterSet, DynamicExplorerAdapterSet,
@ -18,9 +18,9 @@ import {
import type { import type {
PagerankNodeDecomposition, PagerankNodeDecomposition,
PagerankOptions, PagerankOptions,
} from "../analysis/pagerank"; } from "../../analysis/pagerank";
describe("explorer/state", () => { describe("explorer/legacy/state", () => {
function example(startingState: AppState) { function example(startingState: AppState) {
const stateContainer = {appState: startingState}; const stateContainer = {appState: startingState};
const getState = () => stateContainer.appState; const getState = () => stateContainer.appState;

View File

@ -3,9 +3,9 @@
import React from "react"; import React from "react";
import type {Assets} from "../webutil/assets"; import type {Assets} from "../webutil/assets";
import {StaticExplorerAdapterSet} from "../explorer/adapters/explorerAdapterSet"; import {StaticExplorerAdapterSet} from "../explorer/legacy/adapters/explorerAdapterSet";
import {StaticExplorerAdapter as GithubAdapter} from "../plugins/github/explorerAdapter"; import {StaticExplorerAdapter as GithubAdapter} from "../plugins/github/explorerAdapter";
import {AppPage} from "../explorer/App"; import {AppPage} from "../explorer/legacy/App";
import type {RepoId} from "../core/repoId"; import type {RepoId} from "../core/repoId";
function homepageStaticAdapters(): StaticExplorerAdapterSet { function homepageStaticAdapters(): StaticExplorerAdapterSet {

View File

@ -5,8 +5,8 @@ import {declaration} from "./declaration";
import type { import type {
StaticExplorerAdapter, StaticExplorerAdapter,
DynamicExplorerAdapter, DynamicExplorerAdapter,
} from "../../explorer/adapters/explorerAdapter"; } from "../../explorer/legacy/adapters/explorerAdapter";
import {StaticExplorerAdapterSet} from "../../explorer/adapters/explorerAdapterSet"; import {StaticExplorerAdapterSet} from "../../explorer/legacy/adapters/explorerAdapterSet";
import {Assets} from "../../webutil/assets"; import {Assets} from "../../webutil/assets";
import {type RepoId, makeRepoId} from "../../core/repoId"; import {type RepoId, makeRepoId} from "../../core/repoId";
import {NodeAddress, type NodeAddressT} from "../../core/graph"; import {NodeAddress, type NodeAddressT} from "../../core/graph";

View File

@ -2,7 +2,7 @@
import type { import type {
StaticExplorerAdapter as IStaticExplorerAdapter, StaticExplorerAdapter as IStaticExplorerAdapter,
DynamicExplorerAdapter as IDynamicExplorerAdapter, DynamicExplorerAdapter as IDynamicExplorerAdapter,
} from "../../explorer/adapters/explorerAdapter"; } from "../../explorer/legacy/adapters/explorerAdapter";
import {Graph} from "../../core/graph"; import {Graph} from "../../core/graph";
import * as N from "./nodes"; import * as N from "./nodes";
import {description} from "./render"; import {description} from "./render";

View File

@ -4,7 +4,7 @@ import pako from "pako";
import type { import type {
StaticExplorerAdapter as IStaticExplorerAdapter, StaticExplorerAdapter as IStaticExplorerAdapter,
DynamicExplorerAdapter as IDynamicExplorerAdapter, DynamicExplorerAdapter as IDynamicExplorerAdapter,
} from "../../explorer/adapters/explorerAdapter"; } from "../../explorer/legacy/adapters/explorerAdapter";
import {type Graph, NodeAddress} from "../../core/graph"; import {type Graph, NodeAddress} from "../../core/graph";
import {createGraph} from "./createGraph"; import {createGraph} from "./createGraph";
import * as N from "./nodes"; import * as N from "./nodes";