unxt-hypothesis
Note: As of v2.0.0,
unxt-hypothesisis a backward-compatible shim forunxts.hypothesis— the new canonical location for this package. No code changes are required:import unxt_hypothesiscontinues to work exactly as before. New projects should preferpip install unxts.hypothesisandimport unxts.hypothesis.
Hypothesis strategies for property-based testing with unxt.
Installation
pip install unxt-hypothesis # legacy name — continues to work long-term
pip install unxts.hypothesis # canonical name going forward
Migration
If you currently depend on unxt-hypothesis, you have two options:
-
Do nothing —
unxt-hypothesisre-exports the full public API fromunxts.hypothesisand will be maintained long-term. Existing code requires no changes. -
Migrate to
unxts.hypothesis— change your dependency and imports:- pip install unxt-hypothesis + pip install unxts.hypothesis
- import unxt_hypothesis as ust + import unxts.hypothesis as ust
All public strategies (
quantities,units,angles,unitsystems, etc.) are identical — the canonical package is the source of truth and the shim simply re-exports from it.
Strategies
named_dimensions()— physical dimensions from Astropy's catalogueunits(dimension)— randomUnitobjectsderived_units(base)— dimensionally-equivalent unitsquantities(*, shape, dtype, unit)— randomQuantityobjectsunitsystems(*units)— randomUnitSystemobjectsangles(*, wrap_to)— randomAngleobjectswrap_to(quantity, min, max)— range-constrained quantities
Quick Start
from hypothesis import given
import unxt as u
import unxts.hypothesis as ust # or: import unxt_hypothesis as ust
@given(q=ust.quantities(unit="km/s"))
def test_velocity(q):
assert q.unit == u.unit("km/s")
Documentation
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unxt_hypothesis-2.0.0.tar.gz.
File metadata
- Download URL: unxt_hypothesis-2.0.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8bec434f2422d36ccc4d2cacb498cf8efd1f549933203af3d9516b3815ec59a
|
|
| MD5 |
8538921371753443f7922a58ec21a830
|
|
| BLAKE2b-256 |
b0ebec964d9bcc23bde4578e33bc3aa8da19b2387ee56956c7d4f60134599e7b
|
Provenance
The following attestation bundles were made for unxt_hypothesis-2.0.0.tar.gz:
Publisher:
cd-publish-unxt-hypothesis.yml on GalacticDynamics/unxt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unxt_hypothesis-2.0.0.tar.gz -
Subject digest:
b8bec434f2422d36ccc4d2cacb498cf8efd1f549933203af3d9516b3815ec59a - Sigstore transparency entry: 2236663430
- Sigstore integration time:
-
Permalink:
GalacticDynamics/unxt@26f8c18bde22a8f54aeb59bfb9382ce43a8e27d1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/GalacticDynamics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd-publish-unxt-hypothesis.yml@26f8c18bde22a8f54aeb59bfb9382ce43a8e27d1 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file unxt_hypothesis-2.0.0-py3-none-any.whl.
File metadata
- Download URL: unxt_hypothesis-2.0.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc640da7747cbe0f50154e681fe29ffe48d2e06076ff4a426c9d0a4440133846
|
|
| MD5 |
e4e86fcb02a813ab2df1b992e9fca2e9
|
|
| BLAKE2b-256 |
46f908b400a5c580d4803d87b2aae539b68e277547ecd7ed8e1717d38af6cdfd
|
Provenance
The following attestation bundles were made for unxt_hypothesis-2.0.0-py3-none-any.whl:
Publisher:
cd-publish-unxt-hypothesis.yml on GalacticDynamics/unxt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unxt_hypothesis-2.0.0-py3-none-any.whl -
Subject digest:
fc640da7747cbe0f50154e681fe29ffe48d2e06076ff4a426c9d0a4440133846 - Sigstore transparency entry: 2236664096
- Sigstore integration time:
-
Permalink:
GalacticDynamics/unxt@26f8c18bde22a8f54aeb59bfb9382ce43a8e27d1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/GalacticDynamics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd-publish-unxt-hypothesis.yml@26f8c18bde22a8f54aeb59bfb9382ce43a8e27d1 -
Trigger Event:
workflow_run
-
Statement type: