Skip to main content

Spice Segmenter

PyPI PyPI - Python Version PyPI - License Coookiecutter - Wolt


Documentation: https://luca-penasa.github.io/spice-segmenter

Source Code: https://github.com/luca-penasa/spice-segmenter

PyPI: https://pypi.org/project/spice-segmenter/


Installation

pip install spice-segmenter

Development

  • Clone this repository
  • Requirements:
    • uv
    • Python 3.10+
  • Create a virtual environment and install the dependencies
uv sync --all-extras
  • Activate the virtual environment
source .venv/bin/activate

(or .venv\Scripts\activate on Windows)

Testing

pytest

Regression testing

The tests/regression/ suite locks down numerical results for both property evaluation and constraint solving against a fixed set of SPICE kernels. Each test calls compute_all or solves a constraint, then compares the output against a YAML baseline stored in tests/regression/baselines/.

Normal CI run — compare against stored baselines:

pytest tests/regression/

After a kernel delivery / planned geometry change — regenerate all baselines, review the diff, then commit:

pytest tests/regression/ --update-regression
git diff tests/regression/baselines/   # review what changed
git add tests/regression/baselines/
git commit -m "chore: update regression baselines for kernel v<new>"

Regenerate a single case (useful when adding a new property or constraint):

pytest tests/regression/ --update-regression -k "ganymede_start"

Tolerances applied during comparison:

Quantity Tolerance
Scalar / vector numeric values 1 ppm relative
Solver total coverage duration 0.01 % relative
Individual interval start / end 60 s absolute

Both n_intervals and each interval boundary are stored, so a code change that shifts event times or changes the number of detected intervals will always produce a clear failure message.

Documentation

The documentation is automatically generated from the content of the docs directory and from the docstrings of the public signatures of the source code. The documentation is updated and published as a Github Pages page automatically as part each release.

Releasing

Manual release

Releases are done with the command, e.g. incrementing patch:

just bump patch
# also push, of course:
git push origin main --tags

this will update the changelog, commit it, and make a corresponding tag.

as the CI is not yet configured for publish on pypi it can be done by hand:

uv build
twine upload dist/*

Automatic release - to be fixed

Trigger the Draft release workflow (press Run workflow). This will update the changelog & version and create a GitHub release which is in Draft state.

Find the draft release from the GitHub releases and publish it. When a release is published, it'll trigger release workflow which creates PyPI release and deploys updated documentation.

Updating with copier

To update the skeleton of the project using copier:

 pipx run copier update --defaults

Pre-commit

Pre-commit hooks run all the auto-formatting (ruff format), linters (e.g. ruff and mypy), and other quality checks to make sure the changeset is in good shape before a commit/push happens.

You can install the hooks with (runs for each commit):

pre-commit install

Or if you want them to run only for each push:

pre-commit install -t pre-push

Or if you want e.g. want to run all checks manually for all files:

pre-commit run --all-files

Running tests

uv run pytest

This project was generated using a fork of the wolt-python-package-cookiecutter template.

Metadata

Release files for spice-segmenter 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spice-segmenter 0.0.6
File Size Uploaded Provenance
spice_segmenter-0.0.6.tar.gz 881.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for spice-segmenter 0.0.6
File Interpreter ABI Platform
spice_segmenter-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 995.3 kB

Release files / spice_segmenter-0.0.6.tar.gz

Download URL spice_segmenter-0.0.6.tar.gz
Size 881.0 kB
Tags Source
SHA-256 checksum
How to use checksums
567d6fba0710b3d6a129266ba5afcd9f33b95ba0b5b49249c253f5d79444e033
BLAKE2b-256 checksum
How to use checksums
1ba0359b894b592352eecb2abd1581646f5ec1b9960c77fe6fac5bff4723e58e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / spice_segmenter-0.0.6-py3-none-any.whl

Download URL spice_segmenter-0.0.6-py3-none-any.whl
Size 114.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e12b09186fd89e5112c934fe96c3b28986badcb970ea6d0e41456ac316753af6
BLAKE2b-256 checksum
How to use checksums
637439b106bc198508c5add0e3f0388638ef58b904ce77c276a8ac39cf8567b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for spice-segmenter 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page