Skip to content

Commit

Permalink
Merge pull request #32 from oirlab/update_jwst_0.17.0
Browse files Browse the repository at this point in the history
Update jwst 0.17.0 and CRDS 7.5.0.2
  • Loading branch information
zonca committed Sep 1, 2020
2 parents c427e9d + 6cb7f08 commit 9c2bc13
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 139 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ jobs:
env:
C_INCLUDE_PATH: /usr/include/cfitsio/
- name: Test
run: |
source setup_local_crds.sh && python setup.py test
run: |
source setup_local_crds.sh && pytest
- name: Build docs
if: ${{ matrix.python-version==3.6 }}
run: |
run: |
python -m pip install -r docs/requirements.txt && sphinx-multiversion docs html
- name: Install SSH Client 🔑
if: ${{ matrix.python-version==3.6 }}
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Deploy 🚀
if: ${{ matrix.python-version==3.6 && contains(github.ref, 'master') }}
if: ${{ matrix.python-version==3.6 && contains(github.ref, 'master') }}
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
130 changes: 0 additions & 130 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions iris_pipeline/pipeline/image2.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ def process(self, input):
self.log.info("Processing product {}".format(product["name"]))
if self.save_results:
self.output_file = product["name"]
try:
getattr(asn, 'filename')
except AttributeError:
asn.filename = "singleton"

result = self.process_exposure_product(
product, asn["asn_pool"], op.basename(asn.filename)
)
Expand Down
4 changes: 4 additions & 0 deletions iris_pipeline/pipeline/preprocess_flatfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def process(self, input):
self.log.info("Processing product {}".format(product["name"]))
if self.save_results:
self.output_file = product["name"]
try:
getattr(asn, 'filename')
except AttributeError:
asn.filename = "singleton"
result = self.process_exposure_product(
product, asn["asn_pool"], op.basename(asn.filename)
)
Expand Down
6 changes: 3 additions & 3 deletions iris_pipeline/tests/test_image2.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def test_image2_subarray(tmp_path):
input_model.meta.subarray.ysize = ysize
subarray_slice = np.s_[ystart:ystart+ysize, xstart:xstart+xsize]

input_model.data = input_model.data[subarray_slice]
input_model.dq = input_model.dq[subarray_slice]
input_model.err = input_model.err[subarray_slice]
input_model.data = np.array(input_model.data[subarray_slice])
input_model.dq = np.array(input_model.dq[subarray_slice])
input_model.err = np.array(input_model.err[subarray_slice])

raw_science_subarray_filename = tmp_path / "temp_subarray_science.fits"
input_model.write(raw_science_subarray_filename)
Expand Down
5 changes: 4 additions & 1 deletion iris_pipeline/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ def get_data_from_url(filename):
):
warnings.warn(f"Retrieve data for {filename} (if not cached already)")
local_path = data.get_pkg_data_filename(filename, show_progress=True)
return local_path
local_path_suffix = local_path + ".fits"
if not os.path.exists(local_path_suffix):
os.symlink(local_path, local_path_suffix)
return local_path_suffix
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ log_cli = 0
log_cli_level = INFO
log_cli_format = %(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)
log_cli_date_format=%Y-%m-%d %H:%M:%S
addopts = --nbval-lax --current-env
testpaths =
iris_pipeline/tests
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
astropy
git+https://github.com/oirlab/tmt-crds.git
https://github.com/spacetelescope/jwst/archive/0.13.7.zip
git+https://github.com/spacetelescope/jwst@0.17.0

0 comments on commit 9c2bc13

Please sign in to comment.