-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build with Numpy 2.0, remove setup.cfg and more #85
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
bf84e45
remove old commands from setup.py
saimn 6bcd7fc
move setuptools_scm config to pyproject.toml
saimn 54dc3a4
Move setup.cfg to pyproject.toml
saimn 1e305d5
bump setup-python version to avoid nodejs warnings
saimn 107f14f
implicit noexcept is deprecated in Cython 3.0
saimn b2b35f7
build with numpy≥2.0
saimn ce0be2a
remove NPY_NO_DEPRECATED_API warnings
saimn 4a28a20
update changelog
saimn 8f5f6f2
update cibuildwheel
saimn 25b2ee9
more macos wheels
saimn 0b875c0
make sure each test gets new unmodified test data
saimn 9e5619b
mark test_median_clean as xfail
saimn 96e4c55
remove obsolete _astropy_init
saimn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
|
||
from numpy import get_include | ||
from setuptools import Extension | ||
|
||
ROOT = os.path.relpath(os.path.dirname(__file__)) | ||
|
||
|
||
def get_extensions(): | ||
sources = [os.path.join(ROOT, "astroscrappy.pyx")] | ||
ext = Extension( | ||
name="astroscrappy.astroscrappy", | ||
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")], | ||
include_dirs=[get_include()], | ||
sources=sources, | ||
) | ||
return [ext] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,94 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=61.2", | ||
"setuptools_scm[toml]>=6.2", | ||
"extension-helpers==1.*", | ||
"numpy>=2.0.0rc1", | ||
"Cython>=3.0,<3.1", | ||
] | ||
build-backend = 'setuptools.build_meta' | ||
|
||
requires = ["setuptools", | ||
"setuptools_scm", | ||
"extension-helpers==1.*", | ||
"numpy>=1.25,<2", | ||
"Cython>=3.0,<3.1"] | ||
[project] | ||
name = "astroscrappy" | ||
readme = "README.rst" | ||
authors = [ | ||
{ name = "Curtis McCully", email = "[email protected]" }, | ||
] | ||
description = "Speedy Cosmic Ray Annihilation Package in Python" | ||
license = { text = "BSD-3-Clause" } | ||
# edit-on-github = "False" | ||
# github-project = "astropy/astroscrappy" | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"astropy", | ||
"numpy", | ||
] | ||
dynamic = [ "version" ] | ||
|
||
build-backend = 'setuptools.build_meta' | ||
[project.urls] | ||
Homepage = "https://github.com/astropy/astroscrappy" | ||
|
||
[project.optional-dependencies] | ||
docs = ["sphinx-astropy"] | ||
test = ["Cython", "pytest-astropy", "scipy"] | ||
|
||
[tool.setuptools] | ||
license-files = ["licenses/LICENSE.rst"] | ||
include-package-data = true | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["astroscrappy*"] | ||
|
||
[tool.setuptools.package-data] | ||
"*" = [ "data/*" ] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "astroscrappy/version.py" | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["astroscrappy", "docs"] | ||
astropy_header = true | ||
doctest_plus = "enabled" | ||
text_file_format = "rst" | ||
addopts = "-p no:warnings --doctest-rst" | ||
doctest_norecursedirs = ["*/setup_package.py"] | ||
filterwarnings = [ | ||
# action:message:category:module:lineno | ||
# "error", | ||
# "ignore:.*divide by zero encountered in double_scalars.*:RuntimeWarning:arviz", | ||
] | ||
|
||
[tool.coverage.run] | ||
source = ["astroscrappy"] | ||
plugins = [ "Cython.Coverage" ] | ||
omit = [ | ||
"astroscrappy/conftest.py", | ||
"astroscrappy/*setup_package*", | ||
"astroscrappy/tests/*", | ||
"astroscrappy/*/tests/*", | ||
"astroscrappy/version*", | ||
"*/astroscrappy/conftest.py", | ||
"*/astroscrappy/*setup_package*", | ||
"*/astroscrappy/tests/*", | ||
"*/astroscrappy/*/tests/*", | ||
"*/astroscrappy/version*", | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"pragma: no cover", | ||
"except ImportError", | ||
"raise AssertionError", | ||
"raise NotImplementedError", | ||
"def main\\(.*\\):", | ||
"pragma: py{ignore_python_version}", | ||
"def _ipython_key_completions_", | ||
] | ||
|
||
[tool.cibuildwheel] | ||
# Skip pypy on mac due to numpy/accelerate issues | ||
skip = ["pp*", "*musllinux*"] | ||
build-verbosity = 1 | ||
environment = { PIP_PREFER_BINARY=1 } | ||
test-requires = "pytest scipy" | ||
test-command = "pytest --pyargs astroscrappy" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmccully - Not sure if we should have those flags by default, especially
-ffast-math
which is an option that people should use carefully (https://simonbyrne.github.io/notes/fastmath/)