Skip to content

Instantly share code, notes, and snippets.

@gforsyth
Created March 10, 2020 17:54
Show Gist options
  • Save gforsyth/857b8a329eb053cdb91d301b70330b54 to your computer and use it in GitHub Desktop.
Save gforsyth/857b8a329eb053cdb91d301b70330b54 to your computer and use it in GitHub Desktop.
Conda Grid Search
import json
import tqdm
def run():
a = $(conda search sphinx --json)
VERSIONS = sorted(list(set([entry["version"] for entry in json.loads(a)['sphinx']])))[::-1]
for VERSION in tqdm.tqdm(VERSIONS):
print(f"HORRIBLY CHECKING {VERSION}")
conda create -n f"{VERSION}" python=3.7 sphinx=@(f"{VERSION}") -y --file requirements-docs.txt
conda activate @(f"{VERSION}")
make clean
make html
escapecount = int($(ack -Q "\*\*kwargs" | wc -l).strip())
rm -rf pf"~/miniconda/envs/{VERSION}"
if escapecount == 0:
break
print(VERSION)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment