-
Notifications
You must be signed in to change notification settings - Fork 0
Add examples #1
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
base: main
Are you sure you want to change the base?
Add examples #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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"] |
| 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 | ||
| 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
|
||||||||||||||||||||||||
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|
||
|
||
| 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
|
||||||
| [console_scripts] | |
| my-dh-query = my_dh_cli.cli:app |
| 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
|
||||||
| deephaven-server>=0.35.0 | |
| click>=8.0.0 |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1 @@ | ||||
| my_dh_cli | ||||
|
||||
| my_dh_cli |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| """My Deephaven package for data processing.""" | ||
|
|
||
| __version__ = "0.1.0" |
| 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() |
| 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"]) | ||||||||||||||||||
|
||||||||||||||||||
| 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
AI
Jan 23, 2026
There was a problem hiding this comment.
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.
| result = my_dh_query(input_file, verbose) | |
| my_dh_query(input_file, verbose) |
| 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`) | ||
|
||
|
|
||
| - `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`) | ||
|
||
|
|
||
| - `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 | ||
| 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"] |
| 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
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### 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
AI
Jan 23, 2026
There was a problem hiding this comment.
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.
| ### 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
AI
Jan 23, 2026
There was a problem hiding this comment.
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.
| 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. |
| 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
|
||||||||||||||||
| 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 |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1 @@ | ||||
|
|
||||
|
||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1 @@ | ||||||
| deephaven-server>=0.35.0 | ||||||
|
||||||
| deephaven-server>=0.35.0 | |
| # Intentionally left blank; .egg-info build artifacts should not be tracked in version control. |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1 @@ | ||||
| my_dh_library | ||||
|
||||
| my_dh_library |
| 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"] |
There was a problem hiding this comment.
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.