- backwards compatibility bugfix
This commit is contained in:
@@ -1,33 +1,16 @@
|
|||||||
name: Publish
|
name: Publish
|
||||||
|
|
||||||
on: [push, pull_request, workflow_call]
|
on: [workflow_dispatch]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pytest:
|
publish_pytest:
|
||||||
runs-on: ${{ matrix.os }}
|
uses: ./.github/workflows/pytest.yml
|
||||||
strategy:
|
pypi_publish:
|
||||||
matrix:
|
|
||||||
python-version: [ "3.10", "3.12" ]
|
|
||||||
os: [ ubuntu-latest, windows-latest, macOS-latest ]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
- name: Install
|
|
||||||
run: pip install .[test]
|
|
||||||
- name: Test with pytest
|
|
||||||
run: pytest
|
|
||||||
|
|
||||||
sdist:
|
|
||||||
needs: [ pytest ]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: [ publish_pytest ]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
@@ -39,26 +22,5 @@ jobs:
|
|||||||
run: pip install build
|
run: pip install build
|
||||||
- name: Build a binary wheel and a source tarball
|
- name: Build a binary wheel and a source tarball
|
||||||
run: python -m build
|
run: python -m build
|
||||||
- name: Upload sdist
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: sdist
|
|
||||||
path: dist
|
|
||||||
|
|
||||||
release:
|
|
||||||
name: Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [ sdist ]
|
|
||||||
environment:
|
|
||||||
name: pypi
|
|
||||||
url: https://pypi.org/p/parfor
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
steps:
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v7
|
|
||||||
with:
|
|
||||||
name: sdist
|
|
||||||
path: dist
|
|
||||||
- name: Publish to PyPI
|
- name: Publish to PyPI
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
name: PyTest
|
||||||
|
|
||||||
|
on: [push, pull_request, workflow_call]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pytest:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: [ "3.10", "3.12", "3.14" ]
|
||||||
|
os: [ ubuntu-latest ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v6
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- name: Install
|
||||||
|
run: pip install .[test]
|
||||||
|
- name: Test with pytest
|
||||||
|
run: pytest
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
[](https://github.com/wimpomp/parfor/actions/workflows/publish.yml)
|
[](https://git.wimpomp.nl/wim/parfor/actions?workflow=pytest.yml)
|
||||||
|
|
||||||
# Parfor
|
# Parfor
|
||||||
Used to parallelize for-loops using parfor in Matlab? This package allows you to do the same in python.
|
Used to parallelize for-loops using parfor in Matlab? This package allows you to do the same in python.
|
||||||
|
|||||||
+2
-1
@@ -512,7 +512,8 @@ class ParPool:
|
|||||||
class PoolSingleton:
|
class PoolSingleton:
|
||||||
cpu_count: int = os.cpu_count()
|
cpu_count: int = os.cpu_count()
|
||||||
|
|
||||||
def close(self) -> None:
|
@staticmethod
|
||||||
|
def close(*args, **kwargs) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "parfor"
|
name = "parfor"
|
||||||
version = "2026.2.2"
|
version = "2026.5.0"
|
||||||
description = "A package to mimic the use of parfor as done in Matlab."
|
description = "A package to mimic the use of parfor as done in Matlab."
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Wim Pomp-Pervova", email = "wimpomp@gmail.com" }
|
{ name = "Wim Pomp-Pervova", email = "wimpomp@gmail.com" }
|
||||||
@@ -17,7 +17,7 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
repository = "https://github.com/wimpomp/parfor"
|
repository = "https://git.wimpomp.nl/wim/parfor"
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
test = ["pytest"]
|
test = ["pytest"]
|
||||||
|
|||||||
Reference in New Issue
Block a user