Skip to content
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

Python 3.13 support #394

Merged
merged 4 commits into from
Sep 5, 2024
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ jobs:

- name: Test with dev dependencies
os: ubuntu-latest
python: '3.12'
toxenv: py312-test-devdeps
python: '3.13-dev'
toxenv: py313-test-devdeps

- name: Test with old dependencies
os: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: 'cp39-* cp310-* cp311-* cp312-*'
CIBW_BUILD: 'cp310-* cp311-* cp312-* cp313-*'
CIBW_SKIP: '*-musllinux_*'
CIBW_ARCHS_LINUX: 'x86_64'
CIBW_ARCHS_WINDOWS: 'AMD64'
Expand Down
23 changes: 7 additions & 16 deletions docs/synphot/filter_par.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,8 @@ By default, 10 FFT parameters are returned as complex numbers::
<Quantity 0.66748047 Angstrom>
>>> tr_max # Peak value of throughput # doctest: +FLOAT_CMP
<Quantity 0.241445>
>>> fft_pars # FFT parameters # doctest: +FLOAT_CMP
[(407.5180314841658+7.494005416219807e-16j),
(-78.52240189503877-376.53990235136575j),
(-294.86589196496584+127.25464850352665j),
(130.20273803287864+190.84263652863257j),
(96.62299079012317-91.70087676328245j),
(-32.572468348727654-34.227696019221035j),
(-8.051741476066471-21.354793540998294j),
(-51.708676896903725+6.883836090870033j),
(13.08719675518801+54.48177212720124j),
(38.635087381362396-13.02803811279449j)]
>>> fft_pars # FFT parameters # doctest: +ELLIPSIS
[(407.51803...), (-78.52240...), ...]

It is up to you to decide how to store this data, though storing it in a
table format is recommended. In fact, if you have many filters to parameterize,
Expand All @@ -66,13 +57,13 @@ will store the results in a table for you::
>>> from synphot.filter_parameterization import filters_to_fft_table
>>> mapping = {'HST/ACS/HRC/F555W': (bp, None)}
>>> filter_pars_table = filters_to_fft_table(mapping)
>>> filter_pars_table # doctest: +FLOAT_CMP +ELLIPSIS
>>> filter_pars_table # doctest: +ELLIPSIS
<Table length=1>
filter n_lambda ... fft_9
filter n_lambda ...
...
str17 int... ... complex128
----------------- -------- ... ---------------------------------------
HST/ACS/HRC/F555W 10000 ... (38.635087381362396-13.02803811279449j)
str17 int... ...
----------------- -------- ...
HST/ACS/HRC/F555W 10000 ... (38.635...-13.028...j)
>>> filter_pars_table.write('my_filter_pars.fits') # doctest: +SKIP

.. _filter_fft_construction:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=30.3.0",
"setuptools_scm",
"numpy>=2.0.0rc1"]
"numpy>=2.0.0"]
build-backend = "setuptools.build_meta"
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tool:pytest]
minversion = 6
minversion = 7
testpaths = "synphot" "docs"
norecursedirs = build docs/_build synphot/src
astropy_header = true
doctest_plus = enabled
doctest_subpackage_requires =
docs/synphot/filter_par.rst = numpy<2
docs/synphot/filter_par.rst = numpy>=2
text_file_format = rst
addopts = --doctest-rst --import-mode=append
xfail_strict = true
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{310,311,312}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-cov}
py{310,311,312,313}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-cov}
codestyle
twine
bandit
Expand Down