Skip to content

Commit cba8d77

Browse files
authored
Merge branch 'main' into patch-19
2 parents 4895aa4 + 69c4ec0 commit cba8d77

File tree

138 files changed

+7031
-469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+7031
-469
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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ channels:
44
dependencies:
55
- python=3
66
- conda-smithy
7-
- sphinx<3
7+
- sphinx >=4.4
88
- cloud_sptheme
99
- sphinxcontrib-fulltoc
1010
- make
1111
- xonsh
12-
- recommonmark
12+
- myst-parser
1313
- pyyaml
1414
- jinja2
1515
- requests
1616
- python-dateutil
1717
- pip
1818
- python-rapidjson
19+
- termcolor
1920
# uncomment to restore search
2021
# - elm
2122
# - nodejs
23+
# - pip:
24+
# - sphinxcontrib-newsfeed # this helps when using vscode locally

.ci_scripts/generate_html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
data = {k: data[k] for k in keys}
1717

1818
for k in data:
19-
if "Logo URL" in data[k]:
19+
if "Logo URL" in data[k] and data[k]["Logo URL"][0].startswith("http"):
2020
for i in range(5):
2121
try:
2222
# extra header is needed for lab49

.ci_scripts/update_docs

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
set -ex
44

5+
# configure bot account
6+
git config --global user.email "[email protected]"
7+
git config --global user.name "conda-forge-admin"
8+
59
git checkout -b new_site_content
6-
conda env create -f ./.ci_scripts/environment.yml
7-
conda activate conda-forge-docs
810

911
pushd newsfeed
1012
pip install --no-deps .
@@ -24,27 +26,20 @@ rm -rf docs/
2426
python .ci_scripts/generate_cfep_index.py
2527

2628
pushd src
27-
make html
29+
30+
# -W --keep-going: list all warnings but fail build in case there are any
31+
# -n: check validity of all links
32+
make html SPHINXOPTS="-W --keep-going -n"
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+
2841
mv _build/html ../docs
2942
rm -rf _build
3043
popd
3144

