Skip to content

Latest commit

 

History

History
72 lines (43 loc) · 2.59 KB

library.md

File metadata and controls

72 lines (43 loc) · 2.59 KB

Interval Kit

Interval Kit banner — Small interval helpers for Python

Interval Kit provides small numeric interval helpers for Python developers working with schedules, ranges, or bounded values.

Fictional teaching fixture. This library, API, commands, and maintainers are assumed examples, not an installable package. See the fixture contract.

✨ Features

  • Check whether two half-open intervals overlap.
  • Treat touching endpoints consistently as non-overlapping.
  • Reject reversed bounds with a clear error.

🚀 Getting Started

This fixture assumes Python 3.11+ and a local library checkout with package metadata. There is no published registry package.

Create an environment and install from that assumed checkout:

python -m venv .venv
. .venv/bin/activate
python -m pip install -e .

The activation command is for a POSIX shell. Then try the assumed API:

from interval_kit import overlaps

print(overlaps((1, 5), (4, 8)))  # True

📖 Usage

Represent intervals as (start, end) tuples. The start is included; the end is excluded.

from interval_kit import overlaps

print(overlaps((1, 5), (5, 8)))  # False: touching endpoints
print(overlaps((2, 2), (1, 4)))  # False: empty interval

The fixture assumes finite numeric bounds and raises ValueError when a start exceeds its end. Convert dates or other domain values before calling the helper.

🛠️ Development

After local installation, run the assumed checks:

python -m unittest discover

Cover overlapping, disjoint, touching, empty, and reversed intervals when changing interval behavior. Keep examples consistent with those cases.

🤝 Contributing

The fictional maintainers welcome bug reports and focused fixes. Discuss new interval operations before expanding the API, and include an example that explains the intended boundary behavior.

🐛 Issues & Support

Report problems through the issue tracker (fixture). Include the input intervals, actual result, expected result, and Python version.

📄 License

This fixture assumes MIT. The MIT license covers this example document; inspect the target library's own license when adopting the layout.

👥 Authors & Contributors

Created by the fictional Interval Kit maintainers. Replace this teaching attribution with the real project's documented credits.