Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpkane committed Jul 25, 2024
2 parents 95188e9 + 59e6e6e commit 0595d8f
Show file tree
Hide file tree
Showing 90 changed files with 6,700 additions and 2,930 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,17 @@ jobs:
cd package/db
python -Im build --sdist
- name: Upload
uses: actions/upload-artifact@v4
if: ${{ matrix.platform == 'sdist' }}
with:
name: dist-${{ matrix.platform }}
path: package/db/dist/*.tar.gz
- name: Upload wheel
if: ${{ matrix.platform != 'sdist' }}
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.platform }}
path: package/db/dist/*
path: package/db/dist/*.whl

test:
runs-on: ubuntu-20.04
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

teams:
runs-on: ubuntu-latest
if: github.base_ref == 'develop'
if: false && github.base_ref == 'develop' # temporarily disabled
steps:
- uses: convictional/[email protected]
with:
Expand All @@ -33,7 +33,12 @@ jobs:
workflow_file_name: merge-oss.yml
ref: develop
wait_interval: 20
client_payload: '{ "branch": "${{ github.head_ref || github.ref_name }}" }'
client_payload: |
{
"author": "${{ github.event.pull_request.user.login }}",
"branch": "${{ github.head_ref || github.ref_name }}",
"pr": ${{ github.event.pull_request.number }}
}
propagate_failure: true
trigger_workflow: true
wait_workflow: true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@ jobs:
- windows-latest
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
exclude:
- os: windows-latest
python: "3.8"
- os: windows-latest
python: "3.9"
- os: windows-latest
python: "3.10"
- os: windows-latest
Expand Down
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@ to make adjustments. If you are working in Google Colab,

You will need:

- [Python](https://www.python.org) (3.7 or newer)
- [Python](https://www.python.org) (3.8 - 3.11)
- [Node.js](https://nodejs.org) - on Linux, we recommend using
[nvm](https://github.com/nvm-sh/nvm) to install an up-to-date version.
- [Yarn](https://yarnpkg.com) - once Node.js is installed, you can install
Yarn via `npm install -g yarn`
- [Yarn](https://yarnpkg.com) - once Node.js is installed, you can
[enable Yarn](https://yarnpkg.com/getting-started/install) via
`corepack enable`
- On Linux, you will need at least the `openssl` and `libcurl` packages. On
Debian-based distributions, you will need to install `libcurl4` or
`libcurl3` instead of `libcurl`, depending on the age of your distribution.
Expand All @@ -154,8 +155,7 @@ sudo dnf install libcurl openssl

We strongly recommend that you install FiftyOne in a
[virtual environment](https://voxel51.com/docs/fiftyone/getting_started/virtualenv.html)
to maintain a clean workspace. The install script is only supported in
POSIX-based systems (e.g. Mac and Linux).
to maintain a clean workspace.

First, clone the repository:

Expand All @@ -167,7 +167,11 @@ cd fiftyone
Then run the install script:

```shell
# Mac or Linux
bash install.bash

# Windows
.\install.bat
```

**NOTE:** If you run into issues importing FiftyOne, you may need to add the
Expand Down Expand Up @@ -203,7 +207,11 @@ you should perform a developer installation using the `-d` flag of the install
script:

```shell
# Mac or Linux
bash install.bash -d

# Windows
.\install.bat -d
```

Although not required, developers typically prefer to configure their FiftyOne
Expand All @@ -222,7 +230,12 @@ cell and then **restarting the runtime**:

git clone --depth 1 https://github.com/voxel51/fiftyone.git
cd fiftyone

# Mac or Linux
bash install.bash

# Windows
.\install.bat
```

### Docker installs
Expand Down
3 changes: 1 addition & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"main": "index.js",
"scripts": {
"build": "yarn workspace @fiftyone/app build",
"build:win32": "yarn workspace @fiftyone/app build:win32",
"compile": "yarn relay-compiler",
"dev": "yarn workspace @fiftyone/app dev",
"dev:py": "python ../fiftyone/server/main.py",
"dev:wpy": "concurrently -k yarn:dev yarn:dev:py",
"doc": "./gen-docs.sh",
"lint:prettify": "prettier --config ../.prettierrc.js --ignore-path ../.prettierignore --write \"packages/**/*.(ts|js|jsx|tsx|json|css|scss)\"",
"postinstall": "patch-package",
"start": "yarn workspace @fiftyone/app start",
"start-desktop": "yarn workspace FiftyOne start-desktop",
"test": "yarn vitest run",
Expand All @@ -36,7 +36,6 @@
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"jsdom": "^20.0.2",
"patch-package": "^6.4.7",
"prettier": "^2.8.0",
"relay-compiler": "^14.1.0",
"relay-runtime": "^14.1.0",
Expand Down
2 changes: 2 additions & 0 deletions app/packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
"scripts": {
"dev": "vite",
"build": "yarn workspace @fiftyone/fiftyone compile && yarn build-bare && yarn copy-to-python",
"build:win32": "yarn workspace @fiftyone/fiftyone compile && yarn build-bare && yarn copy-to-python:win32",
"build-bare": "NODE_OPTIONS=--max-old-space-size=4096 && tsc && vite build",
"build-desktop": "NODE_OPTIONS=--max-old-space-size=4096 && tsc && vite build --mode desktop",
"copy-to-python": "rm -rf ../../../fiftyone/server/static && cp -r ./dist ../../../fiftyone/server/static",
"copy-to-python:win32": "robocopy './dist' '../../../fiftyone/server/static' /MIR",
"copy-to-desktop": "rm -rf ../desktop/dist/ && cp -r ./dist ../desktop/dist"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,15 @@ let theme = extendMuiTheme({
},
},
},
MuiTab: {
styleOverrides: {
root: {
fontSize: "1rem",
},
},
},
},

fontFamily: {
body: "Palanquin, sans-serif",
},
Expand Down
24 changes: 11 additions & 13 deletions app/packages/core/src/components/Modal/Sample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,25 @@ export const SampleWrapper = ({
const hoveringRef = useRef(false);
const sample = useRecoilValue(sampleAtom);
const isGroup = useRecoilValue(isDynamicGroup);
const hover = useHoveredSample(sample.sample, {
const { handlers: hoverEventHandlers } = useHoveredSample(sample.sample, {
update,
clear,
});

if (isGroup) {
return <>{children}</>;
}

return (
<div
style={{ width: "100%", height: "100%", position: "relative" }}
{...hover.handlers}
{...hoverEventHandlers}
>
<SampleBar
sampleId={sample.sample._id}
lookerRef={lookerRef}
visible={hovering}
hoveringRef={hoveringRef}
actions={actions}
/>
{!isGroup && (
<SampleBar
sampleId={sample.sample._id}
lookerRef={lookerRef}
visible={hovering}
hoveringRef={hoveringRef}
actions={actions}
/>
)}
{children}
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions app/packages/core/src/components/Modal/TooltipInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const ContentItemContainer = styled.div`
const ContentItemDiv = styled.div`
margin: 0;
padding: 0;
width: 100%;
`;

const VisibilityIconContainer = animated(styled.div`
Expand All @@ -104,7 +105,6 @@ const ContentValue = styled.div`
color: ${({ theme }) => theme.text.primary};
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
`;

const ContentName = styled.div`
Expand Down Expand Up @@ -500,8 +500,8 @@ const Header = ({ title }: { title: string }) => {
const CtrlToLock = () => {
return (
<CtrlToLockContainer>
<Typography variant="caption" color="gray" fontSize={"0.5em"}>
Press Ctrl to lock
<Typography variant="caption" color="gray" fontSize={"0.43em"}>
Press Ctrl to modify tooltip
</Typography>
</CtrlToLockContainer>
);
Expand Down
8 changes: 4 additions & 4 deletions app/packages/looker-3d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
"dependencies": {
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@react-three/drei": "^9.105.6",
"@react-three/fiber": "^8.16.6",
"@react-three/drei": "^9.107.2",
"@react-three/fiber": "^8.16.8",
"leva": "^0.9.35",
"lodash": "^4.17.21",
"r3f-perf": "^7.2.1",
"react-color": "^2.19.3",
"styled-components": "^6.1.8",
"three": "^0.164.1",
"three": "^0.165.0",
"tunnel-rat": "^0.1.2"
},
"devDependencies": {
"@types/node": "^20.11.10",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/three": "^0.163.0",
"@types/three": "^0.165.0",
"@vitejs/plugin-react": "^1.3.0",
"nodemon": "^3.0.3",
"rollup-plugin-external-globals": "^0.6.1",
Expand Down
53 changes: 48 additions & 5 deletions app/packages/looker-3d/src/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
import { Loading } from "@fiftyone/components";
import React from "react";
import { currentSampleId } from "@fiftyone/state";
import React, { useEffect } from "react";
import { useRecoilValue, useSetRecoilState } from "recoil";
import { fo3dAssetsParseStatusLog } from "./state";

export class ErrorBoundary extends React.Component<
{ children: React.ReactNode },
/**
* This is to be used in conjunction with `Fo3dErrorBoundary` to add uncaught error logs to
* the fo3d error logs atom.
*/
const AddFo3dErrorLogs = ({
error,
boundaryName,
}: {
error: Error;
boundaryName?: string;
}) => {
const thisSampleId = useRecoilValue(currentSampleId);
const setLogs = useSetRecoilState(fo3dAssetsParseStatusLog(thisSampleId));

useEffect(() => {
if (!error) {
return;
}

const message = error.message || error.toString();
const fullMessage = boundaryName
? `Error loading ${boundaryName}: ${message}`
: message;

setLogs((logs) => [...logs, { message: fullMessage, status: "error" }]);
}, [error, boundaryName]);

return null;
};
export class Fo3dErrorBoundary extends React.Component<
{ children: React.ReactNode; boundaryName?: string; ignoreError?: boolean },
{ error: Error | string | null }
> {
state = { error: null, hasError: false };
Expand All @@ -18,10 +50,21 @@ export class ErrorBoundary extends React.Component<

render() {
if (this.state.hasError) {
// useLoader from @react-three/fiber throws a raw string for PCD 404
// not an error
if (this.props.ignoreError) {
return (
<AddFo3dErrorLogs
error={this.state.error}
boundaryName={this.props.boundaryName}
/>
);
}

return (
<Loading dataCy={"looker3d"}>
<AddFo3dErrorLogs
error={this.state.error}
boundaryName={this.props.boundaryName}
/>
<div data-cy="looker-error-info">
{this.state.error instanceof Error
? this.state.error.message
Expand Down
Loading

0 comments on commit 0595d8f

Please sign in to comment.