Skip to content
Draft
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
10 changes: 10 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
project(
'reproject',
'c', 'cython',
version: '0.20.0.dev0',
meson_version: '>=1.3.0',
)

py = import('python').find_installation(pure: false)

subdir('reproject')
37 changes: 4 additions & 33 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
build-backend = "mesonpy"
requires = ["meson-python", "cython>=3.1", "numpy>=2"]

[project]
name = "reproject"
authors = [
Expand Down Expand Up @@ -55,33 +59,6 @@ dev = [
{include-group = "test"},
]

[build-system]
requires = ["setuptools",
"setuptools_scm",
"extension-helpers>=1.3,<2",
"numpy>=2",
"cython>=3.1"]
build-backend = 'setuptools.build_meta'

[tool.setuptools]
zip-safe = false
license-files = ["LICENSE"]
include-package-data = false

[tool.setuptools.packages]
find = {namespaces = false}

[tool.setuptools.package-data]
"reproject.healpix.tests" = ["data/*"]
"reproject.adaptive.tests" = ["reference/*"]
"reproject.interpolation.tests" = ["reference/*"]
"reproject.mosaicking.tests" = ["reference/*"]
"reproject.spherical_intersect" = ["overlapArea.h", "reproject_slice_c.h", "mNaN.h"]
"reproject.tests" = ["data/*"]

[tool.extension-helpers]
use_extension_helpers = "true"

[tool.pytest.ini_options]
minversion = "6"
log_cli_level = "INFO"
Expand Down Expand Up @@ -148,9 +125,6 @@ exclude_lines = [
[tool.flake8]
max-line-length = "100"

[tool.setuptools_scm]
write_to = "reproject/version.py"

[tool.cibuildwheel]
skip = "cp36-* pp* *-musllinux* cp31?t-*"
test-skip = "*-manylinux_aarch64"
Expand Down Expand Up @@ -203,6 +177,3 @@ lint.select = [

[tool.ruff.lint.extend-per-file-ignores]
"docs/conf.py" = ["F405"] # Sphinx injects variables into namespace

[tool.distutils.bdist_wheel]
py-limited-api = "cp311"
5 changes: 4 additions & 1 deletion reproject/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
Astropy affiliated package for image reprojection (resampling).
"""

from importlib.metadata import version

from .adaptive import reproject_adaptive # noqa
from .healpix import reproject_from_healpix, reproject_to_healpix # noqa
from .interpolation import reproject_interp # noqa
from .spherical_intersect import reproject_exact # noqa
from .version import __version__ # noqa

__version__ = version("reproject")
16 changes: 16 additions & 0 deletions reproject/adaptive/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
py.install_sources(
'__init__.py',
'core.py',
'high_level.py',
subdir: 'reproject/adaptive',
)

py.extension_module(
'deforest',
'deforest.pyx',
dependencies: dependency('numpy'),
install: true,
subdir: 'reproject/adaptive',
)

subdir('tests')
13 changes: 13 additions & 0 deletions reproject/adaptive/tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
py.install_sources(
'__init__.py',
'test_core.py',
subdir: 'reproject/adaptive/tests',
)

install_data(
'reference/test_reproject_adaptive_2d.fits',
'reference/test_reproject_adaptive_2d_rotated.fits',
'reference/test_reproject_adaptive_roundtrip.fits',
'reference/test_reproject_adaptive_uncentered_jacobian.fits',
install_dir: py.get_install_dir() / 'reproject/adaptive/tests/reference',
)
9 changes: 9 additions & 0 deletions reproject/healpix/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
py.install_sources(
'__init__.py',
'core.py',
'high_level.py',
'utils.py',
subdir: 'reproject/healpix',
)

subdir('tests')
12 changes: 12 additions & 0 deletions reproject/healpix/tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
py.install_sources(
'__init__.py',
'test_healpix.py',
'test_utils.py',
subdir: 'reproject/healpix/tests',
)

install_data(
'data/bayestar.fits.gz',
'data/reference_result.fits',
install_dir: py.get_install_dir() / 'reproject/healpix/tests/data',
)
10 changes: 10 additions & 0 deletions reproject/hips/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
py.install_sources(
'__init__.py',
'_dask_array.py',
'_trim_utils.py',
'high_level.py',
'utils.py',
subdir: 'reproject/hips',
)

subdir('tests')
6 changes: 6 additions & 0 deletions reproject/hips/tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
py.install_sources(
'__init__.py',
'test_dask_array.py',
'test_high_level.py',
subdir: 'reproject/hips/tests',
)
8 changes: 8 additions & 0 deletions reproject/interpolation/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
py.install_sources(
'__init__.py',
'core.py',
'high_level.py',
subdir: 'reproject/interpolation',
)

subdir('tests')
13 changes: 13 additions & 0 deletions reproject/interpolation/tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
py.install_sources(
'__init__.py',
'test_core.py',
subdir: 'reproject/interpolation/tests',
)

install_data(
'reference/test_reproject_celestial_2d_gal2equ.fits',
'reference/test_reproject_celestial_3d_equ2gal.fits',
'reference/test_reproject_roundtrip.fits',
'reference/test_small_cutout.fits',
install_dir: py.get_install_dir() / 'reproject/interpolation/tests/reference',
)
17 changes: 17 additions & 0 deletions reproject/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
py.install_sources(
'__init__.py',
'array_utils.py',
'common.py',
'conftest.py',
'utils.py',
'wcs_utils.py',
subdir: 'reproject',
)

subdir('adaptive')
subdir('healpix')
subdir('hips')
subdir('interpolation')
subdir('mosaicking')
subdir('spherical_intersect')
subdir('tests')
10 changes: 10 additions & 0 deletions reproject/mosaicking/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
py.install_sources(
'__init__.py',
'background.py',
'coadd.py',
'subset_array.py',
'wcs_helpers.py',
subdir: 'reproject/mosaicking',
)

subdir('tests')
13 changes: 13 additions & 0 deletions reproject/mosaicking/tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
py.install_sources(
'__init__.py',
'test_background.py',
'test_coadd.py',
'test_subset_array.py',
'test_wcs_helpers.py',
subdir: 'reproject/mosaicking/tests',
)

install_data(
'reference/test_coadd_solar_map.fits',
install_dir: py.get_install_dir() / 'reproject/mosaicking/tests/reference',
)
29 changes: 29 additions & 0 deletions reproject/spherical_intersect/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
py.install_sources(
'__init__.py',
'core.py',
'high_level.py',
'overlap.py',
subdir: 'reproject/spherical_intersect',
)

# Install header files needed at runtime for potential rebuilds
py.install_sources(
'mNaN.h',
'overlapArea.h',
'reproject_slice_c.h',
subdir: 'reproject/spherical_intersect',
)

py.extension_module(
'_overlap',
'_overlap.pyx',
'overlapArea.c',
'reproject_slice_c.c',
dependencies: dependency('numpy'),
include_directories: include_directories('.'),
c_args: ['-O2'],
install: true,
subdir: 'reproject/spherical_intersect',
)

subdir('tests')
38 changes: 0 additions & 38 deletions reproject/spherical_intersect/setup_package.py

This file was deleted.

7 changes: 7 additions & 0 deletions reproject/spherical_intersect/tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
py.install_sources(
'__init__.py',
'test_high_level.py',
'test_overlap.py',
'test_reproject.py',
subdir: 'reproject/spherical_intersect/tests',
)
24 changes: 24 additions & 0 deletions reproject/tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
py.install_sources(
'__init__.py',
'helpers.py',
'test_array_utils.py',
'test_high_level.py',
'test_utils.py',
subdir: 'reproject/tests',
)

install_data(
'data/aia_171_level1.asdf',
'data/aia_171_level1.fits',
'data/cube.hdr',
'data/equatorial_3d.fits',
'data/galactic_2d.fits',
'data/gc_eq.hdr',
'data/gc_ga.hdr',
'data/generate_asdf.py',
'data/image_with_distortion_map.fits',
'data/mwpan2_RGB_3600.hdr',
'data/secchi_l0_a.fits',
'data/secchi_l0_b.fits',
install_dir: py.get_install_dir() / 'reproject/tests/data',
)
Loading