From 9bf2119b858300d2a71af047b206d40ffe8c136c Mon Sep 17 00:00:00 2001 From: teutoburg Date: Tue, 29 Apr 2025 12:16:26 +0200 Subject: [PATCH 1/5] Remove obsolete files --- irdb/public_html/index.html | 59 ---------------------------------- irdb/public_html/index.php | 27 ---------------- irdb/public_html/index.rst | 18 ----------- irdb/repairs/__init__.py | 0 irdb/repairs/repair_scripts.py | 33 ------------------- 5 files changed, 137 deletions(-) delete mode 100644 irdb/public_html/index.html delete mode 100644 irdb/public_html/index.php delete mode 100644 irdb/public_html/index.rst delete mode 100644 irdb/repairs/__init__.py delete mode 100644 irdb/repairs/repair_scripts.py diff --git a/irdb/public_html/index.html b/irdb/public_html/index.html deleted file mode 100644 index 9ccab4ba..00000000 --- a/irdb/public_html/index.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - -

- - -

- -
- -

-SimCADO is currently moving forward -

-

-i.e. we're undertaking a reasonably sized refactor of the code base -

- -

- -simcado.readthedocs.io
-

- - -The old documentation has been moved to readthedocs and is updated automatically when we push to GitHub -

- - -

-This interuption is temporary. -We intend to release the newest version around Christmas 2018.
-Thank you for your patience! -

- -

-Important information: -

-

- -

-WARNING: MORFEO PSFs are subject to strict conditions. Before you publish anything -with these PSFs, please contact either the SimCADO team or the MORFEO team directly -

- - - - - diff --git a/irdb/public_html/index.php b/irdb/public_html/index.php deleted file mode 100644 index 3a56eef8..00000000 --- a/irdb/public_html/index.php +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - EzPHP - - -
-

Welcome to your personal web server

-

- -

- -

-


-

- -

-

