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
19 changes: 19 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: test

on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version-file: .python-version
- name: Run tests
run: uv run pytest
20 changes: 18 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,24 @@ current configuration and takes no arguments.
markers (`:white_check_mark:` success, `:cross_mark:`/`:boom:` failure).
- SSL warnings are silenced at import via
`urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)`.
- No test suite, linter config, or build step exists. The README advertises
`black` code style; new code should match it.
- No linter config or build step exists. The README advertises `black` code
style; new code should match it. See *Testing* below for the test suite.

## Testing

A `pytest` suite lives in `tests/`, with `pytest` declared in the `dev`
dependency group in `pyproject.toml`. Run it with:

```bash
uv run pytest
```

Tests cover the pure, side-effect-free helpers within tools. Because tools are
hyphenated standalone scripts (e.g. `load-er.py`) rather than importable
modules, tests load them by path via `importlib` — see
`tests/test_load_er.py`. Extract logic into such helpers so it can be tested
without live Squonk2 API calls. GitHub Actions runs the suite on every push and
pull request (`.github/workflows/test.yaml`).

## Standard tool structure

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/informaticsmatters/squonk2-python-cl-tools)

[![test](https://github.com/InformaticsMatters/squonk2-python-cl-tools/actions/workflows/test.yaml/badge.svg)](https://github.com/InformaticsMatters/squonk2-python-cl-tools/actions/workflows/test.yaml)

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

A collection of Python-based Command line tools to help manage and maintain
Expand Down
Loading