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
4 changes: 2 additions & 2 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:

jobs:
call-test-workflow:
uses: GNS-Science/nshm-github-actions/.github/workflows/python-run-tests.yml@main
uses: GNS-Science/nshm-github-actions/.github/workflows/python-run-tests-uv.yml@main
with:
operating-systems: "['ubuntu-latest', 'macos-latest', 'windows-latest']"
python-versions: "['3.10', '3.11', '3.12']"
delete-poetry-lock: ${{ github.event_name == 'schedule' }} # the scheduled build tests against newer dependencies
delete-uv-lock: ${{ github.event_name == 'schedule' }} # the scheduled build tests against newer dependencies
optional-dependency-groups: dev
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ on:

jobs:
release-and-distribute:
uses: GNS-Science/nshm-github-actions/.github/workflows/python-release.yml@main
uses: GNS-Science/nshm-github-actions/.github/workflows/python-release-uv.yml@main
with:
python-version: '3.12'
secrets: inherit

deploy-docs:
uses: GNS-Science/nshm-github-actions/.github/workflows/python-deploy-docs.yml@main
uses: GNS-Science/nshm-github-actions/.github/workflows/python-deploy-docs-uv.yml@main
with:
python-version: '3.12'
optional-dependency-groups: 'doc'
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [1.3.3] 2026-04-14
### Changed
- Migrated build tooling from Poetry to uv

## [1.3.2] 2026-03-20

### Changed
Expand Down
23 changes: 11 additions & 12 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@ Solvis is a Python library for analysis of OpenSHA Modular Fault System Solution
### Setup
```
pyenv local 3.10
poetry env use 3.10
poetry sync --all-groups
uv sync --all-groups
```

### Testing
- `poetry run pytest` — run all tests
- `poetry run pytest test/<file>.py` — run a single test file
- `poetry run pytest -k <keyword>` — filter tests by name
- `poetry run tox` — full QA suite (tests across Python 3.10/3.11/3.12, lint, format)
- `poetry run tox -e py310` — tests with coverage for a specific Python version
- `uv run pytest` — run all tests
- `uv run pytest test/<file>.py` — run a single test file
- `uv run pytest -k <keyword>` — filter tests by name
- `uv run tox` — full QA suite (tests across Python 3.10/3.11/3.12, lint, format)
- `uv run tox -e py310` — tests with coverage for a specific Python version

### Code Quality
- `poetry run tox -e format` — apply formatting (black + isort)
- `poetry run tox -e lint` — lint and type checking (flake8 + mypy)
- `poetry run black solvis test` — format code (line-length 120, skip string normalization)
- `poetry run isort solvis test` — sort imports
- `poetry run mypy solvis test` — type checking (uses pandera plugin)
- `uv run tox -e format` — apply formatting (black + isort)
- `uv run tox -e lint` — lint and type checking (flake8 + mypy)
- `uv run black solvis test` — format code (line-length 120, skip string normalization)
- `uv run isort solvis test` — sort imports
- `uv run mypy solvis test` — type checking (uses pandera plugin)

### Documentation
- `mkdocs serve` — preview docs locally
Expand Down
23 changes: 11 additions & 12 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,35 @@

```
pyenv local 3.10
poetry env use 3.10
poetry sync --all-groups
uv sync --all-groups
```

## Auditing requirements packages

```
poetry export --all-groups > audit.txt
poetry run pip-audit -r audit.txt -s pypi --require-hashes
poetry run pip-audit -r audit.txt -s osv --require-hashes
uv export --all-groups > audit.txt
uv run pip-audit -r audit.txt -s pypi --require-hashes
uv run pip-audit -r audit.txt -s osv --require-hashes

poetry show {package-name}
uv run pip show {package-name}
```

### `safety` requires a user login registration
```
poetry run safety scan
uv run safety scan
```

## Testing

`poetry run pytest`
`uv run pytest`

## Detox (QA standards)

`poetry run tox`
`uv run tox`

Or individual steps...

- `poetry run tox -e format` to apply formatting rules.
- `poetry run tox -e lint` to run lint checks (style and typing).
- `poetry run tox -e py310` to run tests with coverage report.
- `uv run tox -e format` to apply formatting rules.
- `uv run tox -e lint` to run lint checks (style and typing).
- `uv run tox -e py310` to run tests with coverage report.

14 changes: 7 additions & 7 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ and
for certain functions (e.g.
[`geometry.section_distance`][solvis.geometry.section_distance].)

For easy package installation, either [pip][] or [poetry][] is recommended.
For easy package installation, either [pip][] or [uv][] is recommended.

## Stable release

Expand All @@ -36,16 +36,16 @@ Or to include scripts dependencies and PyVista with the Visualization Toolkit (V
$ pip install solvis[scripts,vtk]
```

### Adding to a poetry project
### Adding to a uv project

```console
$ poetry add solvis
$ uv add solvis
```

or to include the extras:

```console
$ poetry add solvis[scripts,vtk]
$ uv add solvis[scripts,vtk]
```


Expand All @@ -66,14 +66,14 @@ Python environment:
$ pip install .
```

Or with Poetry (using `--all-extras` to install all extra dependencies is
Or with uv (using `--all-extras` to install all extra dependencies is
recommended for development):
```console
$ poetry install --all-extras
$ uv sync --all-extras
```


[poetry]: https://python-poetry.org/
[uv]: https://docs.astral.sh/uv/
[pip]: https://pip.pypa.io
[Python installation guide]: http://docs.python-guide.org/en/latest/starting/installation/
[Github repository]: https://github.com/GNS-Science/solvis
20 changes: 10 additions & 10 deletions docs/testing.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Testing

If you would like to contribute to the project, [poetry][] is
If you would like to contribute to the project, [uv][] is
recommended for creating and managing a local development
environment. In order to get all of the tests running,
[install](installation.md) with all extras:

```
poetry install --all-extras
uv sync --all-extras
```

Solvis uses [pytest][] and [tox][] to test its code.
Expand All @@ -28,17 +28,17 @@ For code quality, the following tools are used:
By default, pytest will search for all tests in the `test/` directory.
Tests can be run for a single file:
```console
$ poetry run pytest test/geometry/test_geometry.py
$ uv run pytest test/geometry/test_geometry.py
```

Specific tests can also be specified by their class and function name:
``` console
$ poetry run pytest test/geometry/test_circle_polygon.py::TestCirclePoly::test_no_negative_lats_in_circle_polygon
$ uv run pytest test/geometry/test_circle_polygon.py::TestCirclePoly::test_no_negative_lats_in_circle_polygon
```

Or filtered by keywords (this runs two tests in separate files):
``` console
$ poetry run pytest -k no_negative_lats
$ uv run pytest -k no_negative_lats
```

Be aware that there may be a number of warnings from upstream
Expand All @@ -63,12 +63,12 @@ installs.

To run all tox environments:
```console
$ poetry run tox
$ uv run tox
```

For one or more specific environments (e.g. formatting and linting):
```console
$ poetry run tox -e format -e lint
$ uv run tox -e format -e lint
```

### Code coverage
Expand All @@ -79,7 +79,7 @@ text editors that support them. Only a single test environment is
required:

```console
$ poetry run tox -e py311
$ uv run tox -e py311

...

Expand All @@ -106,7 +106,7 @@ $ git clean -dfx
```


[poetry]: https://python-poetry.org/
[uv]: https://docs.astral.sh/uv/
[pyenv]: https://github.com/pyenv/pyenv
[pytest]: https://docs.pytest.org/en/stable/
[tox]: https://tox.wiki/
[tox]: https://tox.wiki/
Loading
Loading