Skip to content

Move client setup from Jupyter notebook into bertron_client.py #6

@valerie-autumn-skye

Description

@valerie-autumn-skye

In the demo Jupyter notebook, we need to suppress SSL certificate warnings:

# Suppress SSL warnings
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

Could this be done within the bertron_client.py code itself, so this reduces the amount of work for the user?

Also, bertron_client.py uses the following base URL:

berton_base_url = "https://bertron-api.bertron.production.svc.spin.nersc.org/bertron/"

but the notebook uses:

# Initialize the BERtron client
client = BertronClient(base_url="https://bertron-api.bertron.production.svc.spin.nersc.org")

It is unclear why a different base_url needs to be specified. Could the public API URL be used as the default, so the notebook only needs to do this:

client = BertronClient()

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions