Skip to content
Open
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
325 changes: 206 additions & 119 deletions README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions data/batch/file1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Name,Score,Value,Category
Alice,85,120,A
Bob,92,150,B
Charlie,78,95,A
4 changes: 4 additions & 0 deletions data/batch/file2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Name,Score,Value,Category
Diana,88,110,C
Eve,95,180,B
Frank,72,85,A
5 changes: 5 additions & 0 deletions data/batch/file3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Name,Score,Value,Category
Grace,91,160,C
Henry,83,105,B
Iris,89,140,A
Jack,76,90,C
11 changes: 11 additions & 0 deletions data/sample.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Name,Score,Value,Category
Alice,85,120,A
Bob,92,150,B
Charlie,78,95,A
Diana,88,110,C
Eve,95,180,B
Frank,72,85,A
Grace,91,160,C
Henry,83,105,B
Iris,89,140,A
Jack,76,90,C
57 changes: 57 additions & 0 deletions my_dh_cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# My Deephaven CLI

A CLI-only package providing command-line tools for data processing with Deephaven. This package is designed to be installed and run as a command-line tool.

## Installation

```shell
pip install .
```

Or in editable mode for development:

```shell
pip install -e .
```

## Usage

> [!NOTE]
> CLI functions require a Deephaven server running in the same Python process. Use the functions within a Python session where the server is already started.

```shell
pip install -e .
python
```

Then in Python:

```python
# Start the Deephaven server
from deephaven_server import Server
server = Server(port=10000, jvm_args=["-Xmx4g"])
server.start()

# Now use the CLI function
from my_dh_cli.cli import my_dh_query
result = my_dh_query("../data/sample.csv", verbose=True)
print(f"Processed {result.size} rows")
```

## Commands

### my-dh-query

Process a CSV file with Deephaven.

**Arguments:**
- `input_file` - Path to the CSV file to process

**Options:**
- `--verbose, -v` - Enable verbose output

## Requirements

- Python 3.8 or later
- Deephaven Server 0.35.0 or later
- Click 8.0.0 or later
20 changes: 20 additions & 0 deletions my_dh_cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "my_dh_cli"
version = "0.1.0"
description = "Command-line tool for data processing"
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"deephaven-server>=0.35.0",
"click>=8.0.0",
]

[project.scripts]
my-dh-query = "my_dh_cli.cli:app"

[tool.setuptools.packages.find]
where = ["src"]
59 changes: 59 additions & 0 deletions my_dh_cli/src/my_dh_cli.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Metadata-Version: 2.4
Name: my_dh_cli
Version: 0.1.0
Summary: Command-line tool for data processing
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: deephaven-server>=0.35.0
Requires-Dist: click>=8.0.0

# My Deephaven CLI

A CLI-only package providing command-line tools for data processing with Deephaven. This package is designed to be installed and run as a command-line tool.

## Installation

```shell
pip install .
```

Or in editable mode for development:

```shell
pip install -e .
```

## Usage

After installation, use the command-line tool:

```shell
my-dh-query input_data.csv
my-dh-query input_data.csv --verbose
```

### Module Execution

You can also run without installation using module execution:

```shell
python -m my_dh_cli input_data.csv
```

## Commands

### my-dh-query

Process a CSV file with Deephaven.

**Arguments:**
- `input_file` - Path to the CSV file to process

**Options:**
- `--verbose, -v` - Enable verbose output

## Requirements

- Python 3.8 or later
- Deephaven Server 0.35.0 or later
- Click 8.0.0 or later
Comment on lines +1 to +59
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Suggested change
Metadata-Version: 2.4
Name: my_dh_cli
Version: 0.1.0
Summary: Command-line tool for data processing
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: deephaven-server>=0.35.0
Requires-Dist: click>=8.0.0
# My Deephaven CLI
A CLI-only package providing command-line tools for data processing with Deephaven. This package is designed to be installed and run as a command-line tool.
## Installation
```shell
pip install .
```
Or in editable mode for development:
```shell
pip install -e .
```
## Usage
After installation, use the command-line tool:
```shell
my-dh-query input_data.csv
my-dh-query input_data.csv --verbose
```
### Module Execution
You can also run without installation using module execution:
```shell
python -m my_dh_cli input_data.csv
```
## Commands
### my-dh-query
Process a CSV file with Deephaven.
**Arguments:**
- `input_file` - Path to the CSV file to process
**Options:**
- `--verbose, -v` - Enable verbose output
## Requirements
- Python 3.8 or later
- Deephaven Server 0.35.0 or later
- Click 8.0.0 or later

