Skip to content

Commit

Permalink
Update readme, docs, and version (#283)
Browse files Browse the repository at this point in the history
* update docs

* update readme and add changelog

* update version
  • Loading branch information
katarinasupe authored Sep 22, 2023
1 parent 2b6e010 commit 24f7b77
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 34 deletions.
46 changes: 30 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# GQLAlchemy


<p>
<a href="https://github.com/memgraph/gqlalchemy/actions"><img src="https://github.com/memgraph/gqlalchemy/workflows/Build%20and%20Test/badge.svg" /></a>
<a href="https://github.com/memgraph/gqlalchemy/blob/main/LICENSE"><img src="https://img.shields.io/github/license/memgraph/gqlalchemy" /></a>
Expand All @@ -16,26 +15,38 @@ An Object Graph Mapper or OGM provides a developer-friendly workflow that allows

## Installation

GQLAlchemy is built on top of Memgraph's low-level Python client `pymgclient`
([PyPI](https://pypi.org/project/pymgclient/) /
[Documentation](https://memgraph.github.io/pymgclient/) /
[GitHub](https://github.com/memgraph/pymgclient)).
To install GQLAlchemy, you will need the following:

- **Python 3.8 - 3.11**
- `pymgclient` [build prerequisites](https://memgraph.github.io/pymgclient/introduction.html#build-prerequisites): GQLAlchemy is built on top of Memgraph's low-level Python client `pymgclient`

> [!WARNING]
> Python 3.11 users: On Windows, GQLAlchemy is not yet compatible with this Python version. Linux users can install GQLAlchemy **without** the DGL extra (due to its dependencies not supporting Python 3.11 yet). If this is currently a blocker for you, please let us know by [opening an issue](https://github.com/memgraph/gqlalchemy/issues).
To install GQLAlchemy, you first need to install `pymgclient` [build prerequisites](https://memgraph.github.io/pymgclient/introduction.html#build-prerequisites).
After you’ve installed the prerequisites, run the following command to install
GQLAlchemy:

After you have installed the prerequisites, run the following command:
```bash
pip install gqlalchemy
```

`pip install gqlalchemy`
With the above command, you get the default GQLAlchemy installation which
doesn’t include import/export support for certain formats (see below). To get
additional import/export capabilities, use one of the following install options:

With the above command, you get the basic GQLAlchemy capabilities. To add additional import/export capabilities, install GQLAlchemy with one of the following commands:
```bash
pip install gqlalchemy[arrow] # Support for the CSV, Parquet, ORC and IPC/Feather/Arrow formats
pip install gqlalchemy[dgl] # DGL support (also includes torch)
pip install gqlalchemy[docker] # Docker support

- `pip install gqlalchemy[arrow]` # Support for the CSV, Parquet, ORC and IPC/Feather/Arrow formats
- `pip install gqlalchemy[dgl]` # DGL support (includes PyTorch)
- `pip install gqlalchemy[docker]` # Docker support
pip install gqlalchemy[all] # All of the above
```

- `pip install gqlalchemy[all]` # All of the above
If you are using the zsh terminal, surround `gqlalchemy[$extras]` with quotes:

Users of the zsh terminal should surround `gqlalchemy[$extras)]` with quotes: `pip install 'gqlalchemy[arrow]'`
```bash
pip install 'gqlalchemy[arrow]'
```

If you intend to use GQLAlchemy with PyTorch Geometric support, that library must be installed manually:

Expand All @@ -54,8 +65,8 @@ The project uses [Poetry](https://python-poetry.org/) to build the library. Clon
poetry install --all-extras
```
The ``poetry install --all-extras`` command installs GQLAlchemy with all extras
(optional dependencies). Alternatively, you can use the ``-E`` option to define
The `poetry install --all-extras` command installs GQLAlchemy with all extras
(optional dependencies). Alternatively, you can use the `-E` option to define
what extras to install:
```bash
Expand All @@ -81,6 +92,7 @@ poetry run pytest . -k "arrow"
poetry run pytest . -k "dgl"
poetry run pytest . -k "docker"
```
## Development (how to build)
```bash
Expand All @@ -94,12 +106,14 @@ poetry run pytest . -k "not slow and not extras"
The GQLAlchemy documentation is available on [GitHub](https://memgraph.github.io/gqlalchemy/).
The reference guide can be generated from the code by executing:
```
pip3 install pydoc-markdown
pydoc-markdown
```
Other parts of the documentation are written and located at docs directory. To test the documentation locally execute:
```
pip3 install mkdocs
pip3 install mkdocs-material
Expand Down
35 changes: 28 additions & 7 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## v1.5.0 - September 22, 2023

### Features and improvements

- Added `get_or_create()` metod for `Node` and `Relationship` to simplify merging nodes and relationships (https://github.com/memgraph/gqlalchemy/pull/244)
- Added spelling fixes (https://github.com/memgraph/gqlalchemy/pull/251)
- Turned `docker` into an optional dependency (https://github.com/memgraph/gqlalchemy/pull/279)

### Bug fixes

- Fixed typing for `get_triggers` method (https://github.com/memgraph/gqlalchemy/pull/260)

### Updates

- Added support for Python 3.11 on Linux (https://github.com/memgraph/gqlalchemy/pull/281)
- Added support for Python 3.10 on Windows (https://github.com/memgraph/gqlalchemy/pull/281)
- Relaxed `neo4j` dependency (https://github.com/memgraph/gqlalchemy/pull/263/files)
- Bumped `pydantic` to v2 (https://github.com/memgraph/gqlalchemy/pull/278)

**Special thanks to all our outside contributors for their efforts!** 👏

!!! note
We are hoping to have full support for Python 3.11 soon. Please [open an issue](https://github.com/memgraph/gqlalchemy/issues) if you have any blockers with the current update.

## v1.4.1 - April 19, 2023

### Features and improvements
Expand Down Expand Up @@ -40,8 +64,8 @@
- Updated all dependencies [#194](https://github.com/memgraph/gqlalchemy/pull/194)

## v1.3 - Jun 14, 2022
!!! warning
### Breaking Changes

!!! warning ### Breaking Changes

- Renamed keyword argument `edge_label` to `relationship_type` in `to()` and `from()` methods in the query builder. [#145](https://github.com/memgraph/gqlalchemy/pull/145)

Expand All @@ -54,7 +78,7 @@
- Added `foreach()` method to the query builder. [#135](https://github.com/memgraph/gqlalchemy/pull/135)
- Added `load_csv()` and `return()` methods from the query builder to base classes list. [#139](https://github.com/memgraph/gqlalchemy/pull/139)
- Added new argument types in `return_()`, `yield_()` and `with_()` methods in the query builder. [#146](https://github.com/memgraph/gqlalchemy/pull/146)
- Added `IntegratedAlgorithm` class instance as argument in `to()` and `from()` methods in the query builder. [#141](https://github.com/memgraph/gqlalchemy/pull/141)
- Added `IntegratedAlgorithm` class instance as argument in `to()` and `from()` methods in the query builder. [#141](https://github.com/memgraph/gqlalchemy/pull/141)
- Extended `IntegratedAlgorithm` class with the Breadth-first search algorithm. [#142](https://github.com/memgraph/gqlalchemy/pull/142)
- Extended `IntegratedAlgorithm` class with the Weighted shortest path algorithm. [#143](https://github.com/memgraph/gqlalchemy/pull/143)
- Extended `IntegratedAlgorithm` class with the Depth-first search algorithm. [#144](https://github.com/memgraph/gqlalchemy/pull/144)
Expand All @@ -71,17 +95,14 @@
- Added `Operator` enum which can be used as `operator` value in `set_()` and `where()` methods in the query builder. [#165](https://github.com/memgraph/gqlalchemy/pull/165)
- Added an extension to the `QueryBuilder` class to support and autocomplete integrated and MAGE query modules. [#168](https://github.com/memgraph/gqlalchemy/pull/168)


### Bug fixes

- Fixed the unbound variable error in the return statement of the Cypher query in `memgraph.save_relationship_with_id()`. [#166](https://github.com/memgraph/gqlalchemy/pull/166)
- Fixed checking if `None` for `Optional` properties. [#167](https://github.com/memgraph/gqlalchemy/pull/167)


## v1.2 - Apr 12, 2022

!!! warning
### Breaking Changes
!!! warning ### Breaking Changes

- Ordering query results as in GQLAlchemy older than 1.2 will not be possible.
- `where()`, `and_where()` and `or_where()` methods can't be used as in
Expand Down
25 changes: 16 additions & 9 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ as pip and Poetry, and by building it from source.

To install GQLAlchemy, you will need the following:

- **Python 3.8 - 3.10**
- GQLAlchemy is built on top of Memgraph's low-level Python client `pymgclient`, so you need to install `pymgclient` [build prerequisites](https://memgraph.github.io/pymgclient/introduction.html#build-prerequisites).
- **Python 3.8 - 3.11**
- `pymgclient` [build prerequisites](https://memgraph.github.io/pymgclient/introduction.html#build-prerequisites): GQLAlchemy is built on top of Memgraph's low-level Python client `pymgclient`

!!! danger
GQLAlchemy can't be installed with Python 3.11 [(#203)](https://github.com/memgraph/gqlalchemy/issues/203) and on Windows with Python >= 3.10 [(#179)](https://github.com/memgraph/gqlalchemy/issues/179). If this is currently a blocker for you, please let us know by commenting on opened issues.
!!! danger
Python 3.11 users: On Windows, GQLAlchemy is not yet compatible with this Python version. Linux users can install GQLAlchemy **without** the DGL extra (due to its dependencies not supporting Python 3.11 yet). If this is currently a blocker for you, please let us know by [opening an issue](https://github.com/memgraph/gqlalchemy/issues).

## Install with pip {#pip}
## Install with pip

After you’ve installed the prerequisites, run the following command to install
GQLAlchemy:
Expand All @@ -34,13 +34,20 @@ pip install gqlalchemy[docker] # Docker support
pip install gqlalchemy[all] # All of the above
```

!!! note
If you are using the zsh terminal, surround `gqlalchemy[$extras)]` with quotes:
!!! note
If you are using the zsh terminal, surround `gqlalchemy[$extras)]` with quotes:

```bash
pip install 'gqlalchemy[arrow]'
```

If you intend to use GQLAlchemy with PyTorch Geometric support, that library must be installed manually:

```bash
pip install gqlalchemy[torch_pyg] # prerequisite
pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.13.0+cpu.html"
```
## Build from source
Clone or download the [GQLAlchemy source code](https://github.com/memgraph/gqlalchemy) locally and run the following command to build it from source with Poetry:
Expand All @@ -49,8 +56,8 @@ Clone or download the [GQLAlchemy source code](https://github.com/memgraph/gqlal
poetry install --all-extras
```
The ``poetry install --all-extras`` command installs GQLAlchemy with all extras
(optional dependencies). Alternatively, you can use the ``-E`` option to define
The `poetry install --all-extras` command installs GQLAlchemy with all extras
(optional dependencies). Alternatively, you can use the `-E` option to define
what extras to install:
```bash
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[tool.poetry]
name = "GQLAlchemy"
version = "1.4.1"
version = "1.5.0"

description = "GQLAlchemy is a library developed to assist with writing and running queries in Memgraph."
repository = "https://github.com/memgraph/gqlalchemy"
authors = [
"Bruno Sacaric <[email protected]>",
"Josip Mrden <[email protected]>",
"Katarina Supe <[email protected]>",
"Andi Skrgat <[email protected]>",
Expand Down

0 comments on commit 24f7b77

Please sign in to comment.