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

Command to Run Algos #337

Merged
merged 10 commits into from
Mar 4, 2023
Merged

Command to Run Algos #337

merged 10 commits into from
Mar 4, 2023

Conversation

uhuruhashimoto
Copy link
Collaborator

@uhuruhashimoto uhuruhashimoto commented Mar 3, 2023

Goal

Add ability to run algos from the frontend

Implementation

  • Added a state variable with a mutex
  • Added a new function for the initialization of the Graph and State (which also calls clone on the arc - docs)
  • Added serialization to the AlgoResults structs and enum
  • fixed graph unit tests

Testing

  • Client builds successfully
  • command can be invoked from frontend with __TAURI_INVOKE__("run_algorithms", {bitfield:0b11011}).then(console.log).catch(console.error)
  • No testing with real graph for coherent results yet

src-tauri/src/main.rs Outdated Show resolved Hide resolved
src-tauri/src/main.rs Outdated Show resolved Hide resolved
src-tauri/src/analytics/algos_config.rs Show resolved Hide resolved
src-tauri/src/main.rs Outdated Show resolved Hide resolved
src-tauri/src/main.rs Show resolved Hide resolved
@barkincavdaroglu
Copy link
Contributor

The discussion on saving data functionality is redundant for the time being. Algorithms that need prior data will use dummy data, but timeline must be kept until the the end, but this doesn't require saving data as the timeline is kept in memory.

@uhuruhashimoto
Copy link
Collaborator Author

uhuruhashimoto commented Mar 3, 2023

Testing problem: client does not work for 0b100 (__TAURI_INVOKE__("run_algorithms", {bitfield:100}).then(console.log).catch(console.error)) (diffusion centrality).

Frontend gets this error:
Screen Shot 2023-03-03 at 5 12 26 PM

Added as a bug to the board.

Copy link
Member

@ajmcquilkin ajmcquilkin left a comment

Choose a reason for hiding this comment

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

Looks solid! Just ran on my machine, algos didn't return anything bc I'm not connected but didn't see any issues during execution

@uhuruhashimoto uhuruhashimoto merged commit 69dfc79 into main Mar 4, 2023
@uhuruhashimoto uhuruhashimoto deleted the uhuruhashimoto/algo-commands branch March 4, 2023 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants