Skip to content

Commit 4a263ba

Browse files
authored
Merge pull request #2193 from jaimergp/search-github
Add mini tutorial for Github searches
2 parents b7a35bd + ab3814e commit 4a263ba

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/maintainer/knowledge_base.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,36 @@ 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+
:::tip Configure your browser to have a search shortcut
29+
30+
For example, in Chrome you can go to [`chrome://settings/searchEngines`](chrome://settings/searchEngines) and add a new entry with:
31+
32+
- Name: conda-forge recipes
33+
- Shortcut: `cf`
34+
- URL: `https://github.com/search?type=code&q=org%3Aconda-forge+%s`
35+
36+
And with that you can simply type `cf your-search-here` for super fast queries!
37+
:::
38+
939
<a id="using-cmake"></a>
1040

1141
## Using CMake

0 commit comments

Comments
 (0)