This file provides guidance to coding agents when working with code in this repository.
rsconnect-python is the Posit Connect command-line interface for deploying Python content (Shiny apps, Quarto documents, APIs, Jupyter notebooks, etc.) to Posit Connect servers. The tool handles bundling content, managing credentials, and orchestrating deployments.
# Install the project plus dev tooling
# `uv` provisions the interpreter and resolves the `test` dependency group
uv sync --group test
# Run the CLI from your working tree
uv run rsconnect version# Run tests with the default Python (3.13)
just test
# Run tests with a specific Python version (uv fetches it if needed)
just test 3.12
# Run tests across all supported Python versions
just all-tests
# Run single test file
uv run pytest tests/test_bundle.py
# Run single test
uv run pytest tests/test_bundle.py::test_function_name# Auto-format and apply fixes
just fmt
# Run all linters (ruff format --check, ruff check, pyright)
just lint# Build documentation
just docs
# Serve documentation locally (with live reload)
just docs-serve# Build wheel distribution
just dist
# Install built package
just installruff format(120-character lines) andruff checkare enforced in CI.tests/test_metadata.pyis exempt from the line-length rule.- Pyright runs in strict mode (
typeCheckingMode = "strict"). It is advisory and doesn't failjust lint. - Support Python 3.8+. Import newer typing features from
typing_extensions. - Use
TypedDictfor structured dictionaries such as API responses and manifest data.
- Raise
RSConnectExceptionfor user-facing operational errors, with a message that says what went wrong and how to fix it. - Wrap CLI steps in
cli_feedback()(inactions.py) for consistent OK/ERROR output. - Log user-visible progress with
logger.info()and diagnostics withlogger.debug().log.pyalso defines aVERBOSElevel between the two. - Use Click's
echo()/secho()for console output. AppModesinmodels.pyis the canonical list of content types; a manifest must declare the right one.
- Tests in
tests/mirror the module names (test_bundle.py,test_api.py, ...). Shared fixtures are inconftest.py; sample content is intests/testdata/. - Mock HTTP with
httpretty. Use temporary directories for anything that writes files. - Integration tests against a live Connect server run only when
CONNECT_SERVERandCONNECT_API_KEYare set. Unset them if unrelated tests fail unexpectedly.
docs/agents/architecture.md: module map, deployment targets, and the deployment flow. Read it before changingapi.py,bundle.py, or deployment commands.CONTRIBUTING.md: contributor workflow, testing against Connect, and the release process.
- Issues: tracked in GitHub Issues on posit-dev/rsconnect-python via the
ghCLI. Seedocs/agents/issue-tracker.md. - Triage labels:
needs-triage,needs-info,ready-for-agent,ready-for-human,wontfix. Seedocs/agents/triage-labels.md. - Domain docs: one root
GLOSSARY.mdplusdocs/adr/. Seedocs/agents/domain.md.