From 91ad6ef3e659494682e8f900bdb0657d47fe4914 Mon Sep 17 00:00:00 2001 From: Curtis McCully Date: Wed, 16 Oct 2024 13:46:45 -0400 Subject: [PATCH 1/2] Added the ability to read fits files that are pre downloaded and are already in memory --- CHANGES.md | 4 ++++ banzai/utils/fits_utils.py | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 80089386..5db7f232 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +1.19.0 (2024-10-16) +------------------- +- Added the ability to read fits files that are pre downloaded and are already in memory + 1.18.3 (2024-10-04) ------------------- - Update exception handling for photometric calibrator to handle general base exceptions from the requests library diff --git a/banzai/utils/fits_utils.py b/banzai/utils/fits_utils.py index c6d57d77..7e64e510 100755 --- a/banzai/utils/fits_utils.py +++ b/banzai/utils/fits_utils.py @@ -142,7 +142,11 @@ def basename_search_in_archive(filename, dateobs, context, is_raw_frame=False): def open_fits_file(file_info, context, is_raw_frame=False): - if file_info.get('path') is not None and os.path.exists(file_info.get('path')): + if file_info.get('data_buffer') is not None: + filename = file_info.get('filename') + frame_id = None + buffer = file_info.get('data_buffer') + elif file_info.get('path') is not None and os.path.exists(file_info.get('path')): buffer = open(file_info.get('path'), 'rb') filename = os.path.basename(file_info.get('path')) frame_id = None From d3b03adcbe396f3588a0b943c6ad4d16d07bea4d Mon Sep 17 00:00:00 2001 From: Curtis McCully Date: Wed, 16 Oct 2024 13:49:03 -0400 Subject: [PATCH 2/2] Removed python=3.8 from github actions. --- .github/workflows/unit-tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 02bce075..5d96d175 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -18,11 +18,6 @@ jobs: python-version: 3.9 toxenv: build_docs - - name: Python 3.8 with minimal dependencies - os: ubuntu-latest - python-version: '3.8' - toxenv: py38-test - - name: Python 3.9 with minimal dependencies os: ubuntu-latest python-version: '3.9' @@ -33,6 +28,11 @@ jobs: python-version: '3.10' toxenv: py310-test + - name: Python 3.11 with minimal dependencies + os: ubuntu-latest + python-version: '3.11' + toxenv: py311-test + - name: Code style checks os: ubuntu-latest python-version: 3.9