Guance Learn

Observability questions

Focused answers for definitions, architecture choices, troubleshooting, pricing, and evaluation.

Python programming and application logging
Explainer

Skip or deselect a test in pytest

Use pytest skip and skipif markers, distinguish expected failures from skipped tests, and temporarily exclude a test by its node ID.

Python programming and application logging
Explainer

Reduce requests and urllib3 log noise in Python

Set requests and urllib3 logger thresholds, understand inherited levels and propagation, and keep useful HTTP warnings visible without hiding application exceptions.

Python programming and application logging
Explainer

Control logging output during Python tests

Separate suppressing log records from hiding pytest output, restore logging state after tests, and keep caplog assertions meaningful.

Python programming and application logging
Explainer

Disable HTTP access logs in Python web applications

Control access logs in Flask, Django, Uvicorn, and Gunicorn while retaining the error records you need to investigate failures.

Illustration of Git branches and version history
Technical guide

Discard unstaged changes in Git

Restore tracked files from the index while keeping staged edits, preview untracked cleanup, or stash changes you may want to recover later.

Illustration of Git branches and version history
Technical guide

Export a Git snapshot without the .git directory

Use git archive to export a commit or subdirectory as ZIP or tar, apply export-ignore rules, and avoid packaging the wrong working-tree contents.

Illustration of Git branches and version history
Technical guide

Download a single directory from GitHub

Use partial clone with sparse checkout to work with one directory, or extract it from an archive when you do not need Git history.

Illustration of server operations and request logs
Explainer

Increase the upload size limit in Nginx

Set client_max_body_size for the right endpoint, allow multipart overhead, and test Nginx and application limits together.

Python programming and application logging
Explainer

Run an external program or command from Python

Use subprocess.run to pass arguments, capture output, check failures, set timeouts, and redirect command output without unnecessary shell parsing.

Python programming and application logging
Explainer

Deactivate a Python virtual environment

Leave an activated Python environment, reactivate it on your platform, and check which interpreter a terminal or process is actually using.

Python programming and application logging
Explainer

Extract a file extension in Python

Use os.path.splitext or pathlib suffix properties to handle ordinary extensions, dotfiles, and compound filenames without fragile string searches.

Illustration of Git branches and version history
Technical guide

Fetch all branches in Git

Fetch remote-tracking branches from one or more remotes, fix a single-branch refspec, and understand what --all and --prune actually update.