3245
mv docs-README docs/README
33-
34-
# git diff
35-
36-
# # Only commit the docs for commits on master.
37-
# if [[ $GH_REF == refs/heads/master ]] && [[ $GH_TOKEN != "" ]]; then
38-
# git add -A :/
39-
# git commit -m "Re-ran make.py. [ci skip]" || true
40-
# git remote add pushable https://${GH_TOKEN}@github.com/conda-forge/conda-forge.github.io.git/ > /dev/null
41-
#
42-
# # Update the remotes before pushing and check the status.
43-
# # This should give us more info if the push will not be
44-
# # a simple fast-forward push.
45-
# git fetch --all 2> /dev/null
46-
# git branch -u pushable/gh-pages
47-
# git status
48-
# git push pushable new_site_content:gh-pages
49-
# # 2> /dev/null
50-
# fi

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Conda-forge gitter chat
4+
url: https://gitter.im/conda-forge/conda-forge.github.io
5+
about: Chat to us about conda-forge and ask general questions.
6+
- name: Conda-forge documentation
7+
url: https://conda-forge.org/docs/
8+
about: The complete conda-forge documentation.
9+
- name: Conda-forge packages
10+
url: https://conda-forge.org/feedstock-outputs/
11+
about: For when you have an issue with a specific package.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Correct existing content
2+
description: Suggest a correction of the conda-forge docs.
3+
labels:
4+
- Docs
5+
- bug
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for improving the conda-forge docs!
11+
12+
Please check to make sure someone hasn't already opened a similar [issue](https://github.com/conda-forge/conda-forge.github.io/issues) and then fill out the form below.
13+
14+
If you would like to add something to the docs, please open an issue with a suggestion instead or directly make a PR.
15+
_Note:_ As we're all volunteers, we cannot promise to include your change immediately and encourage you therefore to create a [PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests) instead. Don't worry about the completeness of it, we are happy to help with any questions you might have!
16+
17+
- type: input
18+
attributes:
19+
label: Where should the content be changed?
20+
description: Please provide a link to the page where the incorrect content appears.
21+
validations:
22+
required: false
23+
24+
- type: textarea
25+
attributes:
26+
label: What should be changed?
27+
description: |
28+
Please insert the content to be changed and what should be changed.
29+
This can be just a couple of bullet points or the text to be included.
30+
31+
_Note:_ If you already have a pretty good idea of what the change should look like, you can also open a [PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests) and change the content yourself.
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
attributes:
37+
label: Additional information
38+
description: Add any more info or links that explain what you want to change.
39+
validations:
40+
required: false
41+
42+
- type: checkboxes
43+
attributes:
44+
label: Incorrect or outdated
45+
description: Is the content incorrect or outdated?
46+
options:
47+
- label: Incorrect
48+
- label: Outdated
49+
validations:
50+
required: true
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Improve existing content
2+
description: Make a suggestion about the conda-forge docs.
3+
labels:
4+
- Docs
5+
- enhancement
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for improving the conda-forge docs!
11+
12+
Please check to make sure someone hasn't already opened a similar [issue](https://github.com/conda-forge/conda-forge.github.io/issues) and then fill out the form below.
13+
14+
If you believe that something is incorrect in the docs, please open an issue with a fix instead or directly make a PR.
15+
_Note:_ As we're all volunteers, we cannot promise to include your change immediately and encourage you therefore to create a [PR](https://github.com/conda-forge/conda-forge.github.io/pulls) instead. Don't worry about the completeness of it, we are happy to help with any questions you might have!
16+
17+
- type: input
18+
attributes:
19+
label: Where should the content be added?
20+
description: In case the content fits onto an already exisiting page, please provide its name or link to it here.
21+
validations:
22+
required: false
23+
24+
- type: textarea
25+
attributes:
26+
label: What should be added?
27+
description: |
28+
Please insert the content to be added.
29+
30+
This can be just a couple of bullet points or the text to be included.
31+
32+
_Note:_ If you already have a pretty good idea of what the addtion should look like, you can also open a [PR](https://github.com/conda-forge/conda-forge.github.io/pulls) and add the content yourself.
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
attributes:
38+
label: Additional information
39+
description: Add any more info or links that explain what you want to add.
40+
validations:
41+
required: false
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Report an issue
2+
description: Report an issue you are experiencing.
3+
labels: bug
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for reporting your issue.
9+
Please fill out the sections below.
10+
- type: checkboxes
11+
id: cf-documentation
12+
attributes:
13+
label: Conda-forge documentation
14+
description: Please confirm that you read [the conda-forge documentation](https://conda-forge.org/docs/user/introduction.html#how-can-i-install-packages-from-conda-forge) and could not find a solution for your problem there.
15+
options:
16+
- label: I could not solve my problem using the conda-forge documentation.
17+
required: true
18+
- type: textarea
19+
id: installed
20+
attributes:
21+
label: Installed packages
22+
description: |
23+
Please share your installed packages by running `conda list` and entering the output below:
24+
_Note:_ This will be automatically formatted as code.
25+
placeholder: "conda list"
26+
render: shell
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: Info
31+
attributes:
32+
label: Environment info
33+
description: |
34+
Please share your environment by running `conda info` and entering the output below:
35+
_Note:_ This will be automatically formatted as code.
36+
placeholder: "conda info"
37+
render: shell
38+
validations:
39+
required: true
40+
- type: textarea
41+
id: Issue
42+
attributes:
43+
label: Issue
44+
description: |
45+
Please descripe the issue you are experiencing:
46+
validations:
47+
required: true
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Ask a general question
2+
description: Ask a general question about conda-forge.
3+
labels: question
4+
body:
5+
- type: textarea
6+
id: comment
7+
attributes:
8+
label: "Your question:"

.github/workflows/deploy.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ name: deploy
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request: null
8+
workflow_dispatch: null
89

910
jobs:
1011
tests:
@@ -15,33 +16,28 @@ jobs:
1516

1617
- uses: conda-incubator/setup-miniconda@v2
1718
with:
18-
python-version: 3.7
19-
channels: conda-forge,defaults
19+
python-version: 3.8
20+
channels: conda-forge
2021
channel-priority: strict
2122
show-channel-urls: true
22-
23-
- name: configure conda
24-
shell: bash -l {0}
25-
run: |
26-
# configure bot account
27-
git config --global user.name "Travis-CI on github.com/conda-forge/conda-forge.github.io"
28-
git config --global user.email [email protected]
29-
30-
# configure conda
31-
conda config --set show_channel_urls true
32-
conda config --set auto_update_conda false
23+
miniforge-version: latest
24+
miniforge-variant: Mambaforge
25+
activate-environment: conda-forge-docs
26+
environment-file: .ci_scripts/environment.yml
3327

3428
- name: build
3529
shell: bash -l {0}
3630
run: |
3731
source ./.ci_scripts/update_docs
32+
env:
33+
GHREF: ${{ github.ref }}
3834

3935
- name: deploy
40-
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
36+
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
4137
uses: peaceiris/actions-gh-pages@v3
4238
with:
4339
github_token: ${{ secrets.GITHUB_TOKEN }}
4440
publish_branch: gh-pages
4541
publish_dir: .
46-
user_name: conda-forge-coordinator
47-
user_email: conda.forge.coordinator@gmail.com
42+
user_name: conda-forge-admin
43+
user_email: pelson.pub+conda-[email protected]

0 commit comments

Comments
 (0)