From 27d01f0262a836d75ff39bf9e2246f3b9bc594c8 Mon Sep 17 00:00:00 2001 From: Oliver Bristow Date: Sat, 9 May 2026 16:11:33 +0100 Subject: [PATCH] Set LICENSE copyright year to first commit year --- LICENSE | 21 +++++++++++++++++++++ README.md | 12 ++++++------ pyproject.toml | 4 ++++ 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fe40b4f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Oliver Bristow + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 56165e4..d8660d5 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,16 @@ # alternative -A tiny library for managing multiple implementations of the same function — especially when you're iterating toward faster or cleaner versions and want those choices to stay explicit, testable, and safe. +A tiny, dependency-free library for managing multiple implementations of the same function — especially when you're iterating toward faster or cleaner versions and want those choices to stay explicit, testable, and safe. ## Why use this? When optimizing a hot path, it’s common to accumulate: -- a trusted baseline implementation, -- one or more candidate rewrites, -- tests to keep them equivalent, -- and benchmarks to validate wins. +- a trusted reference implementation +- one or more candidate rewrites +- tests to keep them equivalent +- benchmarks to validate wins `alternative` keeps that workflow tidy by making implementation registration and selection first-class. @@ -59,7 +59,7 @@ Use `pytest_parametrize_pairs(...)` to compare the reference against each candid Use `pytest_parametrize(...)` to run one test body across all implementations. - Great for benchmark workflows with [`pytest-benchmark`](https://pypi.org/project/pytest-benchmark/): [`examples/test_benchmark.py`](examples/test_benchmark.py) -- Also useful for validating that every implementation passes one shared test suite. +- Useful for validating that every implementation passes one shared test suite ## Safety guarantees diff --git a/pyproject.toml b/pyproject.toml index c5dae07..cdc11f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,11 @@ authors = [ { name = "Oliver Bristow", email = "evilumbrella+github@gmail.com" } ] requires-python = ">=3.12" +license = "MIT" dependencies = [] +classifiers = [ + "License :: OSI Approved :: MIT License", +] [project.optional-dependencies] dev = [