Skip to content

Commit 0b2ba21

Browse files
authored
Merge pull request #104 from posit-dev/feat-assistant
feat: add the `assistant()` function to chat with the API
2 parents 0f7d97a + ede00a6 commit 0b2ba21

File tree

10 files changed

+611
-29
lines changed

10 files changed

+611
-29
lines changed

.github/workflows/ci-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
pip install -e '.[dev]'
3030
- name: Install test dependencies
3131
run: |
32-
pip install pytest pytest-cov pytest-snapshot pandas polars ibis-framework[duckdb,mysql,postgres,sqlite]>=9.5.0 chatlas
32+
pip install pytest pytest-cov pytest-snapshot pandas polars ibis-framework[duckdb,mysql,postgres,sqlite]>=9.5.0 chatlas shiny
3333
- name: pytest unit tests
3434
run: |
3535
make test

docs/_quarto.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,17 @@ quartodoc:
166166
- name: Validate.warning
167167
- name: Validate.error
168168
- name: Validate.critical
169-
- title: Inspect
169+
- title: Inspection and Assistance
170170
desc: >
171-
The *Inspect* group contains functions that are helpful for getting to grips on a new data
172-
table. Use the `DataScan` class to get a quick overview of the data, `preview()` to see the
173-
first and last few rows of a table, `col_summary_tbl()` for a column-level summary of a
174-
table, `missing_vals_tbl()` to see where there are missing values in a table, and
175-
`get_column_count()`/`get_row_count()` to get the number of columns and rows in a table.
176-
Several datasets included in the package can be accessed via the `load_dataset()` function.
177-
Finally, the `config()` utility lets us set global configuration parameters.
171+
The *Inspection and Assistance* group contains functions that are helpful for getting to
172+
grips on a new data table. Use the `DataScan` class to get a quick overview of the data,
173+
`preview()` to see the first and last few rows of a table, `col_summary_tbl()` for a
174+
column-level summary of a table, `missing_vals_tbl()` to see where there are missing values
175+
in a table, and `get_column_count()`/`get_row_count()` to get the number of columns and rows
176+
in a table. Several datasets included in the package can be accessed via the
177+
`load_dataset()` function. Finally, the `config()` utility lets us set global configuration
178+
parameters. Want to chat with an assistant? Use the `assistant()` function to get help with
179+
Pointblank.
178180
contents:
179181
- name: DataScan
180182
- name: preview
@@ -184,3 +186,4 @@ quartodoc:
184186
- name: get_row_count
185187
- name: load_dataset
186188
- name: config
189+
- name: assistant

pointblank/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
__version__ = "0.0.0"
1010

1111
# Import objects from the module
12+
from pointblank.assistant import assistant
1213
from pointblank.column import (
1314
col,
1415
contains,
@@ -35,6 +36,7 @@
3536
)
3637

3738
__all__ = [
39+
"assistant",
3840
"TF",
3941
"Validate",
4042
"Thresholds",

pointblank/_utils.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,13 @@ def _get_api_text() -> str:
521521
inspect_exported = [
522522
"DataScan",
523523
"preview",
524+
"col_summary_tbl",
524525
"missing_vals_tbl",
525526
"get_column_count",
526527
"get_row_count",
527528
"load_dataset",
528529
"config",
530+
"assistant",
529531
]
530532

531533
validate_desc = """When peforming data validation, you'll need the `Validate` class to get the
@@ -551,12 +553,14 @@ def _get_api_text() -> str:
551553
report table (by printing the object or using `get_tabular_report()`), extract key metrics, or we
552554
can split the data based on the validation results (with `get_sundered_data()`)."""
553555

554-
inspect_desc = """The *Inspect* group contains functions that are helpful for getting to grips
555-
on a new data table. Use the `DataScan` class to get a quick overview of the data, `preview()` to
556-
see the first and last few rows of a table, `missing_vals_tbl()` to see where there are missing
557-
values in a table, and `get_column_count()`/`get_row_count()` to get the number of columns and rows
558-
in a table. Several datasets included in the package can be accessed via the `load_dataset()`
559-
function. Finally, the `config()` utility lets us set global configuration parameters."""
556+
inspect_desc = """The *Inspection and Assistance* group contains functions that are helpful for
557+
getting to grips on a new data table. Use the `DataScan` class to get a quick overview of the data,
558+
`preview()` to see the first and last few rows of a table, `col_summary_tbl()` for a column-level
559+
summary of a table, `missing_vals_tbl()` to see where there are missing values in a table, and
560+
`get_column_count()`/`get_row_count()` to get the number of columns and rows in a table. Several
561+
datasets included in the package can be accessed via the `load_dataset()` function. Finally, the
562+
`config()` utility lets us set global configuration parameters. Want to chat with an assistant? Use
563+
the `assistant()` function to get help with Pointblank."""
560564

561565
#
562566
# Add headings (`*_desc` text) and API details for each family of functions/methods

0 commit comments

Comments
 (0)