Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpkane committed May 31, 2024
2 parents 9418218 + ef5635e commit ec57f0d
Show file tree
Hide file tree
Showing 917 changed files with 40,732 additions and 16,697 deletions.
37 changes: 37 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
language: "en"
early_access: false
reviews:
request_changes_workflow: false
high_level_summary: true
poem: true
review_status: true
collapse_walkthrough: false
path_filters:
- "!**/.xml"
- "!**/__generated__/**"
- "!**/generated/**"
- "!**/*.json"
- "!**/*.svg"
- "!**/*.png"
- "!**/*.jpg"
- "!**/*.gif"
- "!**/*.lock"
path_instructions:
- path: "**/*.{ts,tsx}"
instructions:
"Review the Typescript and React code for conformity with best practices in React, Recoil,
Graphql, and Typescript. Highlight any deviations."
auto_review:
enabled: true
ignore_title_keywords:
- "WIP"
- "DO NOT MERGE"
- "DRAFT"
drafts: false
base_branches:
- "develop"
- "main"
- "release/.*"
- "feat/.*"
chat:
auto_reply: true
3 changes: 1 addition & 2 deletions .github/workflows/build-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ jobs:
run: |
cd package/db
python -Im build --sdist
- name: Upload sdist
if: ${{ matrix.platform == 'sdist' }}
- name: Upload
uses: actions/upload-artifact@v3
with:
name: dist-${{ matrix.platform }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
pull_request:
branches:
- develop
- feat/*
- main
- rel-*
- release-*
Expand Down Expand Up @@ -72,6 +73,7 @@ jobs:
pip install -r fiftyone-teams/requirements/dev.txt
pip install fiftyone-brain fiftyone-db
pip install pycocotools tensorflow torch torchvision
pip install typing_extensions==4.10.0
pip install .
- name: Cache Node Modules
id: node-cache
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
FIFTYONE_DATABASE_NAME: playwright
ELECTRON_EXTRA_LAUNCH_ARGS: "--disable-gpu"
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/ms-playwright
FIFTYONE_PLUGINS_DIR: ${{ github.workspace }}/e2e-pw/src/shared/assets/plugins
defaults:
run:
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types: [opened, synchronize]
branches:
- develop
- feat/*
- main
- release/v[0-9]+.[0-9]+.[0-9]+

Expand All @@ -20,7 +21,7 @@ jobs:

all-tests:
runs-on: ubuntu-latest
needs: [build, e2e, test]
needs: [build, test]
if: always()
steps:
- run: sh -c ${{ needs.build.result == 'success' && needs.test.result == 'success' }}
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ jobs:
- ubuntu-latest-m
- windows-latest
python:
- 3.8
- "3.8"
- "3.10"
- "3.11"
exclude:
- os: windows-latest
python: 3.8
python: "3.8"
- os: windows-latest
python: "3.10"
- os: windows-latest
python: "3.11"
defaults:
run:
shell: bash
Expand Down Expand Up @@ -90,7 +93,7 @@ jobs:
--ignore tests/intensive/ \
--ignore tests/no_wrapper
- name: Upload
if: ${{ !startsWith(matrix.os, 'windows') && matrix.python == '3.9' }}
if: ${{ !startsWith(matrix.os, 'windows') && matrix.python == '3.11' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ script:
bash install.bash -d
```

Although not required, developers typically prefer to configure their FiftyOne
installation to connect to a self-installed and managed instance of MongoDB,
which you can do by following
[these simple steps](https://docs.voxel51.com/user_guide/config.html#configuring-a-mongodb-connection).

### Source installs in Google Colab

You can install from source in
Expand Down
4 changes: 2 additions & 2 deletions STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ For example, an import block might look like this:
"""
Module docstring.
| Copyright 2017-2023, Voxel51, Inc.
| Copyright 2017-2024, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
|
"""
Expand Down Expand Up @@ -184,7 +184,7 @@ Short module description here (generally one sentence max).
A longer section can also be added here as appropriate.
| Copyright 2017-2023, Voxel51, Inc.
| Copyright 2017-2024, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
|
"""
Expand Down
2 changes: 1 addition & 1 deletion app/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ the event.

## Copyright

Copyright 2017-2023, Voxel51, Inc.<br> voxel51.com
Copyright 2017-2024, Voxel51, Inc.<br> voxel51.com
27 changes: 20 additions & 7 deletions app/__mocks__/recoil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as recoil from "recoil";
export * from "recoil";

export let mockValues = {};
export let mockValuesStore = {};
export const mockValuesStore = {};
export let mockDefaults = {};
export function setMockAtoms(newMockValues: { [key: string]: any }) {
mockValues = {
Expand All @@ -15,15 +15,21 @@ export function setMockAtoms(newMockValues: { [key: string]: any }) {
export const getValue = (atom) => {
if (mockValuesStore[atom.key]) {
const str = JSON.stringify(atom.params);
if (mockValuesStore[atom.key].hasOwnProperty(str)) {
return mockValuesStore[atom.key][JSON.stringify[str]];
if (Object.hasOwn(mockValuesStore[atom.key], str)) {
return mockValuesStore[atom.key][str];
}
}

if (atom.params !== undefined) {
return mockValues[atom.key](atom.params);
}
return mockValues[atom.key];

const mockValue = mockValues[atom.key];
if (mockValue instanceof Function) {
return mockValue();
}

return mockValue;
};

const resetValue = (atom) => {
Expand All @@ -37,9 +43,12 @@ const resetValue = (atom) => {
const setValue = (atom, value) => {
if (atom.params) {
if (!mockValuesStore[atom.key]) mockValuesStore[atom.key] = {};
mockValuesStore[atom.key][JSON.stringify(atom.params)] = value;
const current = mockValuesStore[atom.key][JSON.stringify(atom.params)];
mockValuesStore[atom.key][JSON.stringify(atom.params)] =
value instanceof Function ? value(current) : value;
} else {
mockValues[atom.key] = value;
const current = mockValues[atom.key];
mockValues[atom.key] = value instanceof Function ? value(current) : value;
}
};

Expand Down Expand Up @@ -103,7 +112,10 @@ export function selectorFamily<
resolver.key = options.key;
resolver.params = params;
resolver.set = (value) =>
options.set({ set: setValue, get: getValue, reset: resetValue }, value);
options.set(params)(
{ set: setValue, get: getValue, reset: resetValue },
value
);
return resolver;
};
}
Expand All @@ -119,6 +131,7 @@ export type TestSelectorFamily<
P = any
> = {
(): ReturnType<T>["__tag"][0];
set: (params: ReturnType<T>["__tag"][0]) => void;
key: string;
params: P;
};
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"typedoc": "^0.23.21",
"typescript": "^4.7.4",
"typescript-plugin-css-modules": "^5.0.2",
"vite": "^3.2.7",
"vite": "^3.2.10",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-relay": "^2.0.0",
"vitest": "^0.34.6"
Expand Down
2 changes: 1 addition & 1 deletion app/packages/aggregations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"lodash": "^4.17.21",
"prettier": "2.2.1",
"typescript": "4.2.4",
"vite": "^3.2.7"
"vite": "^3.2.10"
}
}
45 changes: 15 additions & 30 deletions app/packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,65 +15,50 @@
"dependencies": {
"@fiftyone/components": "*",
"@fiftyone/core": "*",
"@fiftyone/flashlight": "*",
"@fiftyone/looker": "*",
"@fiftyone/map": "*",
"@fiftyone/relay": "*",
"@fiftyone/spaces": "*",
"@fiftyone/state": "*",
"@fiftyone/utilities": "*",
"@material-ui/core": "4.11.4",
"@material-ui/icons": "^4.9.1",
"@react-spring/web": "^9.4.3",
"@recoiljs/refine": "^0.1.1",
"@material-ui/core": "4.12.4",
"@use-gesture/react": "10.1.1",
"@xstate/react": "1.3.3",
"classnames": "^2.2.6",
"framer-motion": "^6.2.8",
"history": "^5.3.0",
"html2canvas": "1.0.0-rc.7",
"lodash": "^4.17.21",
"lru-cache": "^6.0.0",
"notistack": "^3.0.1",
"numeral": "^2.0.6",
"path-to-regexp": "^6.2.0",
"re-resizable": "^6.8.0",
"react": "18.1.0",
"react-dom": "18.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-error-boundary": "^3.1.4",
"react-ga4": "^2.1.0",
"react-hotkeys": "^2.0.0",
"react-input-autosize": "^3.0.0",
"react-is": "^17.0.1",
"react-laag": "^2.0.3",
"react-relay": "14.1.0",
"react-use-measure": "^2.0.1",
"react-uuid": "^1.0.2",
"recharts": "2.0.9",
"recoil": "0.7.6",
"recoil": "0.7.7",
"recoil-relay": "^0.1.0",
"recoil-sync": "^0.2.0",
"resize-observer-polyfill": "^1.5.1",
"searchable-react-json-view": "^0.0.8",
"styled-components": "^5.3.3",
"uuid": "^8.3.2",
"xstate": "^4.14.0"
"styled-components": "^6.1.8",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/lodash": "^4.14.182",
"@types/mime": "^2.0.3",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.3",
"@types/react-router": "^5.1.18",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/react-router": "^5.1.20",
"@types/styled-components": "^5.1.23",
"@vitejs/plugin-react-refresh": "^1.3.3",
"prettier": "2.2.1",
"relay-compiler": "^14.1.0",
"rollup-plugin-polyfill-node": "^0.6.2",
"typescript": "^4.7.4",
"typescript-plugin-css-modules": "^5.0.2",
"vite": "^3.2.7",
"vite": "^3.2.10",
"vite-plugin-relay": "^1.0.7",
"vite-plugin-rewrite-all": "^1.0.0"
"vite-plugin-rewrite-all": "^1.0.2"
},
"peerDependencies": {
"@mui/icons-material": "*",
"@react-spring/web": "*"
}
}
14 changes: 13 additions & 1 deletion app/packages/app/src/Sync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { usePlugins } from "@fiftyone/plugins";
import {
setDataset,
setDatasetMutation,
setSpaces,
setSpacesMutation,
setView,
setViewMutation,
subscribe,
Expand Down Expand Up @@ -141,7 +143,7 @@ const dispatchSideEffect = ({
);
session.fieldVisibilityStage = nextEntry.state.fieldVisibility;
session.sessionGroupSlice = data.dataset?.defaultGroupSlice || undefined;
session.sessionSpaces = fos.SPACES_DEFAULT;
session.sessionSpaces = nextEntry.state?.workspace ?? fos.SPACES_DEFAULT;
}

commitMutation<setViewMutation>(environment, {
Expand All @@ -153,6 +155,16 @@ const dispatchSideEffect = ({
datasetName: nextDataset,
subscription,
},
onCompleted: () => {
nextEntry.state?.workspace &&
commitMutation<setSpacesMutation>(environment, {
mutation: setSpaces,
variables: {
spaces: nextEntry.state?.workspace,
subscription,
},
});
},
});
};

Expand Down
Loading

0 comments on commit ec57f0d

Please sign in to comment.