Skip to content

Commit

Permalink
OSS fiftyone-brain updates (#4797)
Browse files Browse the repository at this point in the history
* update readme and install scripts

* dev install brain on windows

* use CALL
  • Loading branch information
benjaminpkane authored Sep 16, 2024
1 parent 38527cb commit eaba665
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ __pycache__
build/
dist/

/fiftyone-brain/
/eta/

/docs/build/
Expand Down
19 changes: 2 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ FiftyOne.

## Contributing to FiftyOne

FiftyOne is open source and community contributions are welcome!
FiftyOne and [FiftyOne-Brain](https://github.com/voxel51/fiftyone-brain) are
open source and community contributions are welcome!

Check out the
[contribution guide](https://github.com/voxel51/fiftyone/blob/develop/CONTRIBUTING.md)
Expand Down Expand Up @@ -245,22 +246,6 @@ Refer to
to see how to build and run Docker images containing source or release builds
of FiftyOne.

### UI Development on Storybook

Voxel51 is currently in the process of implementing a
[Storybook](https://storybook.js.org/) which contains examples of its basic UI
components. You can access the current storybook instances by running **yarn
storybook** in **/app/packages/components**. While the storybook instance is
running, any changes to the component will trigger a refresh in the storybook
app.

```shell
%%shell

cd /app/packages/components
yarn storybook
```

### Generating documentation

See the
Expand Down
28 changes: 19 additions & 9 deletions install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,34 @@

# Show usage information
usage() {
echo "Usage: bash $0 [-h] [-d] [-e] [-m] [-p] [-v]
echo "Usage: bash $0 [-h] [-b] [-d] [-e] [-m] [-p]
Getting help:
-h Display this help message.
Custom installations:
-b Source install of fiftyone-brain.
-d Install developer dependencies.
-e Source install of voxel51-eta.
-m Install MongoDB from scratch, rather than installing fiftyone-db.
-p Install only the core python package, not the App.
-v Voxel51 developer install (don't install fiftyone-brain).
"
}

# Parse flags
SHOW_HELP=false
SOURCE_BRAIN_INSTALL=false
DEV_INSTALL=false
SOURCE_ETA_INSTALL=false
SCRATCH_MONGODB_INSTALL=false
BUILD_APP=true
VOXEL51_INSTALL=false
while getopts "hdempv" FLAG; do
while getopts "hbdemp" FLAG; do
case "${FLAG}" in
h) SHOW_HELP=true ;;
b) SOURCE_BRAIN_INSTALL=true ;;
d) DEV_INSTALL=true ;;
e) SOURCE_ETA_INSTALL=true ;;
m) SCRATCH_MONGODB_INSTALL=true ;;
v) VOXEL51_INSTALL=true ;;
p) BUILD_APP=false ;;
*) usage ;;
esac
Expand Down Expand Up @@ -94,13 +94,23 @@ else
pip install fiftyone-db
fi

if [ ${VOXEL51_INSTALL} = false ]; then
echo "***** INSTALLING FIFTYONE-BRAIN *****"
echo "***** INSTALLING FIFTYONE-BRAIN *****"
if [ ${SOURCE_BRAIN_INSTALL} = true ]; then
git clone https://github.com/voxel51/fiftyone-brain
cd fiftyone-brain
if [ ${DEV_INSTALL} = true ]; then
bash install.bash -d
else
pip install .
fi
cd ..
else
echo "Cloning FiftyOne Brain repository"
pip install --upgrade fiftyone-brain
fi

echo "***** INSTALLING FIFTYONE *****"
if [ ${DEV_INSTALL} = true ] || [ ${VOXEL51_INSTALL} = true ]; then
if [ ${DEV_INSTALL} = true ]; then
echo "Performing dev install"
pip install -r requirements/dev.txt
pre-commit install
Expand All @@ -117,7 +127,7 @@ if [ ${SOURCE_ETA_INSTALL} = true ]; then
git clone https://github.com/voxel51/eta
fi
cd eta
if [ ${DEV_INSTALL} = true ] || [ ${VOXEL51_INSTALL} = true ]; then
if [ ${DEV_INSTALL} = true ]; then
pip install -e .
else
pip install .
Expand Down
28 changes: 17 additions & 11 deletions install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@
::
:: Commands:
:: -h Display help message
:: -b Source install of fiftyone-brain
:: -d Install developer dependencies.
:: -e Source install of voxel51-eta.
:: -m Install MongoDB from scratch, rather than installing fiftyone-db.
:: -p Install only the core python package, not the App.
:: -v Voxel51 developer install (don't install fiftyone-brain).

set SHOW_HELP=false
set SOURCE_BRAIN_INSTALL=false
set DEV_INSTALL=false
set SOURCE_ETA_INSTALL=false
set SCRATCH_MONGODB_INSTALL=false
set BUILD_APP=true
set VOXEL51_INSTALL=false
set USE_FIFTY_ONE_DB=true

:parse
IF "%~1"=="" GOTO endparse
IF "%~1"=="-h" GOTO helpmessage
IF "%~1"=="-b" set SOURCE_BRAIN_INSTALL=true
IF "%~1"=="-d" set DEV_INSTALL=true
IF "%~1"=="-e" set SOURCE_ETA_INSTALL=true
IF "%~1"=="-m" set USE_FIFTY_ONE_DB=false
IF "%~1"=="-p" set BUILD_APP=false
IF "%~1"=="-v" set VOXEL51_INSTALL=true
SHIFT
GOTO parse
:endparse
Expand All @@ -42,17 +42,23 @@ IF %USE_FIFTY_ONE_DB%==true (
echo ***** USING LOCAL MONGODB *****
)

IF %VOXEL51_INSTALL%==false (
echo ***** INSTALLING FIFTYONE-BRAIN *****
echo ***** INSTALLING FIFTYONE-BRAIN *****
IF %SOURCE_BRAIN_INSTALL%==true (
echo Cloning FiftyOne Brain repository
git clone https://github.com/voxel51/fiftyone-brain
cd fiftyone-brain
IF %DEV_INSTALL%==true (
CALL install.bat -d
) else (
pip install .
)
cd ..
) else (
pip install --upgrade fiftyone-brain
)

echo ***** INSTALLING FIFTYONE *****
set IS_DEV_INSTALL_FLAG=false
IF %DEV_INSTALL%==true set IS_DEV_INSTALL_FLAG=true
IF %VOXEL51_INSTALL%==true set IS_DEV_INSTALL_FLAG=true

IF %IS_DEV_INSTALL_FLAG%==true (
IF %DEV_INSTALL%==true (
echo Performing dev install
pip install -r requirements/dev.txt
pre-commit install
Expand Down Expand Up @@ -93,9 +99,9 @@ exit /b
:helpmessage
echo Additional Arguments:
echo -h Display help message
echo -b Source install of fiftyone-brain.
echo -d Install developer dependencies.
echo -e Source install of voxel51-eta.
echo -m Use local mongodb instead of installing fiftyone-db.
echo -p Install only the core python package, not the App.
echo -v Voxel51 developer install (don't install fiftyone-brain).
exit /b

0 comments on commit eaba665

Please sign in to comment.