Skip to content

Commit 0cbfaed

Browse files
authored
Merge pull request #139 from transientskp/Fix_138
Fix 138
2 parents b3caf74 + c6c92fb commit 0cbfaed

6 files changed

Lines changed: 17 additions & 9 deletions

File tree

.github/workflows/python-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
32-
python-version: ["3.10", "3.11"]
32+
python-version: ["3.12", "3.13"]
3333
# lint with min & max supported versions
3434

3535
steps:
@@ -55,7 +55,7 @@ jobs:
5555
runs-on: ubuntu-latest
5656
strategy:
5757
matrix:
58-
python-version: ["3.10", "3.11"]
58+
python-version: ["3.10", "3.11", "3.12", "3.13"]
5959

6060
steps:
6161
- uses: actions/checkout@v4
@@ -78,7 +78,7 @@ jobs:
7878
type-check:
7979
strategy:
8080
matrix:
81-
python-version: ["3.10", "3.11"]
81+
python-version: ["3.12", "3.13"]
8282

8383
runs-on: ubuntu-latest
8484
continue-on-error: true

pyproject.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license = {file = "LICENSE"}
1111
authors = [
1212
{ name = "TKP Discovery WG", email = "discovery@transientskp.org" },
1313
]
14-
requires-python = ">=3.10"
14+
requires-python = ">=3.10, <3.14"
1515
dependencies = [
1616
"astropy",
1717
"numpy",
@@ -53,14 +53,17 @@ include = [
5353
packages = ["sourcefinder"]
5454

5555
[tool.hatch.envs.test]
56+
matrix = [
57+
{python = ["3.12"]}
58+
]
5659
extra-dependencies = [
5760
"pytest",
5861
"pytest-cov",
5962
"pytest-xdist",
6063
]
6164

62-
[tool.hatch.envs.default_310]
63-
python = "3.10"
65+
[tool.hatch.envs.default_312]
66+
python = "3.12"
6467
extra-dependencies = [
6568
"pytest",
6669
"pytest-cov",
@@ -77,7 +80,7 @@ dependencies = [
7780

7881
[tool.pytest.ini_options]
7982
testpaths = ["test"]
80-
addopts = ["--import-mode=importlib", "--cov=sourcefinder", "-q", "-ra", "-n=logical", "--dist=worksteal"]
83+
addopts = ["--import-mode=importlib", "--cov=sourcefinder", "-q", "-ra", "-n=logical", "--dist=worksteal", "--cov-config=test/.coveragerc"]
8184

8285
[tool.black]
8386
include = '\.pyi?$'

sourcefinder/accessors/lofarcasaimage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
)
2929

3030

31-
class LofarCasaImage(CasaImage, LofarAccessor):
31+
class LofarCasaImage(CasaImage, LofarAccessor): # type: ignore[misc]
3232
"""
3333
Use casacore to pull image data out of an Casa table.
3434

sourcefinder/accessors/lofarfitsimage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from sourcefinder.accessors.lofaraccessor import LofarAccessor
33

44

5-
class LofarFitsImage(FitsImage, LofarAccessor):
5+
class LofarFitsImage(FitsImage, LofarAccessor): # type: ignore[misc]
66
def __init__(self, url, plane=False, beam=False, hdu=0):
77
super().__init__(url, plane, beam, hdu)
88
header = self._get_header(hdu)

test/.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
parallel = true

test/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import os
22
from pathlib import Path
33
import warnings
4+
import multiprocessing
45

56
DEFAULT = str((Path(__file__).parent / "data").absolute())
67
DATAPATH = os.environ.get("TKP_TESTPATH", DEFAULT)
78

9+
multiprocessing.set_start_method("spawn", force=True)
10+
811
if not os.access(DATAPATH, os.X_OK):
912
warnings.warn(f"can't access {DATAPATH}")

0 commit comments

Comments
 (0)