Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions 01-make_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import github3
import networkx as nx
import requests
import yaml
from jinja2 import UndefinedError, Template

Expand Down Expand Up @@ -74,10 +75,14 @@ def source_location(meta_yaml):
try:
for i, name in enumerate(total_names):
print(i, name)
feedstock = gh.repository('conda-forge', name + '-feedstock')
meta_yaml = feedstock.contents('recipe/meta.yaml')
r = requests.get('https://api.github.com/repos/conda-forge/'
'{}-feedstock/contents/recipe/meta.yaml'.format(name),
auth=(os.environ['USERNAME'], os.environ['PASSWORD']))
if r.status_code != 200:
raise github3.GitHubError(r)
meta_yaml = r.json()['content']
if meta_yaml:
text = codecs.decode(b64decode(meta_yaml.content))
text = codecs.decode(b64decode(meta_yaml))
a = parsed_meta_yaml(text)
if not a:
with open('bad.txt', 'a') as f:
Expand Down
1 change: 1 addition & 0 deletions requirements/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ doctr
rever
xonsh
conda-smithy
requests