Skip to content

Commit

Permalink
Merge pull request #4460 from voxel51/merge/v0.24.1-to-main
Browse files Browse the repository at this point in the history
Merge `release/v0.24.1` to `main`
  • Loading branch information
findtopher committed Jun 11, 2024
2 parents 8fbbdd1 + 5ba1a2f commit c1132ec
Show file tree
Hide file tree
Showing 64 changed files with 2,583 additions and 1,715 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ jobs:
e2e:
uses: ./.github/workflows/e2e.yml

teams:
runs-on: ubuntu-latest
if: github.base_ref == 'develop'
steps:
- uses: convictional/[email protected]
with:
owner: voxel51
repo: fiftyone-teams
github_token: ${{ secrets.FIFTYONE_GITHUB_TOKEN }}
github_user: voxel51-bot
workflow_file_name: merge-oss.yml
ref: develop
wait_interval: 20
client_payload: '{ "branch": "${{ github.head_ref || github.ref_name }}" }'
propagate_failure: true
trigger_workflow: true
wait_workflow: true

test:
uses: ./.github/workflows/test.yml

Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/push-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Push Release

on:
push:
branches:
- main
- release/v[0-9]+.[0-9]+.[0-9]+
workflow_dispatch:
inputs:
ref_name:
type: string

jobs:
pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0
- run: |
git config user.name 'voxel51-bot'
git config user.email '[email protected]'
git checkout merge/${{ inputs.ref_name || github.ref_name }} \
|| git checkout -b merge/${{ inputs.ref_name || github.ref_name }}
git push -u origin merge/${{ inputs.ref_name || github.ref_name }}
git checkout develop
git pull origin merge/${{ inputs.ref_name || github.ref_name }} --no-rebase
git pull origin ${{ inputs.ref_name || github.ref_name }} --no-rebase
- uses: peter-evans/create-pull-request@v6
with:
author: voxel51-bot <[email protected]>
token: ${{ secrets.FIFTYONE_GITHUB_TOKEN }}
base: develop
body: Merge `${{ inputs.ref_name || github.ref_name }}` to `develop`
branch: merge/${{ inputs.ref_name || github.ref_name }}
title: Merge `${{ inputs.ref_name || github.ref_name }}` to `develop`
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
"typedoc": "^0.23.21",
"typescript": "^4.7.4",
"typescript-plugin-css-modules": "^5.0.2",
"vite": "^3.2.10",
"vite": "^5.2.12",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-relay": "^2.0.0",
"vitest": "^0.34.6"
"vitest": "^1.6.0"
},
"workspaces": [
"packages/*"
Expand Down
4 changes: 2 additions & 2 deletions app/packages/aggregations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"@babel/preset-typescript": "^7.17.12",
"@types/react": "^18.0.12",
"fs-extra": "^10.1.0",
"jest": "^28.1.1",
"jest": "^29.7.0",
"lodash": "^4.17.21",
"prettier": "2.2.1",
"typescript": "4.2.4",
"vite": "^3.2.10"
"vite": "^5.2.12"
}
}
2 changes: 1 addition & 1 deletion app/packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"rollup-plugin-polyfill-node": "^0.6.2",
"typescript": "^4.7.4",
"typescript-plugin-css-modules": "^5.0.2",
"vite": "^3.2.10",
"vite": "^5.2.12",
"vite-plugin-relay": "^1.0.7",
"vite-plugin-rewrite-all": "^1.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion app/packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"prettier": "^2.7.1",
"typescript": "^4.7.4",
"typescript-plugin-css-modules": "^5.0.2",
"vite": "^3.2.10"
"vite": "^5.2.12"
},
"peerDependencies": {
"re-resizable": "*",
Expand Down
2 changes: 1 addition & 1 deletion app/packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"rollup-plugin-polyfill-node": "^0.6.2",
"typescript": "^4.7.4",
"typescript-plugin-css-modules": "^5.0.2",
"vite": "^3.2.10",
"vite": "^5.2.12",
"vite-plugin-relay": "^1.0.7"
},
"peerDependencies": {
Expand Down
7 changes: 6 additions & 1 deletion app/packages/core/src/components/MainSpace/MainSpace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ const { FIFTYONE_SPACE_ID } = constants;
function MainSpace() {
const [sessionSpaces, setSessionSpaces, sessionPanelsState] =
useSessionSpaces();
const { spaces, updateSpaces } = useSpaces(FIFTYONE_SPACE_ID, sessionSpaces);
const { spaces, updateSpaces, clearSpaces } = useSpaces(
FIFTYONE_SPACE_ID,
sessionSpaces
);
const [panelsState, setPanelsState] = usePanelsState();
const oldSpaces = useRef(spaces);
const oldPanelsState = useRef(panelsState);
const isMounted = useRef(false);

useEffect(() => clearSpaces, [clearSpaces]);

useEffect(() => {
if (!spaces.equals(sessionSpaces)) {
updateSpaces(sessionSpaces);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export default function ViewSelection() {
[viewOptions, viewSearch]
);

useEffect(() => {
refetch({ name: datasetName });
}, [datasetName]);

useEffect(() => {
if (
selected &&
Expand Down
4 changes: 2 additions & 2 deletions app/packages/embeddings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"devDependencies": {
"@vitest/ui": "^0.34.6",
"typescript": "^4.7.4",
"vite": "^3.2.10",
"vite": "^5.2.12",
"vite-plugin-externals": "^0.5.0",
"vitest": "^0.34.6"
"vitest": "^1.6.0"
},
"fiftyone": {
"script": "dist/index.umd.js"
Expand Down
2 changes: 1 addition & 1 deletion app/packages/flashlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"prettier": "^2.7.1",
"typescript": "^4.7.4",
"typescript-plugin-css-modules": "^5.0.2",
"vite": "^3.2.10"
"vite": "^5.2.12"
}
}
4 changes: 2 additions & 2 deletions app/packages/looker-3d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"nodemon": "^3.0.3",
"rollup-plugin-external-globals": "^0.6.1",
"typescript": "^5.4.5",
"vite": "^3.2.10",
"vite": "^5.2.12",
"vite-plugin-externals": "^0.5.0",
"vitest": "^1.5.0"
"vitest": "^1.6.0"
},
"peerDependencies": {
"@mui/icons-material": "*",
Expand Down
2 changes: 1 addition & 1 deletion app/packages/looker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
"prettier": "^2.7.1",
"typescript": "^4.7.4",
"typescript-plugin-css-modules": "^5.0.2",
"vite": "^3.2.10"
"vite": "^5.2.12"
}
}
2 changes: 1 addition & 1 deletion app/packages/map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/react-map-gl": "^6.1.3",
"@types/robust-point-in-polygon": "^1.0.2",
"typescript": "^4.7.4",
"vite": "^3.2.10",
"vite": "^5.2.12",
"vite-plugin-externals": "^0.5.0"
},
"fiftyone": {
Expand Down
4 changes: 2 additions & 2 deletions app/packages/operators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"@babel/preset-typescript": "^7.17.12",
"@fiftyone/utilities": "workspace:^",
"@types/react": "^18.0.12",
"jest": "^28.1.1",
"jest": "^29.7.0",
"prettier": "2.2.1",
"typescript": "4.2.4",
"vite": "^3.2.10"
"vite": "^5.2.12"
},
"peerDependencies": {
"@mui/icons-material": "*",
Expand Down
10 changes: 8 additions & 2 deletions app/packages/operators/src/OperatorInvocationRequestExecutor.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
import { useEffect } from "react";
import { useEffect, useMemo } from "react";
import {
useInvocationRequestExecutor,
useInvocationRequestQueue,
} from "./state";
import { QueueItemStatus } from "./constants";

export default function OperatorInvocationRequestExecutor() {
const { requests, onSuccess, onError } = useInvocationRequestQueue();
const pendingRequests = useMemo(() => {
return requests.filter(
(queueItem) => queueItem.status === QueueItemStatus.Pending
);
}, [requests]);

return (
<>
{requests.map((queueItem) => (
{pendingRequests.map((queueItem) => (
<RequestExecutor
key={queueItem.id}
queueItem={queueItem}
Expand Down
20 changes: 17 additions & 3 deletions app/packages/operators/src/OperatorPrompt/OperatorDrawerPrompt.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Resizable } from "@fiftyone/components";
import { Resizable, scrollable } from "@fiftyone/components";
import { Close } from "@mui/icons-material";
import { Box, IconButton, Stack } from "@mui/material";
import { useState } from "react";
Expand Down Expand Up @@ -32,6 +32,7 @@ export default function OperatorDrawerPrompt(props: OperatorPromptPropsType) {
onResizeReset={() => {
setWidth(DEFAULT_WIDTH);
}}
data-cy="operators-prompt-drawer"
>
<IconButton
onClick={prompt.close}
Expand All @@ -42,8 +43,21 @@ export default function OperatorDrawerPrompt(props: OperatorPromptPropsType) {
<Box sx={{ p: 1 }}>
<OperatorPromptHeader title={title} />
</Box>
<OperatorPromptBody operatorPrompt={prompt} />
<Stack direction="row" spacing={1} justifyContent="center">
<Box
data-cy="operators-prompt-drawer-content"
sx={{ overflow: "auto" }}
className={scrollable}
>
<OperatorPromptBody operatorPrompt={prompt} />
</Box>
<Stack
direction="row"
spacing={1}
justifyContent="center"
alignItems="center"
data-cy="operators-prompt-drawer-footer"
sx={{ py: 1 }}
>
<OperatorPromptFooter {...otherConfigs} />
</Stack>
</Resizable>
Expand Down
22 changes: 3 additions & 19 deletions app/packages/operators/src/OperatorPrompt/OperatorModalPrompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,12 @@ import { getOperatorPromptConfigs } from "../utils";

export default function OperatorModalPrompt(props: OperatorPromptPropsType) {
const { prompt } = props;
const {
title,
hasValidationErrors,
resolving,
pendingResolve,
validationErrorsStr,
...otherConfigs
} = getOperatorPromptConfigs(prompt);
const promptConfig = getOperatorPromptConfigs(prompt);
return (
<OperatorPalette
{...otherConfigs}
title={title}
onClose={otherConfigs.onCancel || prompt.close}
{...promptConfig}
submitOnControlEnter
disableSubmit={hasValidationErrors || resolving || pendingResolve}
disabledReason={
hasValidationErrors
? "Cannot execute operator with validation errors\n\n" +
validationErrorsStr
: "Cannot execute operator while validating form"
}
loading={resolving || pendingResolve}
dialogProps={{ PaperProps: { "data-cy": "operators-prompt-modal" } }}
>
<PaletteContentContainer>
<OperatorPromptBody operatorPrompt={prompt} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function OperatorViewModal() {
onSubmit={io.hide}
onClose={io.hide}
submitButtonText="Done"
dialogProps={{ PaperProps: { "data-cy": "operators-prompt-view-modal" } }}
>
<PaletteContentContainer>
<OperatorIO schema={io.schema} data={io.data || {}} type={io.type} />
Expand Down
2 changes: 0 additions & 2 deletions app/packages/operators/src/OperatorPrompt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ function DynamicOperatorPrompt() {
const target = getPromptTarget(prompt);
const Component = getPromptComponent(prompt);

if (!prompt.resolvedIO.input && !prompt.resolvedIO.output) return null;

return createPortal(<Component prompt={prompt} />, target);
}

Expand Down
6 changes: 6 additions & 0 deletions app/packages/operators/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ export enum OPERATOR_PROMPT_AREAS {
DRAWER_LEFT = "operator_prompt_area_drawer_left",
DRAWER_RIGHT = "operator_prompt_area_drawer_right",
}
export enum QueueItemStatus {
Pending,
Executing,
Completed,
Failed,
}
11 changes: 1 addition & 10 deletions app/packages/operators/src/operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as types from "./types";
import { stringifyError } from "./utils";
import { ValidationContext, ValidationError } from "./validation";
import { ExecutionCallback, OperatorExecutorOptions } from "./types-internal";
import { QueueItemStatus } from "./constants";

class InvocationRequest {
constructor(
Expand Down Expand Up @@ -747,16 +748,6 @@ export async function resolveLocalPlacements(ctx: ExecutionContext) {
return localPlacements;
}

// and allows for the execution of the requests in order of arrival
// and removing the requests that have been completed

enum QueueItemStatus {
Pending,
Executing,
Completed,
Failed,
}

class QueueItem {
constructor(
public id: string,
Expand Down
10 changes: 10 additions & 0 deletions app/packages/operators/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ export function getOperatorPromptConfigs(operatorPrompt: OperatorPromptType) {
const validationErrorsStr = formatValidationErrors(
operatorPrompt.validationErrors
);
const loading = resolving || pendingResolve;
const disableSubmit = hasValidationErrors || resolving || pendingResolve;
const disabledReason = hasValidationErrors
? "Cannot execute operator with validation errors\n\n" + validationErrorsStr
: "Cannot execute operator while validating form";
const onClose = onCancel || operatorPrompt.close;

return {
title,
Expand All @@ -99,6 +105,10 @@ export function getOperatorPromptConfigs(operatorPrompt: OperatorPromptType) {
cancelButtonText,
onSubmit,
onCancel,
loading,
disableSubmit,
disabledReason,
onClose,
};
}

Expand Down
4 changes: 2 additions & 2 deletions app/packages/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"@babel/preset-typescript": "^7.17.12",
"@fiftyone/utilities": "workspace:^",
"@types/react": "^18.0.12",
"jest": "^28.1.1",
"jest": "^29.7.0",
"prettier": "2.2.1",
"typescript": "4.2.4",
"vite": "^3.2.10"
"vite": "^5.2.12"
},
"dependencies": {
"moment": "^2.29.4"
Expand Down
2 changes: 1 addition & 1 deletion app/packages/relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"relay-compiler-language-typescript": "^15.0.1",
"relay-config": "^12.0.1",
"typescript": "^4.7.4",
"vite": "^3.2.10"
"vite": "^5.2.12"
},
"dependencies": {
"@recoiljs/refine": "^0.1.1",
Expand Down
Loading

0 comments on commit c1132ec

Please sign in to comment.