Copilot uses AI. Check for mistakes.
11 changes: 11 additions & 0 deletions my_dh_cli/src/my_dh_cli.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
README.md
pyproject.toml
src/my_dh_cli/__init__.py
src/my_dh_cli/__main__.py
src/my_dh_cli/cli.py
src/my_dh_cli.egg-info/PKG-INFO
src/my_dh_cli.egg-info/SOURCES.txt
src/my_dh_cli.egg-info/dependency_links.txt
src/my_dh_cli.egg-info/entry_points.txt
src/my_dh_cli.egg-info/requires.txt
src/my_dh_cli.egg-info/top_level.txt
Comment on lines +1 to +11
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Suggested change
README.md
pyproject.toml
src/my_dh_cli/__init__.py
src/my_dh_cli/__main__.py
src/my_dh_cli/cli.py
src/my_dh_cli.egg-info/PKG-INFO
src/my_dh_cli.egg-info/SOURCES.txt
src/my_dh_cli.egg-info/dependency_links.txt
src/my_dh_cli.egg-info/entry_points.txt
src/my_dh_cli.egg-info/requires.txt
src/my_dh_cli.egg-info/top_level.txt

Copilot uses AI. Check for mistakes.
1 change: 1 addition & 0 deletions my_dh_cli/src/my_dh_cli.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Copilot uses AI. Check for mistakes.
2 changes: 2 additions & 0 deletions my_dh_cli/src/my_dh_cli.egg-info/entry_points.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[console_scripts]
my-dh-query = my_dh_cli.cli:app
Comment on lines +1 to +2
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Suggested change
[console_scripts]
my-dh-query = my_dh_cli.cli:app

Copilot uses AI. Check for mistakes.
2 changes: 2 additions & 0 deletions my_dh_cli/src/my_dh_cli.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deephaven-server>=0.35.0
click>=8.0.0
Comment on lines +1 to +2
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Suggested change
deephaven-server>=0.35.0
click>=8.0.0

Copilot uses AI. Check for mistakes.
1 change: 1 addition & 0 deletions my_dh_cli/src/my_dh_cli.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
my_dh_cli
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Suggested change
my_dh_cli

