Skip to content

Latest commit

 

History

History
113 lines (82 loc) · 3.69 KB

File metadata and controls

113 lines (82 loc) · 3.69 KB

Contributing to Snowflake CLI

Detailed guides

Quick start

pip install -U hatch==1.15.1 virtualenv==20.39.1
hatch shell
hatch run test

hatch shell spawns a new shell with the virtual environment active and the CLI installed in editable mode. Press ^D to exit.

To also activate pre-commit hooks (required before your first commit):

hatch run pre-commit install

Reporting bugs and requesting features

File a GitHub Issue. Use the issue templates — they collect the information needed to act on the report quickly.

How to contribute code

Fork the repo and submit a pull request from your fork. All forks of snowflake-cli are publicly visible on GitHub.

Keep your fork up to date by rebasing onto upstream rather than merging:

git remote add sfcli https://github.com/snowflakedb/snowflake-cli.git
git fetch sfcli
git checkout <your-branch>
git rebase sfcli/main

A maintainer will review and merge your PR after approval.

Development environment

We use hatch to manage development environments. The supported Python versions are listed in pyproject.toml under the Programming Language :: Python classifiers. We recommend pyenv for managing Python versions locally.

Do not use language features that are unavailable in the minimum supported version — code must run on all versions in the supported range.

pip install -U hatch==1.15.1 virtualenv==20.39.1
hatch run pre-commit install

To create an environment pinned to a specific Python version:

hatch env create local.py3.10

To list all available environments:

hatch env show

Running tests

hatch run test                 # unit tests
hatch run integration:test     # integration tests (requires Snowflake connection)

See docs/contributing/testing.md for snapshots, fixtures, markers, and integration test environment setup.

Before submitting a PR

The PR template contains a checklist. Complete it honestly — reviewers check every item and CI enforces some of them.