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

Remove desktop App #4748

Merged
merged 6 commits into from
Sep 11, 2024
Merged

Remove desktop App #4748

merged 6 commits into from
Sep 11, 2024

Conversation

benjaminpkane
Copy link
Contributor

@benjaminpkane benjaminpkane commented Aug 29, 2024

What changes are proposed in this pull request?

Removes the fiftyone-desktop package source, documentation and APIs. As of fiftyone==0.25.0, a compatible desktop App is no longer published

How is this patch tested? If it is not, please explain why.

Existing coverage

Release Notes

  • Removed fiftyone-desktop support and its corresponding APIs

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

Summary by CodeRabbit

  • New Features

    • Introduced a deprecation notice for the FiftyOne Desktop package.
  • Bug Fixes

    • Improved clarity in the README and other documentation by removing outdated references to the desktop application.
  • Documentation

    • Added a section regarding the end of support for the FiftyOne Desktop package.
    • Removed sections related to the desktop application's installation, usage, and configuration from various documentation files.
  • Chores

    • Streamlined code by removing Electron-specific logic and attributes across multiple components.
    • Simplified command-line interface by eliminating desktop session options.

@benjaminpkane benjaminpkane added documentation Documentation work cleaning Code cleaning core Issues related to Core features dependencies Pull requests that update a dependency file desktop app Issues related to the FiftyOne Desktop App labels Aug 29, 2024
@benjaminpkane benjaminpkane requested a review from a team August 29, 2024 13:35
Copy link
Contributor

coderabbitai bot commented Aug 29, 2024

Walkthrough

The changes primarily involve the removal of support for the FiftyOne Desktop application across various components of the codebase. This includes eliminating references to desktop-specific functionality, such as command-line options, configuration settings, and related logic in components. Documentation has also been updated to reflect this shift, focusing on web-based interactions and removing any mention of the desktop version of the application. Additionally, a new section has been added to the deprecation documentation to clarify the end of support for the FiftyOne Desktop package.

Changes

File Path Change Summary
README.md Removed fiftyone-desktop from uninstall command.
app/packages/app/src/components/Analytics.tsx Removed conditional check for isElectron, hardcoded kind to "Web".
app/packages/app/src/components/Setup.tsx Removed import of isElectron and simplified server port determination logic.
app/packages/app/src/routing/RouterContext.ts Removed isElectron usage and streamlined router history creation.
app/packages/components/src/components/ExternalLink/ExternalLink.tsx Removed functionality from useExternalLink hook, returning undefined.
app/packages/looker/src/elements/common/error.ts Removed click event listener for external links, simplifying link handling.
app/packages/utilities/src/fetch.ts Removed Electron-specific logic from getAPI function, defaulting to window.location.origin.
app/packages/utilities/src/index.ts Removed isElectron import and simplified useExternalLink function.
docs/source/cheat_sheets/fiftyone_terminology.rst Updated documentation to remove mention of desktop app.
docs/source/cli/index.rst Removed references to launching/viewing desktop app in CLI documentation.
docs/source/deprecation.rst Added section about the end of support for fiftyone-desktop.
docs/source/environments/index.rst Removed section on using the desktop app.
docs/source/faq/index.rst Removed references to desktop app installation and usage.
docs/source/getting_started/install.rst Removed installation instructions for the desktop app.
docs/source/user_guide/app.rst Removed reference to desktop app installation.
docs/source/user_guide/config.rst Removed desktop_app configuration option.
fiftyone/core/cli.py Removed desktop session options from command classes.
fiftyone/core/config.py Removed initialization of desktop_app attribute.
fiftyone/core/service.py Removed AppService class entirely.
fiftyone/core/session/client.py Removed desktop attribute from Client class.
fiftyone/core/session/session.py Removed desktop support from launch_app function and Session class.
setup.py Removed EXTRAS_REQUIREMENTS related to desktop installation.
tests/intensive/similarity_tests.py Removed desktop=True argument from test cases for launch_app.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant CLI
    participant Documentation

    User->>CLI: Launch App
    CLI->>App: Start Application
    App->>User: Display Web Interface
    Documentation-->>User: Provide Instructions
Loading

🐰 In a world of code, we hop and play,
Removing the desktop, we cheer today!
With web-based paths, our journey's bright,
A simpler way to share our light.
So here’s to the changes, let’s all rejoice,
For clarity gained, we lift our voice! 🎉


Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b851856 and 88e9919.

