Skip to content

Commit cc6be62

Browse files
authored
Merge branch 'main' into change-master-to-main
2 parents d18d10a + 9f8df2d commit cc6be62

23 files changed

+1574
-70
lines changed

.ci_scripts/display_linkcheck.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import argparse
2+
import json
3+
from collections import defaultdict
4+
from termcolor import colored
5+
6+
status_colors = dict(
7+
broken='red',
8+
redirected='yellow',
9+
working='green',
10+
ignored='white',
11+
unchecked='white',
12+
)
13+
14+
def create_parser():
15+
parser = argparse.ArgumentParser('display_linkcheck')
16+
parser.add_argument('linkcheck_json')
17+
return parser
18+
19+
20+
def main():
21+
parser = create_parser()
22+
args = parser.parse_args()
23+
buffer = defaultdict(list)
24+
with open(args.linkcheck_json) as fh:
25+
for line in fh:
26+
data = json.loads(line)
27+
buffer[data['status']].append(data)
28+
29+
for status, color in status_colors.items():
30+
if status not in buffer:
31+
continue
32+
for data in buffer[status]:
33+
34+
print_tokens = [
35+
colored(f'[{data["status"]}]', color),
36+
colored(data['uri'], 'magenta'),
37+
f'{data["filename"]}:{data["lineno"]}',
38+
]
39+
if data['info'] != '':
40+
print_tokens.append(f'({data["info"]})')
41+
42+
print(*print_tokens)
43+
44+
if __name__ == '__main__':
45+
main()

.ci_scripts/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dependencies:
1616
- python-dateutil
1717
- pip
1818
- python-rapidjson
19+
- termcolor
1920
# uncomment to restore search
2021
# - elm
2122
# - nodejs

.ci_scripts/update_docs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@ pushd src
3030
# -W --keep-going: list all warnings but fail build in case there are any
3131
# -n: check validity of all links
3232
make html SPHINXOPTS="-W --keep-going -n"
33-
make linkcheck
33+
linkcheck_failed=0
34+
make linkcheck > /dev/null || linkcheck_failed=1
35+
python ../.ci_scripts/display_linkcheck.py _build/linkcheck/output.json
36+
37+
if [[ "${GHREF}" != "refs/heads/main" ]]; then
38+
test "$linkcheck_failed" -eq 0
39+
fi
40+
3441
mv _build/html ../docs
3542
rm -rf _build
3643
popd

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
shell: bash -l {0}
3030
run: |
3131
source ./.ci_scripts/update_docs
32+
env:
33+
GHREF: ${{ github.ref }}
3234

