Skip to content
Draft
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
4edc54a
feat: add flags and basic test
beckermr Nov 26, 2025
6eb7272
feat: release the GIL for underlying image read and write ops
beckermr Nov 26, 2025
251fdf1
test: expand test to ensure the GIL is released
beckermr Nov 26, 2025
60c1919
test: measure time for one file to get a sense of much NOGIL is helping
beckermr Nov 26, 2025
e6bb834
feat: release just enough
beckermr Nov 26, 2025
1ed28dd
style: format code
beckermr Nov 26, 2025
8e0f58f
feat: better perf
beckermr Nov 26, 2025
3786a11
fix: this spacing is weird
beckermr Nov 26, 2025
6b2f377
feat: maybe better perf
beckermr Nov 26, 2025
68d94d7
feat: remove extra vars
beckermr Nov 26, 2025
e38fcc0
feat: make tests more likely to pass
beckermr Nov 26, 2025
0d3e13f
test: mark test as xfail
beckermr Nov 26, 2025
d5e8b7a
feat: release gil on file flush
beckermr Nov 26, 2025
eaf24eb
feat: cache filename too
beckermr Nov 26, 2025
2066213
feat: better releasing of the gil
beckermr Nov 27, 2025
5dd90e4
fix: only flush if status is ok
beckermr Nov 27, 2025
5eda0bb
fix: always flush HDU if we managed to make it
beckermr Nov 27, 2025
2255ed4
test: expand the test suite
beckermr Nov 27, 2025
c04c327
fix: set thread to null again
beckermr Nov 27, 2025
9abd500
test: add a smoke test w/ lots of threads
beckermr Nov 27, 2025
2231ddd
chore: skip 39 for python
beckermr Nov 27, 2025
49281b6
chore: update gha
beckermr Nov 27, 2025
d5c497c
fix: try compiler flags
beckermr Nov 27, 2025
1f7082b
fix: missed a quote
beckermr Nov 27, 2025
b04cec1
chore: pin more
beckermr Nov 27, 2025
f181e16
fix: better test
beckermr Nov 27, 2025
d2c3757
Apply suggestion from @beckermr
beckermr Nov 28, 2025
a7b3923
feat: more robust release macro
beckermr Nov 28, 2025
01d395e
Merge branch 'nogil-minimal' of https://github.com/esheldon/fitsio in…
beckermr Nov 28, 2025
8c0c6ac
feat: more robust release macro
beckermr Nov 28, 2025
86e5b83
feat: bigger nogil section in read
beckermr Nov 28, 2025
49bdff2
feat: release in big chunks more
beckermr Nov 29, 2025
2c42b8f
feat: do checksums w/o GIL
beckermr Nov 29, 2025
3959645
fix: wrong version bound
beckermr Nov 29, 2025
536cd6e
feat: more nogil
beckermr Nov 30, 2025
7b83487
fix: compile error
beckermr Nov 30, 2025
ba03f62
feat: more nogil
beckermr Dec 1, 2025
2a3b851
test: add threaded testing
beckermr Dec 4, 2025
59736e5
test: enable tests of freethreading in 3.14
beckermr Dec 4, 2025
0b6add4
test: ensure have gil
beckermr Dec 4, 2025
49ad3e0
Merge branch 'master' into nogil-minimal
beckermr Dec 4, 2025
899e175
fix: not needed for old builds
beckermr Dec 4, 2025
2b51a56
Merge branch 'nogil-minimal' of https://github.com/esheldon/fitsio in…
beckermr Dec 4, 2025
da91cd8
fix: configure more parallel testing
beckermr Dec 4, 2025
c737968
fix: more test configuration
beckermr Dec 4, 2025
c9364f8
test: clean disk space
beckermr Dec 4, 2025
7ae5a4a
test: fixup tests more
beckermr Dec 4, 2025
6070b83
test: expand test matrix again
beckermr Dec 4, 2025
89200d6
fix: bash syntax
beckermr Dec 4, 2025
0bcac8c
test: fix test matrix
beckermr Dec 4, 2025
0aa2458
test: more test bugs
beckermr Dec 4, 2025
a7ef09d
test: just numpy 2
beckermr Dec 4, 2025
0c41ea9
test: more test fixes
beckermr Dec 4, 2025
31bed73
test: only need one of these errors
beckermr Dec 4, 2025
0ceeacc
test: do slow tests only once
beckermr Dec 5, 2025
4fed54b
fix: wrong dep; more slow tests
beckermr Dec 5, 2025
5697458
test: do slow tests in a few more cases
beckermr Dec 5, 2025
3014571
Merge branch 'master' into nogil-minimal
beckermr Dec 9, 2025
292dddb
Apply suggestion from @beckermr
beckermr Dec 9, 2025
76fb762
test: remove changes we do not need
beckermr Dec 9, 2025
97d0476
Merge branch 'master' into nogil-minimal
beckermr Jan 30, 2026
9d30c1c
Merge branch 'master' into nogil-minimal
beckermr Feb 4, 2026
6026d90
Merge branch 'master' into nogil-minimal
beckermr Feb 4, 2026
221d299
fix: check for null file pointers before free and always set to null …
beckermr Feb 4, 2026
329b203
style: apply clang format
beckermr Feb 4, 2026
05e0723
fix: bad change
beckermr Feb 4, 2026
b63bf93
fix: make sure init is null
beckermr Feb 4, 2026
a1d7c5a
fix: make sure we only enable nogil when fits is reentrant
beckermr Feb 5, 2026
ebca810
test: enable reentrant fitsio for some tests
beckermr Feb 5, 2026
063636e
fix: get testing flags right
beckermr Feb 5, 2026
22ae394
fix: get flags correct again
beckermr Feb 5, 2026
702953c
style: pre-the-commit
beckermr Feb 5, 2026
bce4615
test: add one more test case
beckermr Feb 5, 2026
ed42b26
fix: pass flag to ignore the fil coming back
beckermr Feb 5, 2026
1adc92d
Merge branch 'master' into nogil-minimal
beckermr Feb 6, 2026
38c6ae5
style: cleanup the strings
beckermr Feb 6, 2026
8c7352d
fix merge
beckermr Feb 6, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
fetch-tags: true

