diff --git a/.ruff.toml b/.ruff.toml index eb9a7fed..b2c5324d 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -77,6 +77,7 @@ extend-ignore = [ "E402", # Module imports not at top of file "A001", "BLE001", + "T201", ] "docs/*.py" = [ "INP001", # File is part of an implicit namespace package. @@ -109,6 +110,9 @@ extend-ignore = [ "dkist/utils/sysinfo.py" = [ "T20", ] +"dkist/net/globus/auth.py" = [ + "T201", +] [lint.flake8-import-conventions.extend-aliases] "astropy.units" = "u" diff --git a/dkist/dataset/utils.py b/dkist/dataset/utils.py index 20a7b6cd..bab3e338 100644 --- a/dkist/dataset/utils.py +++ b/dkist/dataset/utils.py @@ -164,6 +164,7 @@ def pp_matrix(wcs): ---------- wcs : `BaseHighLevelWCS` or `BaseLowLevelWCS` """ + print(_get_pp_matrix(wcs)) # noqa: T201 def extract_pc_matrix(headers, naxes=None): diff --git a/dkist/net/globus/auth.py b/dkist/net/globus/auth.py index 4838738a..52343621 100644 --- a/dkist/net/globus/auth.py +++ b/dkist/net/globus/auth.py @@ -142,6 +142,8 @@ def do_native_app_authentication(client_id, requested_scopes=None): # pragma: n url = client.oauth2_get_authorize_url() webbrowser.open(url, new=1) + print("Waiting for completion of Globus Authentication in your webbrowser...") + print(f"If your webbrowser has not opened, please go to {url} to authenticate with globus.") try: auth_code = server.wait_for_code() @@ -209,6 +211,7 @@ def do_reauth(*args, **kwargs): # older versions of the globus_sdk use raw_text, which is now deprecated response_text = getattr(e, "text", "") or getattr(e, "raw_text", "") if e.http_status == 400 and "invalid_grant" in response_text: + print("Globus login has expired.") get_refresh_token_authorizer(force_reauth=True) return func(*args, **kwargs) diff --git a/dkist/tests/generate_aia_dataset.py b/dkist/tests/generate_aia_dataset.py index fafb62ca..d85d0655 100644 --- a/dkist/tests/generate_aia_dataset.py +++ b/dkist/tests/generate_aia_dataset.py @@ -113,6 +113,7 @@ def main(): a.jsoc.Series("aia.lev1_euv_12s"), a.jsoc.Segment("image"), a.jsoc.Notify("stuart@cadair.com")) + print(results) files = Fido.fetch(results, path=str(path)) @@ -185,7 +186,9 @@ def main(): wcs = gwcs.wcs.WCS(forward_transform=hcubemodel, input_frame=detector_frame, output_frame=sky_frame) + print(repr(wcs)) + print(wcs(*[1*u.pix]*4, with_units=True)) ea = references_from_filenames(cube, relative_to=str(path)) @@ -198,10 +201,14 @@ def main(): # ff.write_to("test.asdf") filename = str(path / f"aia_{time_coords[0]}.asdf") ff.write_to(filename) + print(f"Saved to : {filename}") # import sys; sys.exit(0) ds = load_dataset(str(path)) + print(repr(ds)) + print(repr(ds.wcs)) + print(ds.wcs(*[1*u.pix]*4, with_units=True)) if __name__ == "__main__": diff --git a/dkist/tests/generate_eit_test_dataset.py b/dkist/tests/generate_eit_test_dataset.py index fa66b090..d88634a4 100644 --- a/dkist/tests/generate_eit_test_dataset.py +++ b/dkist/tests/generate_eit_test_dataset.py @@ -120,7 +120,9 @@ def main(): wcs = gwcs.wcs.WCS(forward_transform=hcubemodel, input_frame=detector_frame, output_frame=sky_frame) + print(repr(wcs)) + print(wcs(*[1*u.pix]*3, with_units=True)) hp = HeaderParser.from_headers(headers, filenames=files, validate=False) ac = references_from_filenames(hp, hdu_index=0, relative_to=str(rootdir / "EIT")) @@ -139,6 +141,7 @@ def main(): with asdf.AsdfFile(tree) as ff: filename = rootdir / "EIT" / "eit_test_dataset.asdf" ff.write_to(filename) + print(f"Saved to : {filename}") ds.plot() diff --git a/dkist/tests/generate_eit_tiled_dataset.py b/dkist/tests/generate_eit_tiled_dataset.py index d98c9668..40e3b083 100644 --- a/dkist/tests/generate_eit_tiled_dataset.py +++ b/dkist/tests/generate_eit_tiled_dataset.py @@ -24,3 +24,4 @@ def data(self): asdf_filename = rootdir / "test_tiled_dataset.asdf" ds = dataset_from_fits(tempdir, asdf_filename) + print(ds) diff --git a/docs/conf.py b/docs/conf.py index b5bdbc2e..f44973df 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,6 +20,10 @@ except Exception: missing_requirements.append(requirement.name) if missing_requirements: + print( + f"The {' '.join(missing_requirements)} package(s) could not be found and " + "is needed to build the documentation, please install the 'docs' requirements." + ) sys.exit(1) # -- Read the Docs Specific Configuration -------------------------------------- @@ -141,6 +145,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. + from dkist_sphinx_theme.conf.theme import * # Render inheritance diagrams in SVG