Skip to content

Commit

Permalink
Merge pull request #13 from bmorris3/test-fixes
Browse files Browse the repository at this point in the history
Test fixes for numpy v2.0
  • Loading branch information
bmorris3 authored Aug 15, 2024
2 parents cc503a5 + f475abc commit 9dff445
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 30 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,24 @@ jobs:
python: 3.x
toxenv: codestyle

- name: Python 3.9 with minimal dependencies, no remote data
- name: Python 3.11 with minimal dependencies, no remote data
os: ubuntu-latest
python: 3.9
toxenv: py39-test
python: 3.11
toxenv: py311-test
toxposargs: --remote-data=none

- name: Python 3.9 with minimal dependencies, with remote data
- name: Python 3.11 with minimal dependencies, with remote data
os: ubuntu-latest
python: 3.9
toxenv: py39-test
python: 3.11
toxenv: py311-test
toxposargs: --remote-data=any

- name: Python 3.9 with latest dev dependencies, with remote data
- name: Python 3.11 with latest dev dependencies, with remote data
os: ubuntu-latest
python: 3.9
toxenv: py39-test-devdeps
python: 3.11
toxenv: py311-test-devdeps
toxposargs: --remote-data=any

- name: Test building of Sphinx docs
os: ubuntu-latest
python: 3.x
toxenv: build_docs

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
14 changes: 6 additions & 8 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
version: 2

build:
image: latest
sphinx:
configuration: docs/conf.py

conda:
environment: environment.yml
build:
os: ubuntu-22.04
tools:
python: "3.11"

python:
version: 3.8
install:
- method: pip
path: .
extra_requirements:
- docs
- all

formats: []
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'https://docs.python.org/': None,
'python': ('https://docs.python.org/', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'astropy': ('https://docs.astropy.org/en/stable/', None),
}
Expand Down
5 changes: 5 additions & 0 deletions docs/tynt/filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ the 2MASS J filter in the first row below, you would call the following in ``tyn
<th>OmegaCAM</th>
<td>B_aux_filter, B_qB_filter, B_qA_filter, B_qD_filter, B_filter, B_aux, B_qB, B_qA, B_qD, B, B_qC_filter, B_qC, V_qC, V_qB, V, V_qC_filter, V_qB_filter, V_qA, V_qD, V_filter, V_qA_filter, V_qD_filter, V_aux, V_aux_filter, v_strom_filter, v_strom, v_strom_aux_filter, v_strom_aux</td>
</tr>
<tr>
<th>Roman</th>
<th>WFI</th>
<td>F062, F087, F106, F129, Prism, Grism, F146, F158, F184, F213</td>
</tr>
<tr>
<th>SLOAN</th>
<th>SDSS</th>
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[build-system]

requires = ["setuptools",
"setuptools_scm",
"wheel"]
"setuptools_scm"]

build-backend = 'setuptools.build_meta'
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ long_description = file: README.rst
zip_safe = False
packages = find:
include_package_data = True
python_requires = >=3.8
python_requires = >=3.10
setup_requires = setuptools_scm
install_requires =
numpy
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{37,38,39}-test{,-alldeps,-devdeps}
py{311,312}-test{,-alldeps,-devdeps}
build_docs
codestyle
isolated_build = true
Expand Down
4 changes: 2 additions & 2 deletions tynt/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def reconstruct(self, identifier, model=False):
ifft = np.fft.ifft(fft, n=len(wavelength))

transmittance = ((ifft.real - ifft.real.min()) * tr_max /
ifft.real.ptp())
np.ptp(ifft.real))

if model:
m = (np.sum([models.Sine1D(amplitude=fft[i].real / N,
Expand All @@ -148,7 +148,7 @@ def fft_model(x):
"""
mo = m((x - wavelength.min()) /
(wavelength[1] - wavelength[0]))
return (mo - mo.min()) * tr_max / mo.ptp()
return (mo - mo.min()) * tr_max / np.ptp(mo)

astropy_model = fft_model()

Expand Down
Binary file modified tynt/data/fft.fits.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion tynt/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DownloadManager:
"""
# default facilities included in download:
include_facilities = ['2MASS', 'SLOAN', 'Kepler', 'TESS', 'HST', 'JWST',
'LSST', 'Keck', 'WISE', 'WFIRST', 'Spitzer', 'GAIA',
'LSST', 'Keck', 'WISE', 'WFIRST', 'Roman', 'Spitzer', 'GAIA',
'CHEOPS']

# default photometric systems included in download:
Expand Down

0 comments on commit 9dff445

Please sign in to comment.