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

Update py/embedded-server setup for PyPi #2739

Merged
merged 4 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
41 changes: 41 additions & 0 deletions py/embedded-server/README_PyPi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Deephaven Python Embedded Server
jjbrosnan marked this conversation as resolved.
Show resolved Hide resolved

Embeds the Deephaven Core server into a python module, so that it can be started from python, with tables produced
directly as part of startup.
jjbrosnan marked this conversation as resolved.
Show resolved Hide resolved

## Setup

Java 11+ is required for this module, and the `JAVA_HOME` environment variable must be set appropriately. Once that's done, you can use pip:
jjbrosnan marked this conversation as resolved.
Show resolved Hide resolved

```shell
pip3 install --upgrade pip setuptools wheel
pip3 install deephaven-server
```

## Dev environment setup

Java 11 and Docker are required to build this project, as most of the repository is needed to properly build it.
Note that jpy or deephaven-jpy (built for your OS and archetecture) and the deephaven server apiwheel is also
required.

### Build
From the root directory of this repository
```shell
$ ./gradlew :py-embedded-server:assemble
```

### Install
```shell
$ pip install py/embedded-server/build/wheel/deephaven_server-0.12.0-py3-none-any.whl
```
jjbrosnan marked this conversation as resolved.
Show resolved Hide resolved

## Quick start

jjbrosnan marked this conversation as resolved.
Show resolved Hide resolved
```python
from deephaven_server import Server
server = Server()
server.start()

from deephaven import time_table
ticking_table = time_table('00:00:01').update_view(formulas=["Col1 = i % 2"])
```
2 changes: 1 addition & 1 deletion py/embedded-server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
HERE = pathlib.Path(__file__).parent

# The text of the README file
README = (HERE / "README.md").read_text()
README = (HERE / "README_PyPi.md").read_text()


# Versions should comply with PEP440. For a discussion on single-sourcing
Expand Down