Skip to content

Commit ad0f2f3

Browse files
Render properties that are not in anyOf (#2487)
* Render properties that are not in `anyOf` * Separate options with commas * get rid of some warnings * pre-commit * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * pin some refs to main * fix link --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a76f8ab commit ad0f2f3

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

blog/2024-04-02-xz-backdoor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To the best of our knowledge, conda-forge's artifacts for `xz` are _not_ affecte
1616

1717
We immediately checked which `xz` artifacts had been published in our channel:
1818

19-
- Our latest build for `xz` (recipe source available in the [`xz-feedstock`](https://github.com/conda-forge/xz-feedstock/blob/main/recipe/meta.yaml)) is for version `5.2.9` and was uploaded on 2022-12-08. See artifacts in [anaconda.org](https://anaconda.org/conda-forge/xz/files).
19+
- Our latest build for `xz` (recipe source available in the [`xz-feedstock`](https://github.com/conda-forge/xz-feedstock/blob/8b8001268eb4eb7f9dcab4166ba88926e5ed6e91/recipe/meta.yaml)) is for version `5.2.9` and was uploaded on 2022-12-08. See artifacts in [anaconda.org](https://anaconda.org/conda-forge/xz/files).
2020
- The backdoored versions of `xz` belong to the `5.6.x` series.
2121

2222
We are monitoring the situation develop and will update this announcement accordingly if needed.

docs/maintainer/knowledge_base.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,24 +1728,24 @@ add some information on r packages which make heavy use of `noarch: generic`
17281728

17291729
- Distributing a project (which share the same source code) in separate artifacts. For example:
17301730
- A compiled C++ library and its Python bindings:
1731-
- [mamba-feedstock](https://github.com/conda-forge/mamba-feedstock/blob/main/recipe/meta.yaml)
1731+
- [mamba-feedstock](https://github.com/conda-forge/mamba-feedstock/blob/e13e667edd0e9efb5091444c11307ddb2bd8fa5e/recipe/meta.yaml)
17321732
- A runtime library and its headers:
1733-
- [cpp-opentelemetry-sdk](https://github.com/conda-forge/cpp-opentelemetry-sdk-feedstock/blob/main/recipe/meta.yaml)
1733+
- [cpp-opentelemetry-sdk](https://github.com/conda-forge/cpp-opentelemetry-sdk-feedstock/blob/6c9f81074f0343f2fb41a4491e91b7b84e962cc1/recipe/meta.yaml)
17341734
- A dynamic library and a static version:
1735-
- [libarchive](https://github.com/conda-forge/libarchive-feedstock/blob/main/recipe/meta.yaml)
1735+
- [libarchive](https://github.com/conda-forge/libarchive-feedstock/blob/642a473daf5cfc84598ed7fde1016c243e359e3b/recipe/meta.yaml)
17361736
- Distributing the same project with different sets of dependencies. For example:
17371737
- The project with the minimal dependencies to run, and a separate output that extends that list:
1738-
- [geopandas-base and geopandas](https://github.com/conda-forge/geopandas-feedstock/blob/main/recipe/meta.yaml)
1739-
- [matplotlib-base and matplotlib](https://github.com/conda-forge/matplotlib-feedstock/blob/main/recipe/meta.yaml)
1738+
- [geopandas-base and geopandas](https://github.com/conda-forge/geopandas-feedstock/blob/d6a3efdf12408f1875f1aa0b7cc2393f877a73e8/recipe/meta.yaml)
1739+
- [matplotlib-base and matplotlib](https://github.com/conda-forge/matplotlib-feedstock/blob/dc89bb11d502475b7bb71d8600b2eeaff4c185bd/recipe/meta.yaml)
17401740
- CPU vs GPU versions of a package (this can also be done with package variants):
1741-
- [pytorch-cpu, pytorch-gpu and pytorch](https://github.com/conda-forge/pytorch-cpu-feedstock/blob/main/recipe/meta.yaml)
1741+
- [pytorch-cpu, pytorch-gpu and pytorch](https://github.com/conda-forge/pytorch-cpu-feedstock/blob/b629af608e13eb180dab698b1e44ac0991ab1135/recipe/meta.yaml)
17421742
- A package with different strictness levels for its dependencies:
1743-
- [opencv](https://github.com/conda-forge/opencv-feedstock/blob/main/recipe/meta.yaml)
1743+
- [opencv](https://github.com/conda-forge/opencv-feedstock/blob/850a09ec4e4e1a34e2619c5b937bfdc8ffe8bbbd/recipe/meta.yaml)
17441744
- Distributing the same project under two different names (alias packags). For example:
17451745
- A package that changed names but wants to keep existing users up-to-date:
17461746
- A package that uses dashes and underscores and expects users to use either:
1747-
- [importlib_metadata and importlib-metadata](https://github.com/conda-forge/importlib_metadata-feedstock/blob/main/recipe/meta.yaml)
1748-
- [typing_extensions and typing-extensions](https://github.com/conda-forge/typing_extensions-feedstock/blob/main/recipe/meta.yaml)
1747+
- [importlib_metadata and importlib-metadata](https://github.com/conda-forge/importlib_metadata-feedstock/blob/e4595fd73bba559d248f97896aff89a762073f2a/recipe/meta.yaml)
1748+
- [typing_extensions and typing-extensions](https://github.com/conda-forge/typing_extensions-feedstock/blob/d9d0d1161d5ded886a272c0e4907f62d9272c7a8/recipe/meta.yaml)
17491749

17501750
### Common pitfalls with `outputs`
17511751

src/components/CondaForgeYmlSchema/index.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function SchemaToc({ schema }) {
6868
{Object.entries(schema.properties)
6969
.sort()
7070
.map(([key, value]) => (
71-
<li key={key}>
71+
<li key={`toc-${key}`}>
7272
<a href={`#${key.replaceAll("_", "-")}`} key={key}>
7373
{(value.deprecated && (
7474
<span style={{ textDecoration: "line-through" }}>{key}</span>
@@ -110,7 +110,7 @@ function Setting({ name, value, level = 1, withTypes = true, toc = null }) {
110110
)}
111111
{withTypes && <Type value={value} />}
112112
{value.examples && (
113-
<Details summary={Examples} closed>
113+
<Details summary={Examples} closed="true">
114114
<Markdown>{value.examples.join(", ")}</Markdown>
115115
</Details>
116116
)}
@@ -121,19 +121,18 @@ function Setting({ name, value, level = 1, withTypes = true, toc = null }) {
121121
function Type({ value }) {
122122
var types = [];
123123
var customTypes = { options: [] };
124-
value.anyOf?.map((v) => {
124+
var values = value.anyOf || [value];
125+
values.map((v) => {
125126
if (v.type) {
126127
if (v.type === "object") {
127128
types.push(<code>dict</code>);
128129
if (v.title) {
129130
customTypes.options.push(
130-
<Details key={v.title} summary={v.title} closed>
131+
<Details key={v.title} summary={v.title} closed="true">
131132
{Object.entries(v.properties)
132133
.sort()
133134
.map(([key, value]) => (
134-
<p>
135-
<Setting key={key} name={key} value={value} level={2} />
136-
</p>
135+
<Setting key={`${v.title}-${key}`} name={key} value={value} level={2} />
137136
))}
138137
</Details>
139138
);
@@ -189,10 +188,11 @@ function Type({ value }) {
189188
With{" "}
190189
{(key === "options" && <span>{key}</span>) || <code>{key}</code>}:{" "}
191190
</span>
192-
{value}
191+
{value.reduce((prev, curr) => [prev, ', ', curr])}
193192
</>
194193
) : null
195194
)}
195+
<p></p>
196196
</>
197197
);
198198
}

0 commit comments

Comments
 (0)