- - \ No newline at end of file diff --git a/irdb/public_html/index.rst b/irdb/public_html/index.rst deleted file mode 100644 index 97305335..00000000 --- a/irdb/public_html/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -ScopeSim is moving forward -========================== - -2022-07-01: Broken ScopeSim server FTP address ----------------------------------------------- - -.. warning:: July 2022: The downloadable content server was retired and the data migrated to a new server. - - vX.Y and above have been redirected to a new server URL. - Please either upgrade to the latest version (``pip install --upgrade ``), or follow these `instructions to update the server URL `_ in the config file. - - -Sunsetting SimCADO and SimMETIS ---------------------------------- -To all those still using SimCADO or SimMETIS, we thank you for continuing to use the original versions of our simulator software. -The upgrades to the server infrastructure at the University of Vienna now mean that the functions for updating internal data files will no longer work. -We will not be releasing an upgrade to SimCADO or SimMETIS as these packages have been replaced by the new multipurpose -[ScopeSim environment](https://scopesim.readthedocs.io/en/latest/) diff --git a/irdb/repairs/__init__.py b/irdb/repairs/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/irdb/repairs/repair_scripts.py b/irdb/repairs/repair_scripts.py deleted file mode 100644 index 186c2798..00000000 --- a/irdb/repairs/repair_scripts.py +++ /dev/null @@ -1,33 +0,0 @@ -import glob -from astropy.io import fits - - -def repair_fits_headers(filename): - with fits.open(filename, mode="update") as hdulist: - for hdu in hdulist: - - keys = ["CDELT1", "CDELT2", "CDELT1", "CDELT2", "PIXELSCL", "WAVE0"] - keys_inv = ["CD1_1", "CD2_2", "PIXELSCL", "PIXELSCL", "CDELT1", - "WAVELENG"] - for key, key_inv in zip(keys, keys_inv): - if key not in hdu.header and key_inv in hdu.header: - hdu.header[key] = hdu.header[key_inv] - - if isinstance(hdu, (fits.PrimaryHDU, fits.ImageHDU)) and \ - hdu.data is not None: - missing_keys = ["CRVAL1", "CRVAL2", "CTYPE1", "CTYPE2", - "CRPIX1", "CRPIX2", 'CUNIT1', 'CUNIT2'] - missing_vals = [0, 0, "RA---TAN", "DEC--TAN", - hdu.data.shape[0] / 2., hdu.data.shape[1] / 2., - "arcsec", "arcsec"] - - for key, val in zip(missing_keys, missing_vals): - if key not in hdu.header: - hdu.header[key] = val - - hdulist.flush() - - -psf_files = glob.glob("C:\Work\irdb\_PSFs\*.fits") -for fname in psf_files: - repair_fits_headers(fname) From b682c8f884ac7dc288631e4d8a1b65807e01845c Mon Sep 17 00:00:00 2001 From: teutoburg Date: Tue, 29 Apr 2025 12:13:31 +0200 Subject: [PATCH 2/5] Cleanup --- irdb/tests/test_package_contents.py | 3 ++- irdb/tests/test_utils.py | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/irdb/tests/test_package_contents.py b/irdb/tests/test_package_contents.py index 0ad71e1c..a36aafba 100644 --- a/irdb/tests/test_package_contents.py +++ b/irdb/tests/test_package_contents.py @@ -1,5 +1,6 @@ -#!/usr/bin/env python3 # -*- coding: utf-8 -*- +"""Runs the badge reports tests.""" + import logging from pathlib import Path diff --git a/irdb/tests/test_utils.py b/irdb/tests/test_utils.py index 3057a735..dd2b9062 100644 --- a/irdb/tests/test_utils.py +++ b/irdb/tests/test_utils.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Tests for irdb.utils @@ -19,20 +18,16 @@ def fixture_packages(): class TestGetPackages: - @pytest.mark.usefixtures("packages") def test_includes_various_packages(self, packages): wanted = {"Armazones", "ELT", "METIS", "MICADO", "test_package"} assert all(pkg_name in packages.keys() for pkg_name in wanted) - @pytest.mark.usefixtures("packages") def test_doesnt_includes_specials(self, packages): wanted = {"irdb", "docs", "_REPORTS", ".github"} assert all(pkg_name not in packages.keys() for pkg_name in wanted) - @pytest.mark.usefixtures("packages") def test_values_are_path_objects(self, packages): assert isinstance(packages["test_package"], Path) - @pytest.mark.usefixtures("packages") def test_only_includes_dirs(self, packages): assert all(path.is_dir() for path in packages.values()) From 0140a849aee6f4b2214c11685459f3ed58e1376c Mon Sep 17 00:00:00 2001 From: teutoburg Date: Tue, 29 Apr 2025 11:47:34 +0200 Subject: [PATCH 3/5] DataContainer now supports Path objects --- irdb/tests/test_package_contents.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/irdb/tests/test_package_contents.py b/irdb/tests/test_package_contents.py index a36aafba..15be3700 100644 --- a/irdb/tests/test_package_contents.py +++ b/irdb/tests/test_package_contents.py @@ -175,8 +175,7 @@ def test_all_dat_files_readable(self, package, pkg_dir, badges, caplog): for fn_dat in fns_dat: fn_loc = fn_dat.relative_to(pkg_dir) try: - # FIXME: DataContainer should be updated to support Path objects... - _ = DataContainer(str(fn_dat)) + _ = DataContainer(fn_dat) except InconsistentTableError as err: logging.error("%s InconsistentTableError %s", str(fn_loc), err) bad_files.append(str(fn_loc)) From 97606c8d74e14fc98d0bb82cb44b913965547dcb Mon Sep 17 00:00:00 2001 From: teutoburg Date: Tue, 29 Apr 2025 11:44:12 +0200 Subject: [PATCH 4/5] Delete this outdated, unused and undocumented version file --- irdb/version.py | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 irdb/version.py diff --git a/irdb/version.py b/irdb/version.py deleted file mode 100644 index 25bacde1..00000000 --- a/irdb/version.py +++ /dev/null @@ -1,11 +0,0 @@ -version = '0.2.0' -date = '2022-04-09 13:00:00 GMT' -yaml_descriptions = """ -- version : 0.2.0 - date : 2022-04-09 - comment : Random updates - changes : - - (KL) re-wrote the publish workflow to include dates and versioning of - packages - -""" From 8923e764d516bfeb9954ab35995f2f38515f24de Mon Sep 17 00:00:00 2001 From: teutoburg Date: Tue, 29 Apr 2025 11:35:25 +0200 Subject: [PATCH 5/5] This should be solved by now --- irdb/tests/test_package_contents.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/irdb/tests/test_package_contents.py b/irdb/tests/test_package_contents.py index 15be3700..baa3e28c 100644 --- a/irdb/tests/test_package_contents.py +++ b/irdb/tests/test_package_contents.py @@ -14,13 +14,6 @@ from irdb.badges import BadgeReport from irdb.fileversions import IRDBFile -# HACK: This is necessary because scopesim has import side effects that mess up -# logging here, specifically capture. Once that's solved, the following -# lines should be removed! -from importlib import reload -logging.shutdown() -reload(logging) - # Note: This module doesn't need to run always, so mark it. pytestmark = pytest.mark.badges