Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v0.21.3 #3282

Merged
merged 96 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
7d4edfe
Refactor schemaControls, use selectField() when searching, cleaner sc…
Jun 1, 2023
6e263ee
update count dependency to refelct when applying filter rules
Jun 1, 2023
2305bd4
add documentation links
Jun 1, 2023
759e993
better disable field handling - (un)select is broken - fixing next
Jun 2, 2023
ca66b4b
improve select all control
Jun 5, 2023
e9c0c6a
uncheck subpaths even if they are disabled
Jun 5, 2023
bdf50f1
show embedded document in selection mode
Jun 6, 2023
33554bd
field doc type using tertiary text color
Jun 7, 2023
05a8762
minor tweaks in color modal title style
lanzhenw Jun 7, 2023
f1df4e5
review comments and fix include nested fields selection view
Jun 8, 2023
6d33e2b
review comments, refactor selection row, and count fix
Jun 8, 2023
75e732f
add first vitest for visibility, upgrade vitest packages
Jun 8, 2023
f298e09
add basic test and refactor more
Jun 8, 2023
b52b7b7
keep one embed doc field
Jun 9, 2023
423c01b
no coverage when yarn test
Jun 9, 2023
c3025ef
Merge pull request #3154 from voxel51/schema/improvement
manivoxel51 Jun 10, 2023
3026474
Merge pull request #3152 from voxel51/bugfix/select-labels
brimoor Jun 12, 2023
bf61ef3
add support for multi-select with string type
imanjra Jun 12, 2023
6cbdabe
adds a Docker Hub Pulls badge
findtopher Jun 16, 2023
cebfdbb
Merge pull request #3210 from voxel51/topher/add-docker-badge
findtopher Jun 21, 2023
b03fbda
Typo
jacobmarks Jun 29, 2023
19c6c24
Merge pull request #3238 from voxel51/jacobmarks-patch-1
jacobmarks Jun 30, 2023
1c46fee
merge
benjaminpkane Jun 30, 2023
980bd64
Merge pull request #3243 from voxel51/merge-main
brimoor Jul 1, 2023
b6bbd69
Merge pull request #3245 from voxel51/main
brimoor Jul 1, 2023
8dde73b
tweaking
brimoor Jul 1, 2023
8f20cba
lint
brimoor Jul 1, 2023
87f0a00
Add files via upload
AyushExel Jul 4, 2023
a6d1200
Update brain.rst
AyushExel Jul 4, 2023
ee9e457
Update index.rst
AyushExel Jul 4, 2023
cc23b62
Update index.rst
AyushExel Jul 4, 2023
bd2cd93
Update index.rst
AyushExel Jul 4, 2023
5d3d87e
Update index.rst
AyushExel Jul 4, 2023
1a4c3ca
Release v0.21.2 (#3251) (#3255)
benjaminpkane Jul 5, 2023
147bf82
add icon
AyushExel Jul 6, 2023
7455f50
typo
jacobmarks Jun 27, 2023
2b14bfc
first pass at milvus integration docs
jacobmarks Jun 27, 2023
f2210a6
adding milvus to user_guide/brain
jacobmarks Jun 27, 2023
3bd6609
adding to integrations index
jacobmarks Jun 27, 2023
bc58db0
adding milvus logo
jacobmarks Jun 27, 2023
884e14d
square image, lower resolution
brimoor Jul 6, 2023
2734ab6
editing pass
brimoor Jul 6, 2023
e0aa1ef
consistency
brimoor Jul 6, 2023
67565a7
bugfixes
brimoor Jul 6, 2023
11d39f2
Merge pull request #3232 from voxel51/milvus
brimoor Jul 6, 2023
4e35827
disable field unit testing
Jun 13, 2023
6d13cd8
group and video dataset unit tests disabled
Jun 13, 2023
5ddba23
toPatches disabling tests
Jun 13, 2023
42104a7
toClips
Jun 13, 2023
8df6322
label types test
Jun 14, 2023
cfe0935
more granular field selection when disabling label subfields
Jun 14, 2023
1495cc6
geolocation, heatmap, segmentation tests
Jun 14, 2023
7c1dd70
complete disabling test
Jun 15, 2023
741bff5
review comments
Jun 26, 2023
9e3c0df
enable vector fields, disable top level id field, more grnular disabl…
Jun 28, 2023
9aa5c60
disable list of valid labels from visibility toggle
Jun 30, 2023
033719a
review comments
Jul 3, 2023
d9f8e0e
Merge pull request #3199 from voxel51/sunny/unit-test-visibility-2
manivoxel51 Jul 6, 2023
005ff77
Merge branch 'lancedb' into develop
brimoor Jul 6, 2023
e05a89f
Merge pull request #3252 from AyushExel/develop
brimoor Jul 6, 2023
b8c0e47
linting
brimoor Jul 6, 2023
baa3dc1
editing pass
brimoor Jul 6, 2023
5ef6506
tweaks
brimoor Jul 6, 2023
a4ef4be
cleanup
brimoor Jul 6, 2023
ad43b14
fixing capitalization
brimoor Jul 6, 2023
a53b901
Merge pull request #3259 from voxel51/lancedb
brimoor Jul 6, 2023
505753f
adding new vector integrations
brimoor Jul 6, 2023
ae19131
bumping package versions
brimoor Jul 6, 2023
19946ee
adding release notes
brimoor Jul 6, 2023
95b491d
or count label tags (#3267)
benjaminpkane Jul 8, 2023
2ecdea1
has group slices only when group dataset (#3262)
benjaminpkane Jul 8, 2023
57e7103
Updating `Session.close()` (#3253)
benjaminpkane Jul 8, 2023
3910ba6
Embedded frame label fixes (#3256)
benjaminpkane Jul 8, 2023
fc96c8a
adding a merge_sample() method
brimoor Jul 10, 2023
d1606a2
Minor typo fixes
NeoKish Jul 10, 2023
f77bbcc
Merge pull request #3272 from NeoKish/fix-faq-typo-pr
brimoor Jul 10, 2023
4aa2a5f
adding test for one() method
brimoor Jul 10, 2023
dfa4d96
Merge pull request #3274 from voxel51/feature/merge-sample
brimoor Jul 10, 2023
9946b67
updating release notes
brimoor Jul 10, 2023
7b4ce09
tweak
brimoor Jul 10, 2023
1b28d03
documenting list bucket perms
brimoor Jul 11, 2023
1dde7ee
Fix sidebar matching on label fields (#3270)
benjaminpkane Jul 11, 2023
ae6bcfc
Suppress errors due to none fields (#3275)
kaixi-wang Jul 11, 2023
a23b864
import order
benjaminpkane Jul 11, 2023
ca552ff
Fixing #3277 (#3279)
brimoor Jul 11, 2023
8269f7b
interactive typo fix for Dave
findtopher Jul 11, 2023
fddb3cf
removing persistent dataset usage in unit tests
brimoor Jul 11, 2023
4c08de1
Merge branch 'release/v0.21.3' of https://github.com/voxel51/fiftyone…
brimoor Jul 11, 2023
f1ef04d
Sidebar filtering tests and fixes (#3280)
benjaminpkane Jul 11, 2023
95b0e8f
add to release notes
benjaminpkane Jul 11, 2023
2638bb8
whitespace
benjaminpkane Jul 11, 2023
86b5fc4
Merge branch 'main' into release/v0.21.3
benjaminpkane Jul 11, 2023
0778dc6
updating release notes
brimoor Jul 11, 2023
f20b523
Minor fixes (#3283)
NeoKish Jul 11, 2023
d44d015
docs tweaks
brimoor Jul 12, 2023
5e534e8
documenting cache=True feature
brimoor Jul 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ models**
[![PyPI python](https://img.shields.io/pypi/pyversions/fiftyone)](https://pypi.org/project/fiftyone)
[![PyPI version](https://badge.fury.io/py/fiftyone.svg)](https://pypi.org/project/fiftyone)
[![Downloads](https://pepy.tech/badge/fiftyone)](https://pepy.tech/project/fiftyone)
[![Docker Pulls](https://badgen.net/docker/pulls/voxel51/fiftyone?icon=docker&label=pulls)](https://hub.docker.com/r/voxel51/fiftyone/)
[![Build](https://github.com/voxel51/fiftyone/workflows/Build/badge.svg?branch=develop&event=push)](https://github.com/voxel51/fiftyone/actions?query=workflow%3ABuild)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
[![Slack](https://img.shields.io/badge/Slack-4A154B?logo=slack&logoColor=white)](https://slack.voxel51.com)
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"start": "yarn workspace @fiftyone/app start",
"start-desktop": "yarn workspace FiftyOne start-desktop",
"test": "yarn vitest run",
"test-ui": "yarn vitest --ui",
"test-ui": "yarn vitest --ui --coverage",
"gen:schema": "strawberry export-schema fiftyone.server.app:schema > schema.graphql"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import React from "react";

import {
boolExcludeAtom,
boolIsMatchingAtom,
booleanCountResults,
booleanSelectedValuesAtom,
boolIsMatchingAtom,
boolOnlyMatchAtom,
boolExcludeAtom,
} from "@fiftyone/state";
import React from "react";
import CategoricalFilter from "./categoricalFilter/CategoricalFilter";

const BooleanFieldFilter = ({
Expand All @@ -27,7 +25,6 @@ const BooleanFieldFilter = ({
<CategoricalFilter<{ value: boolean | null; count: number }>
selectedValuesAtom={booleanSelectedValuesAtom({ path, modal })}
isMatchingAtom={boolIsMatchingAtom({ path, modal })}
onlyMatchAtom={boolOnlyMatchAtom({ path, modal })}
excludeAtom={boolExcludeAtom({ path, modal })}
countsAtom={booleanCountResults({
path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import React from "react";

import {
isMatchingAtom,
onlyMatchAtom,
stringExcludeAtom,
stringSelectedValuesAtom,
} from "@fiftyone/state";
import CategoricalFilter from "./categoricalFilter/CategoricalFilter";
import { labelTagsCount } from "../Sidebar/Entries/EntryCounts";
import CategoricalFilter from "./categoricalFilter/CategoricalFilter";

const LabelTagFieldFilter = ({
path,
Expand All @@ -27,7 +26,6 @@ const LabelTagFieldFilter = ({
<CategoricalFilter<{ value: string | null; count: number }>
selectedValuesAtom={stringSelectedValuesAtom({ modal, path })}
excludeAtom={stringExcludeAtom({ modal, path })}
onlyMatchAtom={onlyMatchAtom({ modal, path })}
isMatchingAtom={isMatchingAtom({ modal, path })}
countsAtom={labelTagsCount({ modal, extended: false })}
path={path}
Expand Down
16 changes: 4 additions & 12 deletions app/packages/core/src/components/Filters/NumericFieldFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import styled from "styled-components";

import * as fos from "@fiftyone/state";

import RangeSlider from "../Common/RangeSlider";
import Checkbox from "../Common/Checkbox";
import { Button } from "../utils";
import { DATE_FIELD, DATE_TIME_FIELD, FLOAT_FIELD } from "@fiftyone/utilities";
import { formatDateTime } from "../../utils/generic";
import withSuspense from "./withSuspense";
import Checkbox from "../Common/Checkbox";
import RangeSlider from "../Common/RangeSlider";
import FieldLabelAndInfo from "../FieldLabelAndInfo";
import { Button } from "../utils";
import FilterOption from "./categoricalFilter/filterOption/FilterOption";
import withSuspense from "./withSuspense";

const NamedRangeSliderContainer = styled.div`
margin: 3px;
Expand Down Expand Up @@ -135,11 +135,6 @@ const NumericFieldFilter = ({
modal,
defaultRange,
});
const onlyMatchAtom = fos.numericOnlyMatchAtom({
path,
modal,
defaultRange,
});
const values = useRecoilValue(
fos.rangeAtom({
modal,
Expand All @@ -149,7 +144,6 @@ const NumericFieldFilter = ({
})
);
const setExcluded = excludeAtom ? useSetRecoilState(excludeAtom) : null;
const setOnlyMatch = onlyMatchAtom ? useSetRecoilState(onlyMatchAtom) : null;
const setIsMatching = isMatchingAtom
? useSetRecoilState(isMatchingAtom)
: null;
Expand Down Expand Up @@ -207,7 +201,6 @@ const NumericFieldFilter = ({
const initializeSettings = () => {
setFilter([null, null]);
setExcluded && setExcluded(false);
setOnlyMatch && setOnlyMatch(true);
setIsMatching && setIsMatching(!nestedField);
};

Expand Down Expand Up @@ -304,7 +297,6 @@ const NumericFieldFilter = ({
nestedField={nestedField}
shouldNotShowExclude={false} // only boolean fields don't use exclude
excludeAtom={excludeAtom}
onlyMatchAtom={onlyMatchAtom}
isMatchingAtom={isMatchingAtom}
valueName={field?.name ?? ""}
path={path}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import React from "react";
import * as fos from "@fiftyone/state";

import {
isMatchingAtom,
onlyMatchAtom,
stringExcludeAtom,
stringSelectedValuesAtom,
} from "@fiftyone/state";
import React from "react";
import CategoricalFilter from "./categoricalFilter/CategoricalFilter";

const StringFieldFilter = ({
Expand All @@ -27,7 +25,6 @@ const StringFieldFilter = ({
<CategoricalFilter<{ value: string | null; count: number }>
selectedValuesAtom={stringSelectedValuesAtom({ modal, path })}
excludeAtom={stringExcludeAtom({ modal, path })}
onlyMatchAtom={onlyMatchAtom({ modal, path })}
isMatchingAtom={isMatchingAtom({ modal, path })}
countsAtom={fos.stringCountResults({
modal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ interface Props<T extends V = V> {
selectedValuesAtom: RecoilState<T["value"][]>;
excludeAtom: RecoilState<boolean>; // toggles select or exclude
isMatchingAtom: RecoilState<boolean>; // toggles match or filter
onlyMatchAtom: RecoilState<boolean>; // toggles onlyMatch mode (omit empty samples)
countsAtom: RecoilValue<{
count: number;
results: [T["value"], number][];
Expand All @@ -190,7 +189,6 @@ const CategoricalFilter = <T extends V = V>({
countsAtom,
selectedValuesAtom,
excludeAtom,
onlyMatchAtom,
isMatchingAtom,
path,
modal,
Expand All @@ -203,6 +201,7 @@ const CategoricalFilter = <T extends V = V>({
: path.startsWith("_label_tags")
? "label tag"
: name;

const selectedCounts = useRef(new Map<V["value"], number>());
const onSelect = useOnSelect(selectedValuesAtom, selectedCounts);
const useSearch = getUseSearch({ modal, path });
Expand All @@ -213,7 +212,7 @@ const CategoricalFilter = <T extends V = V>({

// id fields should always use filter mode
const neverShowExpansion = field?.ftype?.includes("ObjectIdField");

if (countsLoadable.state === "hasError") throw countsLoadable.contents;
if (countsLoadable.state !== "hasValue") return null;
const { count, results } = countsLoadable.contents;

Expand Down Expand Up @@ -267,7 +266,6 @@ const CategoricalFilter = <T extends V = V>({
selectedValuesAtom={selectedValuesAtom}
excludeAtom={excludeAtom}
isMatchingAtom={isMatchingAtom}
onlyMatchAtom={onlyMatchAtom}
modal={modal}
totalCount={count}
selectedCounts={selectedCounts}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@ import {

import * as fos from "@fiftyone/state";

import FilterOption from "./filterOption/FilterOption";
import Checkbox from "../../Common/Checkbox";
import { Button } from "../../utils";
import { CHECKBOX_LIMIT, nullSort } from "../utils";
import { isKeypointLabel, V } from "./CategoricalFilter";
import { V, isKeypointLabel } from "./CategoricalFilter";
import FilterOption from "./filterOption/FilterOption";

interface WrapperProps {
results: [V["value"], number][];
selectedValuesAtom: RecoilState<V["value"][]>;
excludeAtom: RecoilState<boolean>;
isMatchingAtom: RecoilState<boolean>;
onlyMatchAtom: RecoilState<boolean>;
color: string;
totalCount: number;
modal: boolean;
Expand All @@ -34,7 +33,6 @@ const Wrapper = ({
selectedValuesAtom,
excludeAtom,
isMatchingAtom,
onlyMatchAtom,
modal,
path,
selectedCounts,
Expand All @@ -44,7 +42,6 @@ const Wrapper = ({
const [selected, setSelected] = useRecoilState(selectedValuesAtom);
const selectedSet = new Set(selected);
const setExcluded = excludeAtom ? useSetRecoilState(excludeAtom) : null;
const setOnlyMatch = onlyMatchAtom ? useSetRecoilState(onlyMatchAtom) : null;
const setIsMatching = isMatchingAtom
? useSetRecoilState(isMatchingAtom)
: null;
Expand Down Expand Up @@ -87,7 +84,6 @@ const Wrapper = ({

const initializeSettings = () => {
setExcluded && setExcluded(false);
setOnlyMatch && setOnlyMatch(true);
setIsMatching && setIsMatching(!nestedField);
};

Expand Down Expand Up @@ -144,7 +140,6 @@ const Wrapper = ({
nestedField={nestedField}
shouldNotShowExclude={shouldNotShowExclude}
excludeAtom={excludeAtom}
onlyMatchAtom={onlyMatchAtom}
isMatchingAtom={isMatchingAtom}
valueName={name}
color={color}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
import React, { PropsWithChildren, useEffect } from "react";
import styled from "styled-components";
import { RecoilState, useRecoilState, useSetRecoilState } from "recoil";
import FilterAltIcon from "@mui/icons-material/FilterAlt";
import FilterAltOffIcon from "@mui/icons-material/FilterAltOff";
import ImageIcon from "@mui/icons-material/Image";
import HideImageIcon from "@mui/icons-material/HideImage";
import ImageIcon from "@mui/icons-material/Image";
import { IconButton } from "@mui/material";
import { useSpring } from "framer-motion";
import Color from "color";
import React, { useEffect } from "react";
import { RecoilState, useRecoilState, useSetRecoilState } from "recoil";
import styled from "styled-components";

import { useOutsideClick } from "@fiftyone/state";
import { useTheme } from "@fiftyone/components/src/components/ThemeProvider";
import Tooltip from "@fiftyone/components/src/components/Tooltip";
import { useOutsideClick } from "@fiftyone/state";

import { PopoutDiv } from "../../../utils";
import Item from "./FilterItem";
import { Popout } from "@fiftyone/components";
import Item from "./FilterItem";

interface Props {
nestedField: string | undefined; // nested ListFields only ("detections")
shouldNotShowExclude: boolean; // for BooleanFields
excludeAtom: RecoilState<boolean>;
onlyMatchAtom: RecoilState<boolean>;
isMatchingAtom: RecoilState<boolean>;
valueName: string;
color: string;
Expand Down Expand Up @@ -132,15 +129,13 @@ const FilterOption: React.FC<Props> = ({
nestedField,
shouldNotShowExclude,
excludeAtom,
onlyMatchAtom,
isMatchingAtom,
}) => {
const isLabelTag = path?.startsWith("_label_tags");
const isSampleTag = path?.startsWith("tag");

const [open, setOpen] = React.useState(false);
const [excluded, setExcluded] = useRecoilState(excludeAtom);
const setOnlyMatch = onlyMatchAtom ? useSetRecoilState(onlyMatchAtom) : null;
const setIsMatching = isMatchingAtom
? useSetRecoilState(isMatchingAtom)
: null;
Expand Down Expand Up @@ -213,25 +208,21 @@ const FilterOption: React.FC<Props> = ({
const onSelectFilter = () => {
setExcluded && setExcluded(false);
setIsMatching && setIsMatching(false);
setOnlyMatch && setOnlyMatch(true);
};

const onSelectNegativeFilter = () => {
setExcluded && setExcluded(true);
setIsMatching && setIsMatching(false);
setOnlyMatch && setOnlyMatch(false);
};

const onSelectMatch = () => {
setExcluded && setExcluded(false);
setIsMatching && setIsMatching(true);
setOnlyMatch && setOnlyMatch(true);
};

const onSelectNegativeMatch = () => {
setExcluded && setExcluded(true);
setIsMatching && setIsMatching(true);
setOnlyMatch && setOnlyMatch(true);
};

const children = (
Expand Down
54 changes: 46 additions & 8 deletions app/packages/core/src/plugins/SchemaIO/components/DropdownView.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,46 @@
import { Box, ListItemText, MenuItem, Select, Typography } from "@mui/material";
import React from "react";
import { Box, Typography, Select, MenuItem, ListItemText } from "@mui/material";
import FieldWrapper from "./FieldWrapper";
import autoFocus from "../utils/auto-focus";
import { getComponentProps } from "../utils";
import autoFocus from "../utils/auto-focus";
import AlertView from "./AlertView";
import FieldWrapper from "./FieldWrapper";

const MULTI_SELECT_TYPES = ["string", "array"];

export default function DropdownView(props) {
const { onChange, schema, path, data } = props;
const { view = {}, type } = schema;
const { choices, placeholder = "", readOnly } = view;
const { default: defaultValue, view = {}, type } = schema;
const {
choices,
multiple: multiSelect,
placeholder = "",
separator = ",",
readOnly,
} = view;

if (multiSelect && !MULTI_SELECT_TYPES.includes(type))
return (
<AlertView
schema={{
view: {
label: `Unsupported type "${type}" for multi-select`,
description:
"Multi-select is supported for types " +
MULTI_SELECT_TYPES.join(", "),
severity: "error",
},
}}
/>
);

const multiple = type === "array";
const isArrayType = type === "array";
const multiple = multiSelect || isArrayType;
const fallbackDefaultValue = multiple ? [] : "";
const rawDefaultValue = data ?? defaultValue ?? fallbackDefaultValue;
const computedDefaultValue =
multiple && !Array.isArray(rawDefaultValue)
? rawDefaultValue.toString().split(separator)
: rawDefaultValue;

const choiceLabels = choices.reduce((labels, choice) => {
labels[choice.value] = choice.label;
Expand All @@ -21,7 +52,7 @@ export default function DropdownView(props) {
<Select
disabled={readOnly}
autoFocus={autoFocus(props)}
defaultValue={data ?? schema.default ?? (multiple ? [] : "")}
defaultValue={computedDefaultValue}
size="small"
fullWidth
displayEmpty
Expand All @@ -34,7 +65,14 @@ export default function DropdownView(props) {
}
return choiceLabels[value] || value;
}}
onChange={(e) => onChange(path, e.target.value)}
onChange={(e) => {
const value = e.target.value;
const computedValue =
Array.isArray(value) && type !== "array"
? value.join(separator)
: value;
onChange(path, computedValue);
}}
multiple={multiple}
{...getComponentProps(props, "select")}
>
Expand Down
Loading