Skip to content

Commit

Permalink
test fixes for numpy v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Aug 15, 2024
1 parent fc5bfb9 commit 8986e0d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 24 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ 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
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
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 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
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(object):
"""
# 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 8986e0d

Please sign in to comment.