Skip to content

Commit 3177e60

Browse files
committed
Add mini tutorial for Github searches
1 parent e7f60a5 commit 3177e60

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/maintainer/knowledge_base.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,38 @@ title: 'Knowledge Base'
66

77
# Knowledge Base
88

9+
## Finding examples with Github Code Search {#search-github}
10+
11+
Github's [Code Search](https://github.com/features/code-search) is an incredibly useful tool to find examples of recipes in conda-forge.
12+
There are a couple tricks you can use to make the most out of your searches.
13+
14+
- Limit the search to `org:conda-forge`.
15+
- Limit the path to the type of file you want. This usually means:
16+
- `path:meta.yaml` for the main metadata file.
17+
- `path:recipe/*.sh` for Unix build scripts.
18+
- `path:recipe/*.bat` for Windows build scripts.
19+
20+
That's it, with those two modifiers, you can get a lot done! Some examples include:
21+
22+
- [All `noarch: python` recipes](https://github.com/search?type=code&q=org%3Aconda-forge+path%3Ameta.yaml+%22noarch%3A+python%22).
23+
- Recipes that depend on... [`cuda`](https://github.com/search?type=code&q=org%3Aconda-forge+path%3Ameta.yaml+%22-+cuda%22), [`pytorch`](https://github.com/search?type=code&q=org%3Aconda-forge+path%3Ameta.yaml+%22-+pytorch%22), [`__virtual` packages](https://github.com/search?type=code&q=org%3Aconda-forge+path%3Ameta.yaml+%2F-+__%5CS%2B%2F), etc.
24+
- [Scripts that use CMake on Unix](https://github.com/search?type=code&q=org%3Aconda-forge+cmake+path%3Arecipe%2F*.sh).
25+
- [Scripts that use CMake on Windows](https://github.com/search?type=code&q=org%3Aconda-forge+cmake+path%3Arecipe%2F*.bat).
26+
- [Recipes that use cross-compilation](https://github.com/search?type=code&q=org%3Aconda-forge+path%3Ameta.yaml+%22target_platform+%21%3D+build_platform%22+OR+%22build_platform+%21%3D+target_platform%22).
27+
28+
29+
:::tip Configure your browser to have a search shortcut
30+
31+
For example, in Chrome you can go to [`chrome://settings/searchEngines`](chrome://settings/searchEngines) and add a new entry with:
32+
33+
- Name: conda-forge recipes
34+
- Shortcut: `cf`
35+
- URL: `https://github.com/search?type=code&q=org%3Aconda-forge+%s`
36+
37+
And with that you can simply type `cf your-search-here` for super fast queries!
38+
:::
39+
40+
941
<a id="using-cmake"></a>
1042

1143
## Using CMake

0 commit comments

Comments
 (0)