Skip to content

Commit c9b8c7f

Browse files
authored
[FMT] apply yml format pre commit hook (nilearn#3877)
* apply yml format hook * rm conda env file
1 parent 6e9d95a commit c9b8c7f

24 files changed

+992
-984
lines changed

.circleci/config.yml

Lines changed: 73 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# Documentation is built using Github Actions.
23
# CircleCI is only used to download the artifacts in order to host
34
# and deploy them.
@@ -7,84 +8,84 @@ version: 2.1
78
# Parameters required to trigger the execution
89
# of the "host_docs" job
910
parameters:
10-
GITHUB_RUN_URL:
11-
type: string
12-
default: "none"
11+
GITHUB_RUN_URL:
12+
type: string
13+
default: none
1314

1415
jobs:
15-
host_docs:
16-
machine:
17-
image: ubuntu-2004:202111-01
18-
environment:
19-
GITHUB_ARTIFACT_URL: << pipeline.parameters.GITHUB_RUN_URL >>/doc.zip
20-
steps:
21-
- checkout
22-
- run: bash build_tools/circle/download_documentation.sh
23-
- store_artifacts:
24-
path: doc/_build/html/
25-
destination: dev
16+
host_docs:
17+
machine:
18+
image: ubuntu-2004:202111-01
19+
environment:
20+
GITHUB_ARTIFACT_URL: << pipeline.parameters.GITHUB_RUN_URL >>/doc.zip
21+
steps:
22+
- checkout
23+
- run: bash build_tools/circle/download_documentation.sh
24+
- store_artifacts:
25+
path: doc/_build/html/
26+
destination: dev
2627
# Persists the generated documentation, so that it
2728
# can be attached and deployed in the "deploy" job
28-
- persist_to_workspace:
29-
root: doc/_build
30-
paths:
31-
- html
29+
- persist_to_workspace:
30+
root: doc/_build
31+
paths:
32+
- html
3233

33-
deploy:
34-
docker:
35-
- image: circleci/python:3.9
36-
steps:
37-
- add_ssh_keys:
38-
fingerprints:
39-
- "19:56:86:2d:c6:df:02:f2:87:0e:59:a1:eb:b7:65:77"
40-
- attach_workspace:
41-
at: /tmp/_build
42-
- run:
43-
name: Fetch docs
44-
command: |
45-
set -e
46-
mkdir -p ~/.ssh
47-
ssh-keyscan github.com >> ~/.ssh/known_hosts;
48-
if [ ! -d ~/nilearn.github.io ]; then
49-
git clone [email protected]:nilearn/nilearn.github.io.git ~/nilearn.github.io --depth=1
50-
fi
51-
- run:
52-
name: Deploy dev docs
53-
command: |
54-
set -e;
55-
if [ "${CIRCLE_BRANCH}" == "main" ]; then
56-
git config --global user.email "[email protected]";
57-
git config --global user.name "CircleCI";
58-
cd ~/nilearn.github.io;
59-
git checkout main
60-
git remote -v
61-
git fetch origin
62-
git reset --hard origin/main
63-
git clean -xdf
64-
echo "Deploying dev docs for ${CIRCLE_BRANCH}.";
65-
rm -Rf dev;
66-
cp -a /tmp/_build/html dev;
67-
git add -A;
68-
git commit -m "CircleCI update of dev docs (build: ${CIRCLE_BUILD_NUM}).";
69-
git push origin main;
70-
else
71-
echo "No deployment (build: ${CIRCLE_BRANCH}).";
72-
fi
34+
deploy:
35+
docker:
36+
- image: circleci/python:3.9
37+
steps:
38+
- add_ssh_keys:
39+
fingerprints:
40+
- 19:56:86:2d:c6:df:02:f2:87:0e:59:a1:eb:b7:65:77
41+
- attach_workspace:
42+
at: /tmp/_build
43+
- run:
44+
name: Fetch docs
45+
command: |
46+
set -e
47+
mkdir -p ~/.ssh
48+
ssh-keyscan github.com >> ~/.ssh/known_hosts;
49+
if [ ! -d ~/nilearn.github.io ]; then
50+
git clone [email protected]:nilearn/nilearn.github.io.git ~/nilearn.github.io --depth=1
51+
fi
52+
- run:
53+
name: Deploy dev docs
54+
command: |
55+
set -e;
56+
if [ "${CIRCLE_BRANCH}" == "main" ]; then
57+
git config --global user.email "[email protected]";
58+
git config --global user.name "CircleCI";
59+
cd ~/nilearn.github.io;
60+
git checkout main
61+
git remote -v
62+
git fetch origin
63+
git reset --hard origin/main
64+
git clean -xdf
65+
echo "Deploying dev docs for ${CIRCLE_BRANCH}.";
66+
rm -Rf dev;
67+
cp -a /tmp/_build/html dev;
68+
git add -A;
69+
git commit -m "CircleCI update of dev docs (build: ${CIRCLE_BUILD_NUM}).";
70+
git push origin main;
71+
else
72+
echo "No deployment (build: ${CIRCLE_BRANCH}).";
73+
fi
7374
7475
workflows:
75-
version: 2
76+
version: 2
7677

77-
host_and_deploy_doc:
78-
when:
79-
not:
80-
equal: [ "none", << pipeline.parameters.GITHUB_RUN_URL >> ]
78+
host_and_deploy_doc:
79+
when:
80+
not:
81+
equal: [none, << pipeline.parameters.GITHUB_RUN_URL >>]
8182
# The jobs should run only when triggered by the workflow
82-
jobs:
83-
- host_docs
84-
- deploy:
85-
requires:
86-
- host_docs
87-
filters:
88-
branches:
89-
only:
90-
- main
83+
jobs:
84+
- host_docs
85+
- deploy:
86+
requires:
87+
- host_docs
88+
filters:
89+
branches:
90+
only:
91+
- main

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 108 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
---
22
name: Bug report
33

44
# See the json schema to help you create / update this form
@@ -8,113 +8,113 @@ description: Fill in this template to report a bug
88

99
title: '[BUG] '
1010

11-
labels: ['Bug']
11+
labels: [Bug]
1212

1313
body:
1414

15-
- type: markdown
16-
attributes:
17-
value: "### Please fill in the following information to the best of your ability."
18-
19-
- type: checkboxes
20-
attributes:
21-
label: Is there an existing issue for this?
22-
description: |
23-
Please search the [issue tracker](https://github.com/nilearn/nilearn/issues?q=is%3Aissue) to see if an issue already exists for the bug you encountered.
24-
options:
25-
- label: I have searched the existing issues
26-
required: true
27-
28-
- type: checkboxes
29-
attributes:
30-
label: Operating system
31-
description: What operating system are you using?
32-
options:
33-
- label: Linux
34-
- label: Mac
35-
- label: Windows
36-
37-
- type: textarea
38-
attributes:
39-
label: Operating system version
40-
value: |
41-
For example one of the following:
42-
- Linux Ubuntu 22.04
43-
- Mac OS Version 12 "monterey"
44-
- Windows 11
45-
validations:
46-
required: false
47-
48-
- type: checkboxes
49-
attributes:
50-
label: Python version
51-
description: What python version are you using?
52-
options:
53-
- label: '3.11'
54-
- label: '3.10'
55-
- label: '3.9'
56-
- label: '3.8'
57-
- label: '3.7'
58-
59-
- type: textarea
60-
attributes:
61-
label: nilearn version
62-
description: |
63-
What version of Nilearn are you using?
64-
65-
You can check this by entering `python -c "import nilearn; print(nilearn.__version__)"` in the command line.
66-
67-
placeholder: |
68-
For example one of the following:
69-
- Dev version
70-
- x.y.z
71-
validations:
72-
required: true
73-
74-
- type: textarea
75-
attributes:
76-
label: Expected behavior
77-
placeholder: Describe what outcome you expected.
78-
validations:
79-
required: true
80-
81-
- type: textarea
82-
attributes:
83-
label: Current behavior & error messages
84-
description: |
85-
Describe what happened.
86-
87-
If possible paste below any eventual warning or error message with the stack trace.
88-
89-
If this is a plot related bug, make sure to include an image.
90-
You can attach images clicking this area to highlight it and then dragging files in.
91-
92-
value: |
93-
This is what I got:
94-
95-
96-
97-
```bash
98-
# Paste the error message here
99-
100-
101-
```
102-
validations:
103-
required: true
104-
105-
- type: textarea
106-
attributes:
107-
label: Steps and code to reproduce bug
108-
description: |
109-
Please ensure the code is a minimal runnable example using Nilearn data to showcase it.
110-
111-
https://stackoverflow.com/help/minimal-reproducible-example
112-
113-
value: |
114-
```python
115-
# Paste your code here
116-
117-
118-
```
119-
validations:
120-
required: false
15+
- type: markdown
16+
attributes:
17+
value: '### Please fill in the following information to the best of your ability.'
18+
19+
- type: checkboxes
20+
attributes:
21+
label: Is there an existing issue for this?
22+
description: |
23+
Please search the [issue tracker](https://github.com/nilearn/nilearn/issues?q=is%3Aissue) to see if an issue already exists for the bug you encountered.
24+
options:
25+
- label: I have searched the existing issues
26+
required: true
27+
28+
- type: checkboxes
29+
attributes:
30+
label: Operating system
31+
description: What operating system are you using?
32+
options:
33+
- label: Linux
34+
- label: Mac
35+
- label: Windows
36+
37+
- type: textarea
38+
attributes:
39+
label: Operating system version
40+
value: |
41+
For example one of the following:
42+
- Linux Ubuntu 22.04
43+
- Mac OS Version 12 "monterey"
44+
- Windows 11
45+
validations:
46+
required: false
47+
48+
- type: checkboxes
49+
attributes:
50+
label: Python version
51+
description: What python version are you using?
52+
options:
53+
- label: '3.11'
54+
- label: '3.10'
55+
- label: '3.9'
56+
- label: '3.8'
57+
- label: '3.7'
58+
59+
- type: textarea
60+
attributes:
61+
label: nilearn version
62+
description: |
63+
What version of Nilearn are you using?
64+
65+
You can check this by entering `python -c "import nilearn; print(nilearn.__version__)"` in the command line.
66+
67+
placeholder: |
68+
For example one of the following:
69+
- Dev version
70+
- x.y.z
71+
validations:
72+
required: true
73+
74+
- type: textarea
75+
attributes:
76+
label: Expected behavior
77+
placeholder: Describe what outcome you expected.
78+
validations:
79+
required: true
80+
81+
- type: textarea
82+
attributes:
83+
label: Current behavior & error messages
84+
description: |
85+
Describe what happened.
86+
87+
If possible paste below any eventual warning or error message with the stack trace.
88+
89+
If this is a plot related bug, make sure to include an image.
90+
You can attach images clicking this area to highlight it and then dragging files in.
91+
92+
value: |
93+
This is what I got:
94+
95+
96+
97+
```bash
98+
# Paste the error message here
99+
100+
101+
```
102+
validations:
103+
required: true
104+
105+
- type: textarea
106+
attributes:
107+
label: Steps and code to reproduce bug
108+
description: |
109+
Please ensure the code is a minimal runnable example using Nilearn data to showcase it.
110+
111+
https://stackoverflow.com/help/minimal-reproducible-example
112+
113+
value: |
114+
```python
115+
# Paste your code here
116+
117+
118+
```
119+
validations:
120+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
---
12
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
23
blank_issues_enabled: true
34
contact_links:
4-
- name: Usage question
5+
- name: Usage question
56
url: https://neurostars.org/tag/nilearn
67
about: Please ask question about using Nilearn here.

0 commit comments

Comments
 (0)