Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build
- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Build package
run: python -m build
run: uv build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
14 changes: 6 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[code-quality,testing]
run: uv sync --group code-quality --group testing --python ${{ matrix.python-version }}

- name: Run tests
run: pytest

run: uv run --group testing pytest
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.pytest_cache
/*.egg-info/
__pycache__
env
.venv
staticfiles
src/lando/version.py
.test-use-suite
Expand Down
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Report issues or request enhancements in #engineering-workflow on Slack or #cond

## 🔧 Installation

Install the CLI tool from PyPI, using `pip` or `pipx`.
Install the CLI tool from PyPI using `uv`, `pip`, or `pipx`.

```sh
pipx install lando_cli
uv tool install lando_cli
```

Confirm the tool is installed locally.
Expand All @@ -23,6 +23,29 @@ Confirm the tool is installed locally.
lando --version
```

## 🛠️ Development

This project uses [uv](https://docs.astral.sh/uv/) for package and virtual environment management.

Install all dependencies, including dev and test groups:

```sh
uv sync --group code-quality --group testing
```

Run the test suite:

```sh
uv run pytest
```

Run the linter and formatter:

```sh
uv run ruff check .
uv run black --check .
```

## 🔐 Configuration

The CLI expects a config file at `~/.mozbuild/lando.toml` with the following options:
Expand Down
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ requires-python = ">=3.10"
# Required for `setuptools_scm` when using only `pyproject.toml` (ie no `setup.cfg`).
dynamic = ["version"]

[project.optional-dependencies]
[dependency-groups]
code-quality = ["black", "ruff"]
testing = [
"pytest",
"requests-mock"
"requests-mock",
]


# Derive version number from version control.
[tool.setuptools_scm]

Expand All @@ -34,7 +33,5 @@ lando = "lando_cli.cli:cli"
requires = [
"setuptools>=64",
"setuptools_scm>=8",
"pip-tools",
"wheel",
]
build-backend = "setuptools.build_meta"
Loading
Loading