Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.9', '3.13', 'pypy3.10']
python-version: ['3.10', '3.14', 'pypy3.11']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- run: pip install --upgrade pip uv
Expand All @@ -17,10 +17,10 @@ jobs:
check-dev:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.13'
python-version: '3.14'
- run: pip install --upgrade pip uv
- run: uv sync
- run: uv run make check-lint
Expand All @@ -34,10 +34,10 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.14'
- run: pip install --upgrade pip uv
- run: uv build
- uses: pypa/gh-action-pypi-publish@master
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}
44 changes: 23 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,46 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog], and this project adheres to [Semantic
Versioning].

## Unreleased
## [Unreleased]

* Drop support for Python 3.7, Python 3.8 and PyPy3.8.
* Add tests with Python 3.13 and PyPy3.10.
- Drop support for Python 3.7, Python 3.8 and PyPy3.8.
- Add tests with Python 3.14 and PyPy3.11.

## [1.1.0] - 2022-12-29

* Improve performance.
- Improve performance.

## [1.0.2] - 2022-06-18

* Drop support for Python 3.5, 3.6 and PyPy3.6.
* Add tests with Python 3.10 and PyPy3.8.
- Drop support for Python 3.5, 3.6 and PyPy3.6.
- Add tests with Python 3.10 and PyPy3.8.

## [1.0.1] - 2020-10-28

* Fix release script.
- Fix release script.

## [1.0.0] - 2020-10-28

* Drop support for Python 2.7 and 3.4
* Add type hints
- Drop support for Python 2.7 and 3.4
- Add type hints

## [0.2] - 2016-10-09

* Add support for Python 2
- Add support for Python 2

## [0.1] - 2016-08-06

* Initial public release

[Unreleased]: https://github.com/bbc2/shuffled/compare/1.1.0...main
[1.1.0]: https://github.com/bbc2/shuffled/compare/1.0.2...1.1.0
[1.0.2]: https://github.com/bbc2/shuffled/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/bbc2/shuffled/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/bbc2/shuffled/compare/v0.2...1.0.0
[0.2]: https://github.com/bbc2/shuffled/compare/v0.1...v0.2
[0.1]: https://github.com/bbc2/shuffled/tree/v0.1
- Initial public release

[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
[Unreleased]: https://github.com/bbc2/shuffled/compare/1.1.0...main
[1.1.0]: https://github.com/bbc2/shuffled/compare/1.0.2...1.1.0
[1.0.2]: https://github.com/bbc2/shuffled/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/bbc2/shuffled/compare/1.0.0...1.0.1
[1.0.0]: https://github.com/bbc2/shuffled/compare/v0.2...1.0.0
[0.2]: https://github.com/bbc2/shuffled/compare/v0.1...v0.2
[0.1]: https://github.com/bbc2/shuffled/tree/v0.1
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Shuffled: Random iterators for large integer ranges

## Usage

Shuffled is a library for iterating randomly and without repetition over integer ranges.
It doesn't store all the integers in memory so that you can work with ranges of up to
It doesnt store all the integers in memory so that you can work with ranges of up to
2<sup>128</sup> elements, even with your standard RAM available.

```python
``` python
>>> shuffled_range = Shuffled(10)
>>> list(shuffled_range)
[4, 1, 2, 9, 8, 5, 3, 0, 6, 7]
Expand All @@ -13,7 +15,7 @@ It doesn't store all the integers in memory so that you can work with ranges of
[4, 1, 2, 9, 8, 5, 3, 0, 6, 7]
```

```python
``` python
>>> network = ipaddress.IPv4Network('10.0.0.0/8')
>>> shuffled_range = Shuffled(network.num_addresses)
>>> for index in shuffled_range:
Expand All @@ -27,3 +29,10 @@ It doesn't store all the integers in memory so that you can work with ranges of
10.19.5.91
[...]
```

## Release

- Update the [changelog](CHANGELOG.md).
- Bump the version identified in [`pyproject.toml`](pyproject.toml).
- After those changes are merged into `main`, tag the commit on `main` and push it.
- The CI/CD process will publish the new package version on PyPI.
Loading