Skip to content

Instantly share code, notes, and snippets.

View Cadair's full-sized avatar

Stuart Mumford Cadair

View GitHub Profile
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.
from functools import singledispatch
import pydot
import astropy.units as u
from astropy.modeling import models as m, Model, CompoundModel
from astropy.modeling.tabular import _Tabular
from astropy.modeling.mappings import Mapping
// Input is data object which is hook body
// Output is result variable of form
// {
// "version": "v2" // The version of the schema being returned from the function. This is always "v2".
// "empty": true|false, // Should the webhook be ignored and no output returned. The default is false (plain must be provided).
// "plain": "Some text", // The plaintext value to be used for the Matrix message.
// "html": "<b>Some</b> text", // The HTML value to be used for the Matrix message. If not provided, plain will be interpreted as markdown.
// "msgtype": "some.type", // The message type, such as m.notice or m.text, to be used for the Matrix message. If not provided, m.notice will be used.
// }
import os
os.environ["QT_QPA_PLATFORM"] = "wayland"
from tqdm import tqdm
from pathlib import Path
from itertools import groupby
import numpy as np
import sunpy.map
from sunpy.coordinates import Helioprojective
from pathlib import Path
import matplotlib.pyplot as plt
import astropy.units as u
import dkist
from dkist.net import transfer_complete_datasets
plt.ion()