Copilot uses AI. Check for mistakes.
3 changes: 3 additions & 0 deletions my_dh_cli/src/my_dh_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""My Deephaven package for data processing."""

__version__ = "0.1.0"
4 changes: 4 additions & 0 deletions my_dh_cli/src/my_dh_cli/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from my_dh_cli.cli import app

if __name__ == "__main__":
app()
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions my_dh_cli/src/my_dh_cli/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import click


def my_dh_query(input_file: str, verbose: bool = False):
"""Read a CSV file and perform a simple query operation on the data."""
from deephaven import read_csv

if verbose:
click.echo(f"Processing {input_file}...")

source = read_csv(input_file)

result = source.update(formulas=["DoubleScore = Score * 2"])
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

This function assumes the input CSV has a column named "Score" without validation. If the CSV doesn't have this column, it will fail at runtime. Consider adding validation to check if the required column exists, or add error handling to provide a helpful error message to users.

Suggested change
result = source.update(formulas=["DoubleScore = Score * 2"])
try:
result = source.update(formulas=["DoubleScore = Score * 2"])
except KeyError as exc:
# Provide a clear error message if the expected column is missing
raise click.ClickException(
"Input file must contain a 'Score' column to compute 'DoubleScore'."
) from exc

Copilot uses AI. Check for mistakes.

if verbose:
click.echo(f"Processed {result.size} rows")

return result


@click.command()
@click.argument("input_file", type=click.Path(exists=True))
@click.option("--verbose", "-v", is_flag=True, help="Enable verbose output")
def app(input_file: str, verbose: bool) -> None:
"""Process data with Deephaven."""
result = my_dh_query(input_file, verbose)
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Variable result is not used.

Suggested change
result = my_dh_query(input_file, verbose)
my_dh_query(input_file, verbose)

Copilot uses AI. Check for mistakes.
click.echo("Processing complete!")


if __name__ == "__main__":
app()
55 changes: 55 additions & 0 deletions my_dh_library/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# My Deephaven Library

A library-only package providing reusable Deephaven query functions. This package contains no CLI tools - it's designed to be imported and used as a library in other Python projects.

## Installation

```shell
pip install .
```

Or in editable mode for development:

```shell
pip install -e .
```

## Usage

> [!NOTE]
> All Deephaven functionality requires a running server. Start the server before importing Deephaven modules.

Import and use the library functions in your Python code:

```python
# Start the Deephaven server
from deephaven_server import Server
server = Server(port=10000, jvm_args=["-Xmx4g"])
server.start()

# Now use the library functions
from my_dh_library.queries import filter_by_threshold, add_computed_columns
from deephaven import read_csv

data = read_csv("data.csv")
filtered = filter_by_threshold(data, "Score", 75.0)
enhanced = add_computed_columns(filtered)
```

## Available Functions

### Query Functions (`my_dh_library.queries`)
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The module reference in the documentation is incorrect. It says "my_dh_package.queries" but should be "my_dh_library.queries" to match the actual package name.

Copilot uses AI. Check for mistakes.

- `filter_by_threshold(table, column, threshold)` - Filter table rows where column value exceeds threshold
- `add_computed_columns(table)` - Add commonly used computed columns to a table
- `summarize_by_group(table, group_col, value_col)` - Create summary statistics grouped by a column

### Utility Functions (`my_dh_library.utils`)
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The module reference in the documentation is incorrect. It says "my_dh_package.utils" but should be "my_dh_library.utils" to match the actual package name.

Copilot uses AI. Check for mistakes.

- `validate_columns(table, required_columns)` - Check if table has all required columns
- `get_table_info(table)` - Get basic information about a table

## Requirements

- Python 3.8 or later
- Deephaven Server 0.35.0 or later
16 changes: 16 additions & 0 deletions my_dh_library/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "my_dh_library"
version = "0.1.0"
description = "Reusable Deephaven query functions"
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"deephaven-server>=0.35.0",
]

[tool.setuptools.packages.find]
where = ["src"]
55 changes: 55 additions & 0 deletions my_dh_library/src/my_dh_library.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Metadata-Version: 2.4
Name: my_dh_library
Version: 0.1.0
Summary: Reusable Deephaven query functions
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: deephaven-server>=0.35.0

# My Deephaven Library

A library-only package providing reusable Deephaven query functions. This package contains no CLI tools - it's designed to be imported and used as a library in other Python projects.

## Installation

```shell
pip install .
```

Or in editable mode for development:

```shell
pip install -e .
```

## Usage

Import and use the library functions in your Python code:

```python
from my_dh_library.queries import filter_by_threshold, add_computed_columns
from deephaven import read_csv

# Use the library functions
data = read_csv("data.csv")
filtered = filter_by_threshold(data, "Score", 75.0)
enhanced = add_computed_columns(filtered)
```

## Available Functions

### Query Functions (`my_dh_package.queries`)

- `filter_by_threshold(table, column, threshold)` - Filter table rows where column value exceeds threshold
- `add_computed_columns(table)` - Add commonly used computed columns to a table
- `summarize_by_group(table, group_col, value_col)` - Create summary statistics grouped by a column

### Utility Functions (`my_dh_package.utils`)
Comment on lines +41 to +47
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The module reference in the PKG-INFO is incorrect. It says "my_dh_package.utils" but should be "my_dh_library.utils" to match the actual package name.

Suggested change
### Query Functions (`my_dh_package.queries`)
- `filter_by_threshold(table, column, threshold)` - Filter table rows where column value exceeds threshold
- `add_computed_columns(table)` - Add commonly used computed columns to a table
- `summarize_by_group(table, group_col, value_col)` - Create summary statistics grouped by a column
### Utility Functions (`my_dh_package.utils`)
### Query Functions (`my_dh_library.queries`)
- `filter_by_threshold(table, column, threshold)` - Filter table rows where column value exceeds threshold
- `add_computed_columns(table)` - Add commonly used computed columns to a table
- `summarize_by_group(table, group_col, value_col)` - Create summary statistics grouped by a column
### Utility Functions (`my_dh_library.utils`)

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +47
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The module reference in the PKG-INFO is incorrect. It says "my_dh_package.queries" but should be "my_dh_library.queries" to match the actual package name.

Suggested change
### Query Functions (`my_dh_package.queries`)
- `filter_by_threshold(table, column, threshold)` - Filter table rows where column value exceeds threshold
- `add_computed_columns(table)` - Add commonly used computed columns to a table
- `summarize_by_group(table, group_col, value_col)` - Create summary statistics grouped by a column
### Utility Functions (`my_dh_package.utils`)
### Query Functions (`my_dh_library.queries`)
- `filter_by_threshold(table, column, threshold)` - Filter table rows where column value exceeds threshold
- `add_computed_columns(table)` - Add commonly used computed columns to a table
- `summarize_by_group(table, group_col, value_col)` - Create summary statistics grouped by a column
### Utility Functions (`my_dh_library.utils`)

Copilot uses AI. Check for mistakes.

- `validate_columns(table, required_columns)` - Check if table has all required columns
- `get_table_info(table)` - Get basic information about a table

## Requirements

- Python 3.8 or later
- Deephaven Server 0.35.0 or later
Comment on lines +1 to +55
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Suggested change
Metadata-Version: 2.4
Name: my_dh_library
Version: 0.1.0
Summary: Reusable Deephaven query functions
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: deephaven-server>=0.35.0
# My Deephaven Library
A library-only package providing reusable Deephaven query functions. This package contains no CLI tools - it's designed to be imported and used as a library in other Python projects.
## Installation
```shell
pip install .
```
Or in editable mode for development:
```shell
pip install -e .
```
## Usage
Import and use the library functions in your Python code:
```python
from my_dh_library.queries import filter_by_threshold, add_computed_columns
from deephaven import read_csv
# Use the library functions
data = read_csv("data.csv")
filtered = filter_by_threshold(data, "Score", 75.0)
enhanced = add_computed_columns(filtered)
```
## Available Functions
### Query Functions (`my_dh_package.queries`)
- `filter_by_threshold(table, column, threshold)` - Filter table rows where column value exceeds threshold
- `add_computed_columns(table)` - Add commonly used computed columns to a table
- `summarize_by_group(table, group_col, value_col)` - Create summary statistics grouped by a column
### Utility Functions (`my_dh_package.utils`)
- `validate_columns(table, required_columns)` - Check if table has all required columns
- `get_table_info(table)` - Get basic information about a table
## Requirements
- Python 3.8 or later
- Deephaven Server 0.35.0 or later
# This file is intentionally left blank.
# setuptools-generated .egg-info/PKG-INFO files should not be committed to version control.
# Configure your VCS (e.g., add '*.egg-info/' to .gitignore) so this directory is ignored,
# and rely on the packaging toolchain to regenerate it when building or installing the package.

Copilot uses AI. Check for mistakes.
10 changes: 10 additions & 0 deletions my_dh_library/src/my_dh_library.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
README.md
pyproject.toml
src/my_dh_library/__init__.py
src/my_dh_library/queries.py
src/my_dh_library/utils.py
src/my_dh_library.egg-info/PKG-INFO
src/my_dh_library.egg-info/SOURCES.txt
src/my_dh_library.egg-info/dependency_links.txt
src/my_dh_library.egg-info/requires.txt
src/my_dh_library.egg-info/top_level.txt
Comment on lines +5 to +10
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Suggested change
src/my_dh_library/utils.py
src/my_dh_library.egg-info/PKG-INFO
src/my_dh_library.egg-info/SOURCES.txt
src/my_dh_library.egg-info/dependency_links.txt
src/my_dh_library.egg-info/requires.txt
src/my_dh_library.egg-info/top_level.txt
src/my_dh_library/utils.py

Copilot uses AI. Check for mistakes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Suggested change

Copilot uses AI. Check for mistakes.
1 change: 1 addition & 0 deletions my_dh_library/src/my_dh_library.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deephaven-server>=0.35.0
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Suggested change
deephaven-server>=0.35.0
# Intentionally left blank; .egg-info build artifacts should not be tracked in version control.

Copilot uses AI. Check for mistakes.
1 change: 1 addition & 0 deletions my_dh_library/src/my_dh_library.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
my_dh_library
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Build artifacts from setuptools should not be committed to version control. The .egg-info directory is automatically generated during package installation and should be excluded. Add *.egg-info/ to .gitignore and remove this directory from the repository.

Suggested change
my_dh_library

Copilot uses AI. Check for mistakes.
7 changes: 7 additions & 0 deletions my_dh_library/src/my_dh_library/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""My Deephaven package for data processing."""

__version__ = "0.1.0"

from my_dh_library.queries import filter_by_threshold, add_computed_columns, summarize_by_group

__all__ = ["filter_by_threshold", "add_computed_columns", "summarize_by_group"]
Binary file not shown.
Binary file not shown.
Loading
Loading