Skip to content

Instantly share code, notes, and snippets.

View Cadair's full-sized avatar

Stuart Mumford Cadair

View GitHub Profile
@Cadair
Cadair / get_asdf_globus.py
Created March 24, 2026 18:05
A quick hack to transfer only ASDF files with globus.
from pathlib import Path
import dkist.net
from dkist.net.globus import start_transfer_from_file_list, get_data_center_endpoint_id
from dkist.net.globus.endpoints import get_local_endpoint_id
from sunpy.net import Fido, attrs as a
res = Fido.search(a.dkist.Dataset("AKIYGG"))["dkist"]
start_transfer_from_file_list(
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import urllib.request
from pathlib import Path
import nox
BUILD_DIR = Path("./.build")
def clone_or_pull(session, *, target_dir, url, ref):

2024 - Quarter 1:

Recommend drop support for:
asdf 2.11.0 released Mar 2022
asdf-astropy 0.2.0 released Mar 2022
h5netcdf 0.13.0 to 1.0.0 released Jan 2022 and Mar 2022
pandas 1.4.0 released Jan 2022

gantt dateFormat YYYY-MM-DD axisFormat %m / %Y title Support Window

section python 3.10 : 2021-10-04,2024-10-03 3.11 : 2022-10-24,2025-10-23 3.12 : 2023-10-02,2026-10-01

import tarfile
from pathlib import Path
import numpy as np
from sunpy.net import Fido, attrs as a
import dkist
import dkist.net
@Cadair
Cadair / tox.ini
Created March 8, 2024 10:15
A quick tox example
[tox]
min_version = 4.0
envlist =
py{310,311,312}{,-parallel}
[testenv]
commands =
!parallel: pytest -vvv -r fEs --pyargs sunpy {toxinidir}/docs
parallel: pytest -vvv -r fEs --pyargs sunpy {toxinidir}/docs -n auto
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.