diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b606c0b..1ac1455 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @ndgrigorian @antonwolfy @xaleryb @ekomarova +* @ndgrigorian @antonwolfy @xaleryb @jharlow-intel diff --git a/.github/workflows/build-with-clang.yml b/.github/workflows/build-with-clang.yml index 5715d24..98c06a3 100644 --- a/.github/workflows/build-with-clang.yml +++ b/.github/workflows/build-with-clang.yml @@ -12,8 +12,8 @@ jobs: strategy: matrix: - python: ["3.9", "3.10", "3.11", "3.12", "3.13"] - numpy_version: ["numpy'<2'", "numpy'>=2'"] + python: ["3.10", "3.11", "3.12", "3.13"] + numpy_version: ["numpy'>=2'"] env: ONEAPI_ROOT: /opt/intel/oneapi diff --git a/.github/workflows/conda-package-cf.yml b/.github/workflows/conda-package-cf.yml index 743622b..8849209 100644 --- a/.github/workflows/conda-package-cf.yml +++ b/.github/workflows/conda-package-cf.yml @@ -19,7 +19,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ["3.9", "3.10", "3.11", "3.12"] + include: + - python: "3.10" + numpy: "2.2" + - python: "3.11" + numpy: "2.3" + - python: "3.12" + numpy: "2.3" + - python: "3.13" + numpy: "2.3" steps: - uses: actions/checkout@v4 with: @@ -47,7 +55,7 @@ jobs: - name: Build conda package run: | CHANNELS="-c conda-forge --override-channels" - VERSIONS="--python ${{ matrix.python }} --numpy 2.0" + VERSIONS="--python ${{ matrix.python }} --numpy ${{ matrix.numpy }}" TEST="--no-test" conda build \ @@ -66,7 +74,15 @@ jobs: strategy: matrix: - python: ["3.9", "3.10", "3.11", "3.12"] + include: + - python: "3.10" + numpy: "2.2" + - python: "3.11" + numpy: "2.3" + - python: "3.12" + numpy: "2.3" + - python: "3.13" + numpy: "2.3" env: conda-bld: C:\Miniconda\conda-bld\win-64\ steps: @@ -95,7 +111,7 @@ jobs: - name: Setup MSVC uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - name: Build conda package - run: conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c conda-forge --override-channels conda-recipe-cf + run: conda build --no-test --python ${{ matrix.python }} --numpy ${{ matrix.numpy }} -c conda-forge --override-channels conda-recipe-cf - name: Upload artifact uses: actions/upload-artifact@v4 with: @@ -104,15 +120,20 @@ jobs: test_linux: needs: build_linux - runs-on: ${{ matrix.runner }} + runs-on: ubuntu-latest strategy: matrix: - python: ["3.9", "3.10", "3.11", "3.12"] - numpy: ["1.26*", "2*"] - experimental: [false] - runner: [ubuntu-latest] - continue-on-error: ${{ matrix.experimental }} + include: + - python: "3.10" + numpy: "2.2" + - python: "3.11" + numpy: "2.3" + - python: "3.12" + numpy: "2.3" + - python: "3.13" + numpy: "2.3" + env: CHANNELS: -c conda-forge --override-channels @@ -172,15 +193,20 @@ jobs: test_windows: needs: build_windows - runs-on: ${{ matrix.runner }} + runs-on: windows-latest strategy: matrix: - python: ["3.9", "3.10", "3.11", "3.12"] - numpy: ["1.26*", "2*"] - experimental: [false] - runner: [windows-latest] - continue-on-error: ${{ matrix.experimental }} + include: + - python: "3.10" + numpy: "2.2" + - python: "3.11" + numpy: "2.3" + - python: "3.12" + numpy: "2.3" + - python: "3.13" + numpy: "2.3" + env: CHANNELS: -c conda-forge --override-channels diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 5c237ac..bf570b0 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ["3.9", "3.10", "3.11", "3.12"] + python: ["3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 with: @@ -66,7 +66,7 @@ jobs: strategy: matrix: - python: ["3.9", "3.10", "3.11", "3.12"] + python: ["3.10", "3.11", "3.12", "3.13"] env: conda-bld: C:\Miniconda\conda-bld\win-64\ steps: @@ -108,14 +108,14 @@ jobs: strategy: matrix: include: - - python: '3.9' - numpy: '1.26' - - python: '3.10' - numpy: '2.2' - - python: '3.11' - numpy: '2.2' - - python: '3.12' - numpy: '2.2' + - python: "3.10" + numpy: "2.2" + - python: "3.11" + numpy: "2.3" + - python: "3.12" + numpy: "2.3" + - python: "3.13" + numpy: "2.3" env: CHANNELS: -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels @@ -180,14 +180,14 @@ jobs: strategy: matrix: include: - - python: '3.9' - numpy: '1.26' - - python: '3.10' - numpy: '2.2' - - python: '3.11' - numpy: '2.2' - - python: '3.12' - numpy: '2.2' + - python: "3.10" + numpy: "2.2" + - python: "3.11" + numpy: "2.3" + - python: "3.12" + numpy: "2.3" + - python: "3.13" + numpy: "2.3" env: CHANNELS: -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0e84b64 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# changelog +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.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [dev] (MM/DD/YYYY) + +### Added +* Enabled support of Python 3.14 [gh-79](https://github.com/IntelPython/mkl_random/pull/79) + +### Removed +* Dropped support for Python 3.9 [gh-81](https://github.com/IntelPython/mkl_random/pull/81) + +## [1.3.0] (10/06/2025) + +### Changed +* Used `GIT_DESCRIBE_TAG` and `GIT_DESCRIBE_NUMBER` in `meta.yaml` instead of manual stepping the numbers [gh-75](https://github.com/IntelPython/mkl_random/pull/75) +* Extended conda build scripts with the use of `WHEELS_OUTPUT_FOLDER` variable to build wheel packages [gh-74](https://github.com/IntelPython/mkl_random/pull/74) +* Updated `meta.yaml` to have a run dependency on `numpy-base` package [gh-73](https://github.com/IntelPython/mkl_random/pull/73) diff --git a/conda-recipe-cf/meta.yaml b/conda-recipe-cf/meta.yaml index 457cfbd..2e45fe7 100644 --- a/conda-recipe-cf/meta.yaml +++ b/conda-recipe-cf/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "1.3.0dev0" %} +{% set version = "1.4.0dev0" %} {% set buildnumber = 0 %} package: diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 031da9c..6877fec 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -19,6 +19,7 @@ requirements: - {{ stdlib('c') }} host: - python + - python-gil # [py>=314] - setuptools >=77 - mkl-devel - cython @@ -27,6 +28,7 @@ requirements: - wheel >=0.41.3 run: - python + - python-gil # [py>=314] - {{ pin_compatible('mkl', min_pin="x.x", max_pin="x") }} - {{ pin_compatible('numpy-base', min_pin="x.x", max_pin="x") }} diff --git a/docs/source/conf.py b/docs/source/conf.py index 0cfad78..5725476 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -9,7 +9,7 @@ project = 'mkl_random' copyright = '2017-2025, Intel Corp.' author = 'Intel Corp.' -release = '1.3.0dev0' +release = '1.4.0dev0' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/docs/source/how_to.rst b/docs/source/how_to.rst index a7f909e..3ae4b06 100644 --- a/docs/source/how_to.rst +++ b/docs/source/how_to.rst @@ -68,7 +68,7 @@ indistinguishable from independent. Initialize the state of the generator using leap-frog method, or raise :code:`ValueError` exception if not supported. - The leap-frog method partitions state tragectory into :code:`nstream` interleaved non-overlapping + The leap-frog method partitions state trajectory into :code:`nstream` interleaved non-overlapping sub-sequences, and argument :code:`k` identifies the subsequence. The method is supported for :ref:`"mcg31m1" `, :ref:`"mcg59" `, and :ref:`"wh" ` diff --git a/docs/source/reference/ars5.rst b/docs/source/reference/ars5.rst index e9b6f77..a3578ac 100644 --- a/docs/source/reference/ars5.rst +++ b/docs/source/reference/ars5.rst @@ -23,7 +23,7 @@ initialized with either an integral seed, a list of integral seeds, or automatic rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="ars5") # Use random state instance to generate 1000 random numbers from - # Gamma(3, 1) distibution + # Gamma(3, 1) distribution gsample = rs_vec.gamma(3, 1, size=1000) When seed is not specified, the generator is initialized using system clock, e.g.: diff --git a/docs/source/reference/mcg31.rst b/docs/source/reference/mcg31.rst index 2e86778..7b06745 100644 --- a/docs/source/reference/mcg31.rst +++ b/docs/source/reference/mcg31.rst @@ -23,7 +23,7 @@ initialized with either an integral seed, a list of integral seeds, or automati rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="MCG31") # Use random state instance to generate 1000 random numbers from - # Gamma(3, 1) distibution + # Gamma(3, 1) distribution gsample = rs_vec.gamma(3, 1, size=1000) When seed is not specified, the generator is initialized using system clock, e.g.: diff --git a/docs/source/reference/mcg59.rst b/docs/source/reference/mcg59.rst index 944a7b6..947d319 100644 --- a/docs/source/reference/mcg59.rst +++ b/docs/source/reference/mcg59.rst @@ -23,7 +23,7 @@ initialized with either an integral seed, a list of integral seeds, or automati rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="MCG59") # Use random state instance to generate 1000 random numbers from - # Gamma(3, 1) distibution + # Gamma(3, 1) distribution gsample = rs_vec.gamma(3, 1, size=1000) When seed is not specified, the generator is initialized using system clock, e.g.: diff --git a/docs/source/reference/mrg32k3a.rst b/docs/source/reference/mrg32k3a.rst index ae4577a..bfe71fb 100644 --- a/docs/source/reference/mrg32k3a.rst +++ b/docs/source/reference/mrg32k3a.rst @@ -23,7 +23,7 @@ initialized with either an integral seed, a list of integral seeds, or automati rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="MRG32k3a") # Use random state instance to generate 1000 random numbers from - # Gamma(3, 1) distibution + # Gamma(3, 1) distribution gsample = rs_vec.gamma(3, 1, size=1000) When seed is not specified, the generator is initialized using system clock, e.g.: diff --git a/docs/source/reference/mt2203.rst b/docs/source/reference/mt2203.rst index e916fea..2a61b55 100644 --- a/docs/source/reference/mt2203.rst +++ b/docs/source/reference/mt2203.rst @@ -32,7 +32,7 @@ An individual member of the set can be addressed by using a tuple to specify the rs = mkl_random.RandomState([1234, 567, 89, 0], brng=("MT2203", 6023)) # Use random state instance to generate 1000 random numbers from - # Gamma(3, 1) distibution + # Gamma(3, 1) distribution gsample = rs_vec.gamma(3, 1, size=1000) When seed is not specified, the generator is initialized using system clock, e.g.: diff --git a/docs/source/reference/philox4x32x10.rst b/docs/source/reference/philox4x32x10.rst index c538c40..fcc0a52 100644 --- a/docs/source/reference/philox4x32x10.rst +++ b/docs/source/reference/philox4x32x10.rst @@ -23,7 +23,7 @@ initialized with either an integral seed, a list of integral seeds, or automati rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="philox4x32x10") # Use random state instance to generate 1000 random numbers from - # Gamma(3, 1) distibution + # Gamma(3, 1) distribution gsample = rs_vec.gamma(3, 1, size=1000) When seed is not specified, the generator is initialized using system clock, e.g.: diff --git a/docs/source/reference/r250.rst b/docs/source/reference/r250.rst index b5e8e44..36942c6 100644 --- a/docs/source/reference/r250.rst +++ b/docs/source/reference/r250.rst @@ -23,7 +23,7 @@ initialized with either an integral seed, a list of integral seeds, or automati rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="R250") # Use random state instance to generate 1000 random numbers from - # Gamma(3, 1) distibution + # Gamma(3, 1) distribution gsample = rs_vec.gamma(3, 1, size=1000) When seed is not specified, the generator is initialized using system clock, e.g.: diff --git a/docs/source/reference/sfmt19937.rst b/docs/source/reference/sfmt19937.rst index 125792a..56ee04e 100644 --- a/docs/source/reference/sfmt19937.rst +++ b/docs/source/reference/sfmt19937.rst @@ -23,7 +23,7 @@ either an integral seed, a list of integral seeds, or automatically. rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="SFMT19937") # Use random state instance to generate 1000 random numbers from - # Gamma distibution + # Gamma distribution gsample = rs_vec.gamma(3, 1, size=1000) When seed is not specified, the generator is initialized using system clock, e.g.: diff --git a/docs/source/reference/wichmann_hill.rst b/docs/source/reference/wichmann_hill.rst index 4aeb1fe..9d49f4e 100644 --- a/docs/source/reference/wichmann_hill.rst +++ b/docs/source/reference/wichmann_hill.rst @@ -33,7 +33,7 @@ An individual member of the set can be addressed by using a tuple to specify the rs = mkl_random.RandomState([1234, 567, 89, 0], brng=("WH", 200)) # Use random state instance to generate 1000 random numbers from - # Gamma(3, 1) distibution + # Gamma(3, 1) distribution gsample = rs_vec.gamma(3, 1, size=1000) When seed is not specified, the generator is initialized using system clock, e.g.: diff --git a/docs/source/tutorials.rst b/docs/source/tutorials.rst index 5b5b41c..1c72fd3 100644 --- a/docs/source/tutorials.rst +++ b/docs/source/tutorials.rst @@ -115,7 +115,7 @@ The quality of emulation is tested statistically through a battery of test, e.g. These tests check if various statistical tests can separate the pseudo-random sequence from a true random one. Pseudo-random generators usually have an internal state and require its initialization, also sometimes known as seeding. -States initialization algorithms take user provided _seed_ value, usually an integer or a finite seqeuence of integers, and scramble it +States initialization algorithms take user provided _seed_ value, usually an integer or a finite sequence of integers, and scramble it to populate the internal state of the pseudo-random generator. The sequence from the pseudo-random generator, unlike from true random generator, is repeatable, provided the internal state can be diff --git a/mkl_random/_version.py b/mkl_random/_version.py index 26e138a..09dc342 100644 --- a/mkl_random/_version.py +++ b/mkl_random/_version.py @@ -1 +1 @@ -__version__ = '1.3.0dev0' +__version__ = '1.4.0dev0' diff --git a/mkl_random/mklrand.pyx b/mkl_random/mklrand.pyx index 4a88518..5cd886e 100644 --- a/mkl_random/mklrand.pyx +++ b/mkl_random/mklrand.pyx @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2017-2024, Intel Corporation +# Copyright (c) 2017, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/mkl_random/src/randomkit.cpp b/mkl_random/src/randomkit.cpp index bacfcb7..a7f8bb4 100644 --- a/mkl_random/src/randomkit.cpp +++ b/mkl_random/src/randomkit.cpp @@ -93,7 +93,7 @@ const char *irk_strerror[RK_ERR_MAX] = { "no error", - "random device unvavailable"}; + "random device unavailable"}; /* static functions */ static unsigned long irk_hash(unsigned long key); diff --git a/mkl_random/tests/test_random.py b/mkl_random/tests/test_random.py index 124fc29..8087466 100644 --- a/mkl_random/tests/test_random.py +++ b/mkl_random/tests/test_random.py @@ -283,7 +283,7 @@ def test_randint_repeatability(randint): res = hashlib.md5(val.view(np.int8)).hexdigest() assert tgt[np.dtype(dt).name] == res - # bools do not depend on endianess + # bools do not depend on endianness rnd.seed(1234, brng='MT19937') val = randint.rfunc(0, 2, size=1000, dtype='bool').view(np.int8) res = hashlib.md5(val).hexdigest() diff --git a/pyproject.toml b/pyproject.toml index 1e24356..6bd503e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,11 +38,11 @@ classifiers = [ "Programming Language :: C", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development", "Topic :: Scientific/Engineering", @@ -59,7 +59,7 @@ keywords = ["MKL", "VSL", "true randomness", "pseudorandomness", license = "BSD-3-Clause" name = "mkl_random" readme = {file = "README.md", content-type = "text/markdown"} -requires-python = ">=3.9,<3.14" +requires-python = ">=3.10,<3.15" [project.optional-dependencies] test = ["pytest"]