3335
- name: deploy
3436
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ If you have questions or need help, please check out our documentation for a [li
3131
## conda-forge dev meetings
3232

3333
Our documentation contains a section with [minutes from previous dev meetings]([https://conda-forge.org/docs/minutes/00_intro.html]). These meetings occur every two weeks on Wednesday from 17:00-18:00 UTC.
34-
A link to the google calendar item can be found [here](https://calendar.google.com/event?action=TEMPLATE&tmeid=Z2lraDk2a205cGUxdDkxYmNybXQxMGIxMGtfMjAxOTA3MjRUMTcwMDAwWiBzY29wYXR6QG0&tmsrc=scopatz%40gmail.com&scp=ALL).
34+
A link to the google calendar item can be found [here](https://calendar.google.com/event?action=TEMPLATE&tmeid=bTk5ZzBoMDEzaW11cmZiNWJnNmNkbThocDRfMjAyMjA1MThUMTcwMDAwWiBlcmljQHZvbHRyb25kYXRhLmNvbQ&tmsrc=eric%40voltrondata.com&scp=ALL).
3535

36-
We use https://hackmd.io/ for taking meeting minutes and will upload the resultant markdown file after the meeting has concluded.
36+
We use https://hackmd.io/ for taking meeting minutes and will (eventually) upload the resultant markdown file after the meeting has concluded.
3737

3838
There is a template provided in [`misc/DEV_MEETING_TEMPLATE.md`](https://github.com/conda-forge/conda-forge.github.io/tree/main/misc/DEV_MEETING_TEMPLATE.md) that you should use to create a new hackmd document.

css/theme.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ a:focus {
288288
}
289289

290290
.content-section {
291-
padding-top: 100px;
291+
padding-top: 60px;
292292
}
293293

294294
.intro {
@@ -309,7 +309,6 @@ a:focus {
309309
.contribute-section {
310310
width: 100%;
311311
padding: 60px 0;
312-
padding-top: 120px;
313312
color: #fff;
314313
background-color: #cd5c5c;
315314
-webkit-background-size: cover;
@@ -320,7 +319,7 @@ a:focus {
320319

321320
@media (min-width: 767px) {
322321
.content-section {
323-
padding-top: 200px;
322+
padding-top: 60px;
324323
}
325324
}
326325

@@ -414,5 +413,10 @@ body {
414413

415414
.responsive {
416415
max-width: 100%;
417-
height: auto;
416+
}
417+
418+
/* https://stackoverflow.com/a/25517025 */
419+
.vcenter {
420+
display: flex;
421+
align-items: center;
418422
}

index.html.tmpl

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99
<meta name="description" content="">
1010
<meta name="author" content="">
11-
11+
1212
<link rel="shortcut icon" href="img/favicon.ico">
1313

1414
<title>conda-forge | community driven packaging for conda</title>
@@ -113,6 +113,8 @@
113113
<section id="about" class="container content-section">
114114
<div class="row">
115115
<div class="col-lg-8 col-lg-offset-2 padded">
116+
<br/>
117+
<br/>
116118
<h2 class="text-center">About conda-forge</h2>
117119
<p>
118120
<a href="https://github.com/conda-forge">conda-forge</a> is a GitHub organization containing repositories of conda recipes.
@@ -121,6 +123,28 @@
121123
each repository, also known as a feedstock, automatically
122124
builds its own recipe in a clean and repeatable way on Windows, Linux and OSX.
123125
</p>
126+
</div>
127+
</div>
128+
129+
<div class="row vcenter" style="display: none;" id="stats1">
130+
<div class="col-md-4 col-md-offset-2 padded">
131+
<p class="text-center" id="stats-downloads"></p>
132+
</div>
133+
<div class="col-md-4 padded">
134+
<p class="text-center" id="stats-members"></p>
135+
</div>
136+
</div>
137+
<div class="row vcenter" style="display: none;" id="stats2">
138+
<div class="col-md-4 col-md-offset-2 padded">
139+
<p class="text-center" id="stats-data"></p>
140+
</div>
141+
<div class="col-md-4 padded">
142+
<p class="text-center" id="stats-issues-prs"></p>
143+
</div>
144+
</div>
145+
146+
<div class="row">
147+
<div class="col-lg-8 col-lg-offset-2 padded">
124148
<p>
125149
The built distributions are uploaded to <a href="http://anaconda.org/conda-forge">anaconda.org/conda-forge</a>
126150
and can be <a href="http://conda.pydata.org/docs/intro.html">installed with conda</a>. For example, to install a
@@ -168,16 +192,18 @@
168192
or watching the following episode of
169193
<a href="https://www.quansight.com/open-source-directions">Open Source Directions</a>.
170194
</p>
171-
<p align="center">
172-
<iframe width="560" class="responsive" src="https://www.youtube.com/embed/EWh-BtdYE7M" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
173-
</p>
195+
<div align="center">
196+
<iframe width="560" height="315" class="responsive" src="https://www.youtube.com/embed/EWh-BtdYE7M" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
197+
</div>
174198
</div>
175199
</div>
176200
</section>
177201
<section class="content-section">
178202
<div id="contribute" class="contribute-section">
179203
<div class="container">
180204
<div class="col-lg-8 col-lg-offset-2">
205+
<br/>
206+
<br/>
181207
<h2 class="text-center">Contributing to conda-forge</h2>
182208
<div class="text">
183209
<p>
@@ -261,6 +287,9 @@
261287
The build and upload processes take place in the feedstock, and once complete the package will be available on the conda-forge channel.</li>
262288
</ul>
263289
</p>
290+
<p>
291+
Please consider joining our <a href="https://gitter.im/conda-forge/conda-forge.github.io">Gitter</a> channel if you want to ask something, need help, or just want to chat with our maintainers. We would love to see you there!
292+
</p>
264293
</div>
265294
</div>
266295
</div>
@@ -288,6 +317,8 @@
288317
<section id="partners" class="container content-section" style="padding-bottom: 100px">
289318
<div class="row">
290319
<div class="col-lg-8 col-lg-offset-2">
320+
<br/>
321+
<br/>
291322
<a class="page-scroll" style="border:none; outline:none; text-decoration:none; color:inherit;" href="#partners">
292323
<h1 class="text-center">Institutional Partners</h1>
293324
</a>
@@ -394,6 +425,9 @@
394425
<!-- Custom Theme JavaScript -->
395426
<script src="js/theme.js"></script>
396427

428+
<!-- stats -->
429+
<script src="js/stats.js"></script>
430+
397431
</body>
398432

399433
</html>

js/stats.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
function loadStatsJSON (url, callback) {
2+
var xobj = new XMLHttpRequest()
3+
xobj.overrideMimeType('application/json')
4+
xobj.open('GET', url, true)
5+
xobj.onreadystatechange = function () {
6+
if (xobj.readyState === 4 && xobj.status === 200) {
7+
// Required use of an anonymous callback as .open will NOT return a value
8+
// but simply returns undefined in asynchronous mode
9+
callback(xobj.responseText)
10+
}
11+
}
12+
xobj.send(null)
13+
}
14+
15+
function displayStatsJSON (reportText) {
16+
var stats = JSON.parse(reportText)
17+
18+
var div = document.getElementById('stats-downloads')
19+
var mlns = stats.downloads.month / 1e6
20+
var blns = stats.downloads.all / 1e9
21+
div.innerHTML = (
22+
mlns.toFixed(0) + ' million monthly downloads<br>' +
23+
blns.toFixed(1) + ' billion all-time downloads'
24+
)
25+
26+
div = document.getElementById('stats-members')
27+
div.innerHTML = (
28+
stats.n_members_core + ' core devs<br>' +
29+
stats.n_members_staged_recipes + ' staged-recipes maintainers<br>' +
30+
(stats.n_members / 1e3).toFixed(1) + 'k feedstock maintainers'
31+
)
32+
33+
div = document.getElementById('stats-data')
34+
div.innerHTML = (
35+
(stats.n_repos / 1e3).toFixed(1) + 'k feedstocks<br>' +
36+
(stats.n_packages / 1e3).toFixed(1) + 'k packages<br>' +
37+
(stats.n_artifacts / 1e3).toFixed(0) + 'k artifacts'
38+
)
39+
40+
div = document.getElementById('stats-issues-prs')
41+
div.innerHTML = (
42+
((stats.n_prs + stats.n_issues) / 1e3).toFixed(1) + 'k issues+PRs<br>' +
43+
((stats.n_open_prs + stats.n_open_issues) / 1e3).toFixed(1) + 'k/' +
44+
((stats.n_closed_prs + stats.n_closed_issues) / 1e3).toFixed(1) + 'k open/closed'
45+
)
46+
47+
div = document.getElementById('stats1')
48+
div.style.display = ''
49+
div = document.getElementById('stats2')
50+
div.style.display = ''
51+
}
52+
53+
var url = 'https://raw.githubusercontent.com/conda-forge/by-the-numbers/main/data/live_counts.json'
54+
loadStatsJSON(url, displayStatsJSON)

src/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
todo_include_todos = True
113113

114114
# ---- Options for link validation --------
115+
user_agent = 'Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0'
115116

116117
anchor_check_fps = [
117118
r'https://conda-forge.org/status/#armosxaddition$',

0 commit comments

Comments
 (0)