Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/user-guide/algorithms/4_view-algorithms.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Running algorithms on graph views
# Running algorithms on GraphViews

Both `graphwide` and `node centric` algorithms can be run on `graph views`. This allows us to see how results change over time, run algorithms on subsets of the layers, or remove specific nodes from the graph to see the impact this has.
Both `graphwide` and `node centric` algorithms can be run on `GraphViews`. This allows us to see how results change over time, run algorithms on subsets of the layers, or remove specific nodes from the graph to see the impact this has.

To demonstrate this, the following example shows how you could track Gandalf's importance over the course of the story using rolling windows and the `PageRank` algorithm.

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/export/2_dataframes.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export the property history for each edge, split by edge layer. This is because
explode the edges and view each update individually (which will then ignore the `include_property_history` flag).

In the below example we first create a subgraph of the monkey interactions, selecting `ANGELE` and `FELIPE` as the
monkeys we are interested in. This isn't a required step, but helps to demonstrate the export of graph views.
monkeys we are interested in. This isn't a required step, but helps to demonstrate the export of GraphViews.

Then we call `to_df()` on the subgraph edges, setting no flags. In the output you can see the property history for each
interaction type (layer) between `ANGELE` and `FELIPE`.
Expand Down
3 changes: 3 additions & 0 deletions docs/user-guide/getting-started/1_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ client.send_graph("OBS-graph", g, overwrite=True)

This will start the UI locally on the default port `1736`, you should see **Search** page by default.

!!! Note
You can also start a standalone server using the Raphtory CLI tool or Docker image.

![UI Search page](../../assets/images/raphtory_ui_search_empty.png)

You can use the **Query Builder** to select the graph you created and identify which baboons attacked each other in the last month.
Expand Down
1 change: 1 addition & 0 deletions docs/user-guide/getting-started/3_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ raphtory server --port 1736
| Command | Parameter(s) | Description |
|-----------------------------|---------------------------|---------------------------------------------------------------------|
| -h, --help | | Show the help message and exit |
| --work-dir | WORK_DIR | Working directory |
| --cache-capacity | CACHE_CAPACITY | Cache capacity |
| --cache-tti-seconds | CACHE_TTI_SECONDS | Cache time-to-idle in seconds |
| --log-level | LOG_LEVEL | Log level |
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/graphql/1_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

[GraphQL](https://graphql.org/) is a query language for your API, and a server-side runtime for executing queries using a type system you define for your data. Using GraphQL can help you can reduce over-fetching and under-fetching of data compared to other REST APIs.

It is possible to query Raphtory graphs in GraphQL. The GraphQL server provides an IDE available at `localhost:1736/playground` where you can write GraphQL queries. Alternatively, you can write all your GraphQL queries in Python and easily update, send and receive Raphtory graphs from the GraphQL server.
It is possible to query and modify Raphtory graphs in GraphQL. The GraphQL server provides an IDE available at `localhost:1736/playground` where you can write GraphQL queries. Alternatively, you can write all your GraphQL queries in Python and easily update, send and receive Raphtory graphs from the GraphQL server.

This section will show you how to start a GraphQL server and run your own queries on your data.
33 changes: 10 additions & 23 deletions docs/user-guide/graphql/2_run-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,25 @@ g.save_to_file(working_dir + "your_graph")
```
///

## Starting a server with .run()
## Starting a server

To run the GraphQL server with `.run()`, create a python file `run_server.py` with the following code:
You can start the raphtory GraphQL in multiple ways depending on your usecase.

/// tab | :fontawesome-brands-python: Python
```{.python notest}
from raphtory import graphql

import argparse
parser = argparse.ArgumentParser(description="For passing the working_dir")
parser.add_argument(
"--working_dir",
type=str,
help="path for the working directory of the raphtory server",
)
args = parser.parse_args()
### Using the CLI

server = graphql.GraphServer(args.working_dir)
You can use the [Raphtory CLI](../getting-started/3_cli.md) with the `server` command by running:

server.run()
```sh
raphtory server --port 1736
```
///

To run the server:
This option is the simplist and provides the most configuration options.

```bash
python run_server.py --working_dir ../your_working_dir
```
### Start a server in Python

## Starting a server with .start()
If you have a [`GraphServer`][raphtory.graphql.GraphServer] object you can use either the [`.run()`][raphtory.graphql.GraphServer.run] or [`.start()`][raphtory.graphql.GraphServer.start] functions to start a GraphQL sever and Raphtory UI.

It is also possible to start the server in Python with `.start()`. Below is an example of how to start the server and send a Raphtory graph to the server, where `new_graph` is your Raphtory graph object.
Below is an example of how to start the server and send a Raphtory graph to the server, where `new_graph` is your Raphtory graph object.

/// tab | :fontawesome-brands-python: Python
```{.python notest}
Expand Down
Loading
Loading