Skip to content
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

Variable name fix in python tutorial #6769

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spicydonkey
Copy link

This PR replaces write_client to client, because subsequent tutorials refer to the object as such.

The single change in varname is in the "code snippet" of the python tutorial InitializeClient at src/homepageExperience/components/steps/python/InitializeClient.tsx.

This is consistent with all code snippets in the subsequent examples.

Replaced `write_client` to `client`, because subsequent tutorials refer to the object as such.
@spicydonkey spicydonkey requested a review from a team as a code owner July 19, 2023 09:15
Copy link
Contributor

@appletreeisyellow appletreeisyellow left a comment

Choose a reason for hiding this comment

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

@spicydonkey Thanks for contributing.

write_client is a local variable name that is used to initialize the write client. This variable is used in the next step of the tutorial (see code below), so replacing it to client would break the set up flow.

write_api = write_client.write_api(write_options=SYNCHRONOUS)

I think it's better to keep the variable as write_client to differentiate it from the query_client variable that is used in the later steps of the tutorial (see code below):

# Define the query client
query_client = FlightSQLClient(
host = "${url.replace(/^https?:\/\//, '')}",
token = os.environ.get("INFLUXDB_TOKEN"),
metadata={"bucket-name": "${bucket}"})
# Execute the query
info = query_client.execute(query)
reader = query_client.do_get(info.endpoints[0].ticket)

@JakovGlavac
Copy link

I was just about to open this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants