Skip to content

Latest commit

 

History

History
91 lines (56 loc) · 2.75 KB

File metadata and controls

91 lines (56 loc) · 2.75 KB

Contributing to the Globus CLI

First off, thank you so much for taking the time to contribute! 👍

This document is meant to help you get started and save you time. It is not meant to be a barrier or hurdle. Don’t be afraid to open incomplete PRs and ask questions!

No contribution is too small. Typo and grammar fixes are welcome.

Reporting Bugs & Requesting Features

  • Check if there’s a matching issue before opening a new issue or pull request

  • When possible, provide a usage example to reproduce bugs

Getting Started & Interactive Development

These steps should help you setup a development environment for the Globus CLI in which you can interactively write and test commands.

  1. Create a fork of the globus/globus-cli repository.

    Follow https://github.com/globus/globus-cli/fork in a browser.
  2. Clone your forked repository & navigate to it.

    git clone <fork-repo-url> && cd globus-cli
  3. Install dependencies in a local virtualenv for development.

    make install
  4. Activate the resulting virtualenv.

    source .venv/bin/activate

You should now have, in your virtualenv, the globus-cli installed, pointed at your local copy of the repo. globus will invoke code directly out of the repo.

Running Tests

We use tox to run our tests against all supported Python versions.

You can use a tool like pyenv to install all of the Python versions, or install uv and the tox-uv plugin to have uv manage the interpreter versions for you. (tox-uv will also use uv to provision test environments.)

For example:

uv tool install tox --with=tox-uv
# or
pipx install tox
pipx inject tox tox-uv

Once installed, you can run all tests with:

tox run
Tip

Try tox l to list environments, tox r as a shorthand for tox run, and tox p to run tests in parallel.

To run a single environment, use the -e flag, for example: tox r -e py3.13.

Linting, Formatting, & Type Checking

We use pre-commit to run (optional) pre-commit hooks for linting and formatting. Use pre-commit install if you want to setup the hooks locally.

Code is also type-checked with mypy, which you can run with tox run -e mypy.

Changelogs

Most changes to CLI functionality should be included in the changelog.

Pull Requests must have a changelog fragment or be approved by a maintainer to not need one.

See the changelog doc for information about how to create fragments for your changes.

Maintainers use the no-news-is-good-news label to indicate that no changelog is needed.

Releasing a Version

If you are a CLI maintainer, you need to be able to do a release. For steps, see the RELEASING doc.