Skip to content

Commit efa7f2c

Browse files
authored
Merge branch 'main' into how-to-versions
2 parents 18fc1b0 + ea392f8 commit efa7f2c

File tree

3 files changed

+100
-41
lines changed

3 files changed

+100
-41
lines changed

docs/_sidebar_diataxis.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
},
6666
"items": [
6767
{
68-
"type": "link",
68+
"type": "doc",
6969
"label": "Rerender a feedstock",
70-
"href": "/docs/maintainer/updating_pkgs/#rerendering-feedstocks"
70+
"id": "how-to/basics/rerender"
7171
},
7272
{
7373
"type": "doc",

docs/how-to/basics/rerender.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
tags: [how-to, basic]
3+
---
4+
5+
# How to rerender a feedstock
6+
7+
Rerendering is the process of regenerating the templated contents of your feedstock, according to the contents of `conda-forge.yml` and the recipe itself.
8+
9+
<!-- PENDING: Read more about it in [Rerendering a feedstock](#TODO). -->
10+
11+
:::tip When to rerender
12+
13+
We need to re-render when there are changes in the following parts of the feedstock:
14+
15+
- Platform configuration (`skip` sections).
16+
- `yum_requirements.txt` or `conda-forge.yml`.
17+
- Updates in the build matrix due to new versions of Python, NumPy, PERL, R, etc.
18+
- Updates in conda-forge pinning that affect the feedstock.
19+
- Build issues that a feedstock configuration update will fix (follow us on [Zulip](https://conda-forge.zulipchat.com/) to know about those).
20+
21+
:::
22+
23+
There are two ways of rerendering a feedstock:
24+
25+
- Via bot commands on the feedstock issue tracker
26+
- Using `conda-smithy` locally
27+
28+
## With bot commands
29+
30+
Simply open a new issue in the feedstock titled `@conda-forge-admin, please rerender`. The description can be left empty. A new PR will be opened after a few seconds, and will receive a new commit with the rerendered changes within minutes.
31+
32+
## With `conda-smithy`
33+
34+
Behind the bot command, our automation ran `conda-smithy rerender` on your feedstock and published the changes. You can also do this locally.
35+
36+
### 1. Prepare the forked feedstock
37+
38+
If you haven't already, fork the feedstock to your personal account. Then clone the fork to disk and [create a fresh branch out of your synced `main`](fork-sync.md):
39+
40+
```
41+
cd name-feedstock
42+
git checkout main
43+
git pull upstream main
44+
git checkout -b rerender
45+
```
46+
47+
Depending on your `conda-forge.yml` configuration, from now on you will need to run different steps:
48+
49+
- Option A: With `conda_install_tool: pixi`, you only need to install Pixi and run `pixi run rerender`.
50+
- Option B: With other `conda_install_tool` settings you need to install `conda-smithy` on your own.
51+
52+
### 2a. Rerender with `conda_install_tool: pixi`
53+
54+
1. Download and install `pixi` (check [their documentation](https://pixi.sh/latest/installation/)).
55+
2. Go to the cloned repository and run `pixi run rerender`.
56+
57+
### 2b. Rerender with other `conda_install_tool` settings
58+
59+
Create a new environment with `conda-smithy`:
60+
61+
```bash
62+
conda create -n conda-smithy -c conda-forge conda-smithy shellcheck
63+
```
64+
65+
Activate it and run `conda-smithy` from the cloned repository directory:
66+
67+
```bash
68+
conda activate conda-smithy
69+
cd name-feedstock
70+
conda-smithy rerender
71+
```
72+
73+
### 3. Commit and push the results to a new pull request
74+
75+
Once the rerender is done, `conda-smithy` will have added the rerender changes to the staging area of your repository and prepared a commit message for you. Use it to commit the changes and push the branch to your fork:
76+
77+
```
78+
git commit -m "<copied message>"
79+
git push -u origin rerender
80+
```
81+
82+
The git remote will suggest you to open a PR with the new changes. Follow that link and fill in the PR template.
83+
84+
### Troubleshooting
85+
86+
#### New conda-smithy version available
87+
88+
Please update your local conda-smithy version:
89+
90+
- `conda update -n conda-smithy conda-smithy`
91+
- `pixi run --force-reinstall rerender`
92+
93+
If you are intentionally using an older version, then pass `--no-check-uptodate` to `conda-smithy:
94+
95+
```
96+
conda-smithy rerender --no-check-uptodate
97+
```

docs/maintainer/updating_pkgs.md

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -138,45 +138,7 @@ Please follow the following guidelines while updating recipes:
138138

139139
## Rerendering feedstocks
140140

141-
Rerendering is conda-forge's way to update the files common to all feedstocks (e.g. README, [CI](../glossary.md#ci) configuration, pinned dependencies).
142-
143-
Rerendering can be done in two ways:
144-
145-
> 1. Using the webservice to run conda-smithy on the cloud by adding the comment `@conda-forge-admin, please rerender` (See [Admin web services](infrastructure.md#admin-web-services)).
146-
> 2. Run conda-smithy locally on your machine (See [Rerendering with conda-smithy locally](#dev-rerender-local)).
147-
148-
<a id="dev-rerender-local"></a>
149-
150-
<a id="rerendering-with-conda-smithy-locally"></a>
151-
152-
### Rerendering with conda-smithy locally
153-
154-
The first step is to install `conda-smithy` in your root environment.
155-
156-
```shell-session
157-
conda install -c conda-forge conda-smithy
158-
```
159-
160-
Commit all changes and from the root directory of the feedstock, type:
161-
162-
```shell-session
163-
conda smithy rerender -c auto
164-
```
165-
166-
Optionally one can commit the changes manually.
167-
To do this drop `-c auto` from the command.
168-
169-
<a id="when-to-rerender"></a>
170-
171-
### When to rerender
172-
173-
We need to re-render when there are changes in the following parts of the feedstock:
174-
175-
- Platform configuration (`skip` sections).
176-
- `yum_requirements.txt` or `conda-forge.yml`.
177-
- Updates in the build matrix due to new versions of Python, NumPy, PERL, R, etc.
178-
- Updates in conda-forge pinning that affect the feedstock.
179-
- Build issues that a feedstock configuration update will fix (follow us on [Zulip](https://conda-forge.zulipchat.com/) to know about those).
141+
See [How to rerender a feedstock](/docs/how-to/basics/rerender.md).
180142

181143
<a id="updating-for-newly-released-python-version"></a>
182144

0 commit comments

Comments
 (0)