Skip to content

Commit

Permalink
remove remnants of relic
Browse files Browse the repository at this point in the history
fix rtd; fis np 2 warnings

import sphinx_rtd_theme

docs
  • Loading branch information
nden committed Dec 5, 2023
1 parent 6dd2992 commit dab43d6
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.11
- name: Install tox
run: |
python -m pip install --upgrade pip
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
include RELIC-INFO
exclude stwcs/version.py
2 changes: 1 addition & 1 deletion doc/rtd_requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ dependencies:
- astropy
- pip
- graphviz

- sphinx_rtd_theme>1.2.0
1 change: 1 addition & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import importlib
# Check Sphinx version
import sphinx
import sphinx_rtd_theme


# If extensions (or modules to document with autodoc) are in another directory,
Expand Down
7 changes: 6 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ github_project = spacetelescope/stwcs

[tool:pytest]
minversion = 3.9
norecursedirs = build docs/_build relic
norecursedirs = build docs/_build
filterwarnings=
ignore:.*Card is too long*
ignore:.*Some non-standard WCS keywords*
Expand All @@ -22,6 +22,11 @@ filterwarnings=
builder = html
warning-is-error = 1
[docs]
docs =
sphinx
sphinx-rtd-theme
[flake8]
# E402, E501, E722 should be added back to the selection list
# once they are made to pass.
Expand Down
8 changes: 7 additions & 1 deletion stwcs/tests/test_updatewcs.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import shutil
import os
import warnings

from astropy import wcs
from astropy.io import fits
from astropy.wcs import FITSFixedWarning
from .. import updatewcs
from ..updatewcs import apply_corrections
from ..distortion import utils as dutils
Expand All @@ -11,8 +13,9 @@
from numpy import testing
import pytest


from . import data


data_path = os.path.split(os.path.abspath(data.__file__))[0]

os.environ['ASTROMETRY_STEP_CONTROL'] = 'Off'
Expand Down Expand Up @@ -464,6 +467,9 @@ def test_update_stis_asn():
shutil.copyfile(stis_asn_orig_file, fname)
shutil.copyfile(idc_orig_file, idctab)

warnings.simplefilter("ignore", category=FITSFixedWarning)#,
# message=" 'datfix' made the change 'Set MJD-OBS to 50853.000000 from DATE-OBS'.")

expnames = updatewcs.updatewcs(fname)

assert expnames[0] == os.path.basename(fname_expname1)
Expand Down
4 changes: 2 additions & 2 deletions stwcs/updatewcs/corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ def updateWCS(cls, ext_wcs, ref_wcs):
if n >= m and n >= 2:
idcval = np.array([[cx[n, m]], [cy[n, m]]])
sipval = np.dot(imatr, idcval)
akeys1[m, n - m] = sipval[0]
bkeys1[m, n - m] = sipval[1]
akeys1[m, n - m] = sipval[0].item()
bkeys1[m, n - m] = sipval[1].item()
Akey = "A_%d_%d" % (m, n - m)
Bkey = "B_%d_%d" % (m, n - m)
kw2update[Akey] = sipval[0, 0] * ext_wcs.binned, sip_comment
Expand Down

0 comments on commit dab43d6

Please sign in to comment.