Skip to content

feature: use generated conjure API to interact with scout #2

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

Merged
merged 15 commits into from
Aug 14, 2024
Merged
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
172 changes: 172 additions & 0 deletions example.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "1c7eef00-a681-4519-8748-377f318707fe",
"metadata": {},
"outputs": [],
"source": [
"import nominal as nm"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "a7edd8ae-2aaa-460a-bfc5-674d5746426b",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">DataFrame received\n",
"</pre>\n"
],
"text/plain": [
"DataFrame received\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from nominal import Dataset\n",
"dataset = Dataset(nm.data.penguins())"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "2f89be32-4fdf-468b-8ec3-26a9dd35c399",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
"Uploading: <span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">DATASET_2024-</span><span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">08</span><span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">-14_6C1Q</span>\n",
"to <span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://api-staging.gov.nominal.io/api</span>\n",
" = <span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">66329</span> bytes\n",
"</pre>\n"
],
"text/plain": [
"\n",
"Uploading: \u001b[1;32mDATASET_2024-\u001b[0m\u001b[1;32m08\u001b[0m\u001b[1;32m-14_6C1Q\u001b[0m\n",
"to \u001b[4;94mhttps://api-staging.gov.nominal.io/api\u001b[0m\n",
" = \u001b[1;36m66329\u001b[0m bytes\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
"Upload to S3 successful.\n",
"S3 bucket:\n",
" s3:<span style=\"color: #800080; text-decoration-color: #800080\">//gs-284986962550-uploads-0/7d802d4e-7f1c-45b9-ba05-f7f6323504d6/</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff\">2024-08-14T18</span>:<span style=\"color: #00ff00; text-decoration-color: #00ff00; font-weight: bold\">41:24</span>.158021446Z_DATASET_2024-<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">08</span>\n",
"-14_6C1Q\n",
"</pre>\n"
],
"text/plain": [
"\n",
"Upload to S3 successful.\n",
"S3 bucket:\n",
" s3:\u001b[35m/\u001b[0m\u001b[35m/gs-284986962550-uploads-0/7d802d4e-7f1c-45b9-ba05-f7f6323504d6/\u001b[0m\u001b[95m2024-08-14T18\u001b[0m:\u001b[1;92m41:24\u001b[0m.158021446Z_DATASET_2024-\u001b[1;36m08\u001b[0m\n",
"-14_6C1Q\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
"Registering <span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">DATASET_2024-</span><span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">08</span><span style=\"color: #008000; text-decoration-color: #008000; font-weight: bold\">-14_6C1Q</span> on <span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://api-staging.gov.nominal.io/api</span>\n",
"</pre>\n"
],
"text/plain": [
"\n",
"Registering \u001b[1;32mDATASET_2024-\u001b[0m\u001b[1;32m08\u001b[0m\u001b[1;32m-14_6C1Q\u001b[0m on \u001b[4;94mhttps://api-staging.gov.nominal.io/api\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Triggered file ingest: \n",
"<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">TriggeredIngest</span><span style=\"font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">dataset_rid</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'ri.catalog.gov-staging.dataset.cbe13127-6b6b-4dd9-b124-a270f1577635'</span>, \n",
"<span style=\"color: #808000; text-decoration-color: #808000\">async_handle</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AsyncHandle</span><span style=\"font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">rid</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'ri.csv-splitter.gov-staging.async-job.cbe13127-6b6b-4dd9-b124-a270f1577635'</span><span style=\"font-weight: bold\">))</span>\n",
"</pre>\n"
],
"text/plain": [
"Triggered file ingest: \n",
"\u001b[1;35mTriggeredIngest\u001b[0m\u001b[1m(\u001b[0m\u001b[33mdataset_rid\u001b[0m=\u001b[32m'ri.catalog.gov-staging.dataset.cbe13127-6b6b-4dd9-b124-a270f1577635'\u001b[0m, \n",
"\u001b[33masync_handle\u001b[0m=\u001b[1;35mAsyncHandle\u001b[0m\u001b[1m(\u001b[0m\u001b[33mrid\u001b[0m=\u001b[32m'ri.csv-splitter.gov-staging.async-job.cbe13127-6b6b-4dd9-b124-a270f1577635'\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"ingested = dataset.upload()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "efe56e1f-6113-4b10-9d95-9f97a137c97a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"TriggeredIngest(dataset_rid='ri.catalog.gov-staging.dataset.cbe13127-6b6b-4dd9-b124-a270f1577635', async_handle=AsyncHandle(rid='ri.csv-splitter.gov-staging.async-job.cbe13127-6b6b-4dd9-b124-a270f1577635'))"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ingested"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d3aec717-b5f5-41e4-bf01-6615f19d739f",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Empty file added nominal/_api/__init__.py
Empty file.
66 changes: 66 additions & 0 deletions nominal/_api/combined/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# coding=utf-8
__all__ = [
'attachments_api',
'authentication',
'authentication_api',
'authorization',
'comments_api',
'datasource',
'datasource_api',
'datasource_logset',
'datasource_logset_api',
'datasource_pagination_api',
'event',
'openapi',
'scout',
'scout_api',
'scout_asset_api',
'scout_assets',
'scout_catalog',
'scout_channelvariables_api',
'scout_chart_api',
'scout_chartdefinition_api',
'scout_checklistexecution_api',
'scout_checks_api',
'scout_comparisonrun_api',
'scout_compute_api',
'scout_compute_api_deprecated',
'scout_compute_resolved_api',
'scout_dataexport_api',
'scout_datareview_api',
'scout_datasource',
'scout_datasource_connection',
'scout_datasource_connection_api',
'scout_datasource_connection_api_influx',
'scout_integrations_api',
'scout_internal_search_api',
'scout_jobs_api',
'scout_layout_api',
'scout_metadata',
'scout_notebook_api',
'scout_plotting',
'scout_rids_api',
'scout_run_api',
'scout_series',
'scout_template_api',
'scout_units_api',
'scout_versioning_api',
'scout_video',
'scout_video_api',
'scout_workbookcommon_api',
'secrets_api',
'storage_datasource_api',
'storage_series_api',
'storage_writer_api',
'timeseries_archetype',
'timeseries_archetype_api',
'timeseries_logicalseries',
'timeseries_logicalseries_api',
'timeseries_seriescache',
'timeseries_seriescache_api',
]

__conjure_generator_version__ = "4.9.0"

__version__ = "0.373.0+46.g8cf0464"

Loading