Files selected for processing (1)
  • docs/source/deprecation.rst (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • docs/source/deprecation.rst

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@benjaminpkane benjaminpkane self-assigned this Aug 29, 2024
@benjaminpkane benjaminpkane marked this pull request as ready for review September 10, 2024 14:29
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (1)
fiftyone/core/config.py (1)

Verify and update the reference to desktop_app in fiftyone/utils/quickstart.py.

The desktop_app attribute is referenced in the fiftyone/utils/quickstart.py file. Since its initialization has been removed from the FiftyOneConfig class, ensure that this reference is still valid or update it accordingly to prevent potential issues.

  • File: fiftyone/utils/quickstart.py
  • Reference: fiftyone.config.desktop_app
Analysis chain

Line range hint 80-80: Verify the impact of removing the desktop_app attribute initialization.

The desktop_app attribute initialization has been removed from the __init__ method. This change suggests that the desktop app functionality is being deprecated.

Check if any logic in the codebase depends on the desktop_app attribute being initialized, and update it accordingly. Use the following script to search for potential usages:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for potential usages of the `desktop_app` attribute.

# Test: Search for accesses to the `desktop_app` attribute. Expect: No concerning usages.
rg --type python 'desktop_app' -A 5

Length of output: 66


Script:

#!/bin/bash
# Description: Search for potential usages of the `desktop_app` attribute.

# Test: Search for accesses to the `desktop_app` attribute. Expect: No concerning usages.
rg --type py 'desktop_app' -A 5

Length of output: 379

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 368b6de and 3d25a90.

Files ignored due to path filters (17)
  • app/package.json is excluded by !**/*.json
  • app/packages/app/package.json is excluded by !**/*.json
  • app/packages/desktop/package.json is excluded by !**/*.json
  • app/packages/desktop/resources/icon.ico is excluded by !**/*.ico
  • app/packages/desktop/resources/icon.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/resources/icons/1024x1024.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/resources/icons/128x128.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/resources/icons/16x16.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/resources/icons/24x24.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/resources/icons/256x256.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/resources/icons/32x32.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/resources/icons/48x48.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/resources/icons/512x512.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/resources/icons/64x64.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/resources/icons/96x96.png is excluded by !**/*.png, !**/*.png
  • app/packages/desktop/tsconfig.json is excluded by !**/*.json
  • app/yarn.lock is excluded by !**/yarn.lock, !**/*.lock, !**/*.lock
Files selected for processing (23)
  • README.md (2 hunks)
  • app/packages/app/src/components/Analytics.tsx (2 hunks)
  • app/packages/app/src/components/Setup.tsx (2 hunks)
  • app/packages/app/src/routing/RouterContext.ts (2 hunks)
  • app/packages/components/src/components/ExternalLink/ExternalLink.tsx (1 hunks)
  • app/packages/looker/src/elements/common/error.ts (2 hunks)
  • app/packages/utilities/src/fetch.ts (2 hunks)
  • app/packages/utilities/src/index.ts (2 hunks)
  • docs/source/cheat_sheets/fiftyone_terminology.rst (1 hunks)
  • docs/source/cli/index.rst (5 hunks)
  • docs/source/deprecation.rst (1 hunks)
  • docs/source/environments/index.rst (1 hunks)
  • docs/source/faq/index.rst (4 hunks)
  • docs/source/getting_started/install.rst (3 hunks)
  • docs/source/user_guide/app.rst (1 hunks)
  • docs/source/user_guide/config.rst (3 hunks)
  • fiftyone/core/cli.py (11 hunks)
  • fiftyone/core/config.py (1 hunks)
  • fiftyone/core/service.py (2 hunks)
  • fiftyone/core/session/client.py (1 hunks)
  • fiftyone/core/session/session.py (18 hunks)
  • setup.py (2 hunks)
  • tests/intensive/similarity_tests.py (3 hunks)
Files skipped from review due to trivial changes (15)
  • README.md
  • app/packages/app/src/components/Setup.tsx
  • app/packages/components/src/components/ExternalLink/ExternalLink.tsx
  • app/packages/utilities/src/index.ts
  • docs/source/cheat_sheets/fiftyone_terminology.rst
  • docs/source/cli/index.rst
  • docs/source/deprecation.rst
  • docs/source/environments/index.rst
  • docs/source/faq/index.rst
  • docs/source/getting_started/install.rst
  • docs/source/user_guide/app.rst
  • docs/source/user_guide/config.rst
  • fiftyone/core/cli.py
  • fiftyone/core/session/client.py
  • setup.py
Additional context used
Path-based instructions (4)
app/packages/app/src/components/Analytics.tsx (1)

Pattern **/*.{ts,tsx}: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.

app/packages/looker/src/elements/common/error.ts (1)

Pattern **/*.{ts,tsx}: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.

app/packages/app/src/routing/RouterContext.ts (1)

Pattern **/*.{ts,tsx}: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.

app/packages/utilities/src/fetch.ts (1)

Pattern **/*.{ts,tsx}: Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.

Additional comments not posted (14)
tests/intensive/similarity_tests.py (2)

28-28: Verify the impact of removing the desktop=True argument.

Ensure that removing the desktop=True argument from the fo.launch_app function call does not adversely affect the test case or the application's behavior.

Run the following script to verify the test case:


43-43: Verify the impact of removing the desktop=True argument.

Ensure that removing the desktop=True argument from the fo.launch_app function call does not adversely affect the test case or the application's behavior.

Run the following script to verify the test case:

Verification successful

The removal of the desktop=True argument does not impact the function's behavior.

The launch_app function in fiftyone/core/session/session.py does not include a desktop parameter in its signature, indicating that its removal from the test case does not affect the application's behavior. The function's behavior is controlled by other parameters such as dataset, view, remote, and config.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the `test_object_similarity` test case.

# Test: Run the test case. Expect: The test case should pass without any errors.
pytest tests/intensive/similarity_tests.py -s -k test_object_similarity

Length of output: 147


Script:

#!/bin/bash
# Search for the definition of the `launch_app` function to understand its default behavior.
ast-grep --lang python --pattern 'def launch_app($_$$$):'

Length of output: 59


Script:

#!/bin/bash
# Search for occurrences of `launch_app` to find its definition or import statement.
rg 'launch_app' --context 5

Length of output: 278083


Script:

#!/bin/bash
# Extract the implementation of the `launch_app` function to understand its default behavior.
ast-grep --lang python --pattern 'def launch_app($_$$$):' fiftyone/core/session/session.py

Length of output: 92


Script:

#!/bin/bash
# Search for the definition of the `launch_app` function in `fiftyone/core/session/session.py`.
rg 'def launch_app' -A 20 fiftyone/core/session/session.py

Length of output: 675

app/packages/app/src/components/Analytics.tsx (1)

23-23: Verify the impact of hardcoding the kind property to "Web".

Ensure that hardcoding the kind property to always be "Web" does not adversely affect the analytics tracking or reporting.

Perform the following steps to verify the change:

  1. Search for all occurrences of the kind property in the codebase.
  2. Analyze how the kind property is used in the analytics tracking and reporting.
  3. Verify that hardcoding the kind property to "Web" does not break any existing functionality or introduce inconsistencies in the analytics data.

Run the following script to search for the occurrences of the kind property:

Verification successful

Hardcoding the kind property to "Web" in Analytics.tsx does not impact analytics tracking.

The change is isolated to the Analytics.tsx component and does not affect other parts of the codebase related to analytics tracking or reporting. No issues were found with this modification.

  • Location: app/packages/app/src/components/Analytics.tsx at line 23
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for occurrences of the `kind` property.

# Test: Search for the `kind` property. Expect: Occurrences in relevant analytics tracking and reporting code.
rg --type typescript $'kind'

Length of output: 62


Script:

#!/bin/bash
# Description: Search for occurrences of the `kind` property in TypeScript files.

# Test: Search for the `kind` property. Expect: Occurrences in relevant analytics tracking and reporting code.
rg 'kind' --glob '*.ts' --glob '*.tsx' -A 3

Length of output: 445576

app/packages/looker/src/elements/common/error.ts (3)

66-69: LGTM!

The code changes are approved.


113-113: LGTM!

The code changes are approved.


Line range hint 1-1: LGTM!

The removal of the isElectron function is approved.

app/packages/app/src/routing/RouterContext.ts (2)

14-14: LGTM!

The removal of the isElectron import is approved as it aligns with the PR objective of removing the desktop application.


70-70: LGTM, but verify the router behavior.

The removal of the Electron environment check in the createRouter function is approved as it aligns with the PR objective of removing the desktop application.

However, ensure that the router behaves as expected in different environments (notebook and browser) and that there are no unintended side effects due to this change.

Run the following script to verify the router behavior:

app/packages/utilities/src/fetch.ts (2)

Line range hint 1-1: LGTM!

The removal of the isElectron import is approved as it aligns with the PR objective of removing the desktop application.


229-234: LGTM!

The removal of the Electron environment check in the getAPI function is approved as it aligns with the PR objective of removing the desktop application. The updated logic to handle the browser environment looks good.

fiftyone/core/service.py (1)

Line range hint 1-8: LGTM!

The removal of the AppService class is approved as it aligns with the PR objective of removing the desktop application. This is a significant change that indicates a shift in the architecture and service management of the FiftyOne application.

fiftyone/core/session/session.py (3)

1027-1028: LGTM!

The removal of the desktop parameter and its associated documentation from the launch_app function is approved. This change aligns with the deprecation of the desktop app functionality.


1057-1057: LGTM!

The removal of the desktop parameter and the stripping of desktop-related initialization logic from the Session constructor is approved. This change aligns with the deprecation of the desktop app functionality, simplifying the constructor to focus on browser-based sessions.


1112-1113: LGTM!

The removal of the desktop property from the Session class is approved. This change aligns with the deprecation of the desktop app functionality, ensuring that the class no longer exposes any desktop-related properties.

Copy link
Member

@findtopher findtopher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in, let's do this thing

@benjaminpkane benjaminpkane merged commit 871016d into develop Sep 11, 2024
14 checks passed
@benjaminpkane benjaminpkane deleted the chore/rm-desktop branch September 11, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleaning Code cleaning core Issues related to Core features dependencies Pull requests that update a dependency file desktop app Issues related to the FiftyOne Desktop App documentation Documentation work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants