Skip to content

Commit

Permalink
switch to just and uv (#149)
Browse files Browse the repository at this point in the history
This switches the siggen project to be maintained using just and uv like
our other libraries.
  • Loading branch information
willkg committed Feb 24, 2025
1 parent c070fca commit 2de8710
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ build
.cache
.pytest_cache
.tox
.python-version
uv.lock
26 changes: 0 additions & 26 deletions Makefile

This file was deleted.

41 changes: 34 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,30 @@ This is an extraction of the Socorro crash signature generation code.
Installing
==========

socorro-siggen is available on `PyPI <https://pypi.org/project/siggen/>`_. You
can install for library usage with::
socorro-siggen is available on `PyPI <https://pypi.org/project/siggen/>`_.

pip
---

Install library::

$ pip install siggen

You can install for cli usage with::
Install library with command-line interface::

$ pip install 'siggen[cli]'

Install for hacking::

$ pip install -r requirements-dev.txt
uv
--

Install library::

$ uv tool install siggen

Install library with command-line interface::

$ uv tool install 'siggen[cli]'


Versioning
Expand All @@ -37,9 +49,9 @@ siggen is an extraction of the signature generation code in Socorro. If you are
running signature generation on crash data and you want signatures to match
equivalent crash reports in Socorro, then you need to keep siggen up-to-date.

siggen uses a calver scheme:
siggen uses a calver scheme::

MAJOR.MINOR.yyyymmdd
MAJOR.MINOR.yyyymmdd

* MAJOR: indicates incompatible API changes -- listed as "big changes" in
HISTORY.rst
Expand Down Expand Up @@ -295,3 +307,18 @@ That produces this output::
"proto_signature": "SomeFunc | SomeOtherFunc",
"signature": "SomeFunc"
}


Development
===========

Requirements: Python, `uv <https://docs.astral.sh/uv/`>__, `just
<https://just.systems/>`__

Create a development environment::

$ just devenv

View `just <https://just.systems/>`__ recipes::

$ just
26 changes: 26 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@_default:
just --list

# Build a dev environment
devenv:
uv sync --extra dev --refresh --upgrade

# Clean development and build artifacts
clean:
rm -rf .venv uv.lock
rm -rf build dist siggen.egg-info .tox .pytest-cache
rm -rf docs/_build/*
find siggen/ -name __pycache__ | xargs rm -rf
find siggen/ -name '*.pyc' | xargs rm -rf

# Format files
format: devenv
uv run tox exec -e py39-lint -- ruff format

# Lint files
lint: devenv
uv run tox -e py39-lint

# Run tests and linting
test *args: devenv
uv run tox {{args}}
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dev = [
"ruff",
"tox",
"tox-gh-actions",
"tox-uv",
"twine",
"wheel",
]
Expand Down Expand Up @@ -79,6 +80,7 @@ envlist =
py311
py312
py313
uv_python_preference = only-managed
[gh-actions]
python =
Expand Down

0 comments on commit 2de8710

Please sign in to comment.