- uses: mamba-org/setup-micromamba@v2.0.7
- uses: mamba-org/setup-micromamba@7f29b8b80078b1b601dfa018b0f7425c587c63bb #v2.0.7
with:
environment-name: fitsio-dev
condarc: |
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/tests-external-cfitsio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,31 @@ jobs:
# binary tables that exceed 2**32 bytes
- { pyver: "3.9", npver: "1", cftsver: "-4.4.0", doslow: "--slow"}
- { pyver: "3.9", npver: "1", cftsver: "latest", doslow: "--slow"}
- { pyver: "3.13", npver: "2", cftsver: "latest", doslow: "--slow"}
- { pyver: "3.14", npver: "2", cftsver: "latest", doslow: "--slow"}

runs-on: ${{ matrix.os }}
env:
PIP_OPTIONS: "--no-cache-dir --no-deps --no-build-isolation -v"

steps:
- uses: actions/checkout@v6
- name: free disk space
if: matrix.os == 'ubuntu-latest'
uses: endersonmenezes/free-disk-space@v3
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
rm_cmd: "rmz"

- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
fetch-tags: true

- uses: mamba-org/setup-micromamba@v2.0.7
- uses: mamba-org/setup-micromamba@7f29b8b80078b1b601dfa018b0f7425c587c63bb #v2.0.7
with:
environment-name: fitsio-dev
environment-file: environment.yml
condarc: |
channels:
- conda-forge
Expand All @@ -64,13 +74,6 @@ jobs:
create-args: >-
python=${{ matrix.config.pyver }}
numpy=${{ matrix.config.npver }}
setuptools-scm>=8
wget
make
pytest
setuptools>=78
pytest-skip-slow
pytest-run-parallel

- name: build external cfitsio
run: |
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/tests-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,33 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-22.04]
pyver: ["3.9", "3.13"]
pyver: ["3.9", "3.14"]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v6
- name: free disk space
if: matrix.os == 'ubuntu-latest'
uses: endersonmenezes/free-disk-space@v3
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
rm_cmd: "rmz"

- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v6
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '${{ matrix.pyver }}'

- name: install pip & setuptools
- name: install pip, setuptools, & pytest
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install pytest pytest-skip-slow pytest-run-parallel
python -m pip install pytest pytest-run-parallel pytest-skip-slow

- name: install bzip2 and other tools on linux
if: contains(matrix.os, 'ubuntu')
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,24 @@ jobs:
PIP_OPTIONS: "--no-cache-dir --no-deps --no-build-isolation -v"

steps:
- uses: actions/checkout@v6
- name: free disk space
if: matrix.os == 'ubuntu-latest'
uses: endersonmenezes/free-disk-space@v3
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
rm_cmd: "rmz"

- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
fetch-tags: true

- uses: mamba-org/setup-micromamba@v2.0.7
- uses: mamba-org/setup-micromamba@7f29b8b80078b1b601dfa018b0f7425c587c63bb #v2.0.7
with:
environment-name: fitsio-dev
environment-file: environment.yml
condarc: |
channels:
- conda-forge
Expand All @@ -59,13 +69,6 @@ jobs:
create-args: >-
python=${{ matrix.config.pyver }}
numpy=${{ matrix.config.npver }}
setuptools-scm>=8
wget
make
pytest
setuptools>=78
pytest-skip-slow
pytest-run-parallel
${{ matrix.config.ft }}

- name: set parallel testing flags
Expand Down
56 changes: 40 additions & 16 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,26 @@ jobs:
name: linux-manylinux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: free disk space
uses: endersonmenezes/free-disk-space@v3
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
rm_cmd: "rmz"

- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || '' }}
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v6
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '${{ env.PYVER }}'

- name: build wheels
uses: pypa/cibuildwheel@v3.3.0
uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0
env:
CIBW_BUILD: "*manylinux*"
CIBW_ARCHS: auto64
Expand All @@ -69,18 +77,26 @@ jobs:
name: linux-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: free disk space
uses: endersonmenezes/free-disk-space@v3
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
rm_cmd: "rmz"

- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || '' }}
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v6
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '${{ env.PYVER }}'

- name: build wheels
uses: pypa/cibuildwheel@v3.3.0
uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0
env:
CIBW_BUILD: "*musllinux*"
CIBW_ARCHS: auto64
Expand Down Expand Up @@ -115,18 +131,18 @@ jobs:
name: osx-intel
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || '' }}
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v6
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '${{ env.PYVER }}'

- name: build wheels
uses: pypa/cibuildwheel@v3.3.0
uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0
env:
CIBW_BUILD: "*macosx*"
CIBW_ARCHS: auto64
Expand All @@ -153,18 +169,18 @@ jobs:
name: osx-arm
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || '' }}
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v6
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '${{ env.PYVER }}'

- name: build wheels
uses: pypa/cibuildwheel@v3.3.0
uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0
env:
CIBW_BUILD: "*macosx*"
CIBW_ARCHS: arm64
Expand Down Expand Up @@ -193,13 +209,21 @@ jobs:
# Just need to build sdist on a single machine
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: free disk space
uses: endersonmenezes/free-disk-space@v3
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
rm_cmd: "rmz"

- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || '' }}
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v6
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '${{ env.PYVER }}'

Expand All @@ -209,7 +233,7 @@ jobs:
pip install -U build

- name: download wheels
uses: actions/download-artifact@v6
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
path: ./wheels
pattern: whl-*
Expand All @@ -230,7 +254,7 @@ jobs:
ls -l dist

- name: publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
with:
verbose: true
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,5 @@ cfitsio-*/Makefile
fitsio/_version.py

.ruff_cache

prof/
14 changes: 14 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: fitsio-dev
channels:
- conda-forge
dependencies:
- python
- numpy
- pip
- setuptools
- setuptools-scm >=8
- wget
- make
- pytest
- pytest-run-parallel
- pytest-skip-slow
Loading
Loading