Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit e0c9963

Browse files
authored
docs: community examples (#341)
* docs: community examples section; guidelines doc * docs(guidelines): one example per repo
1 parent 06810b9 commit e0c9963

File tree

2 files changed

+80
-1
lines changed

2 files changed

+80
-1
lines changed

Diff for: README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ To learn more about how to use Jina, please refer to [our docs](http://www.jina.
8282
</tr>
8383
</table>
8484

85-
## 🕊️ Advanced Examples
85+
## 🚀 Advanced Examples
8686

8787
<table>
8888
<tr>
@@ -123,6 +123,22 @@ To learn more about how to use Jina, please refer to [our docs](http://www.jina.
123123
</tr>
124124
</table>
125125

126+
## Community Examples
127+
128+
Want to add your own example? Please check our [guidelines](example-guidelines.md)!
129+
130+
<table>
131+
<tr>
132+
<td>
133+
<h1>📄</h1>
134+
</td>
135+
<td>
136+
<h4><a href="https://github.com/alexcg1/jina-wikipedia-sentences">Simple Wikipedia Sentence Search</a></h4>
137+
Simple Jina app to search sentences from Wikipedia using Transformers
138+
</td>
139+
</tr>
140+
</table>
141+
126142
## Adding Tests for Examples
127143

128144
You are highly encouraged to add a test for your example so that we will be alerted if it breaks in the future:

Diff for: example-guidelines.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Submit Your Community Example!
2+
3+
Thanks for your interest in submitting your example! Here are some rules and guidelines:
4+
5+
## Rules
6+
7+
### `jina` in `requirements.txt`
8+
9+
To be eligible for listing, you **must** have `jina==x.x.x` in your `requirements.txt`, where `x.x.x` refers to the semantic version number.
10+
11+
Note: If you're building a front-end that just interfaces with Jina's API and doesn't rely on Jina core itself, there's no need to follow this requirement.
12+
13+
### `jina-` at start of name
14+
15+
Your repo name should be `jina-xxxxxxx`.
16+
17+
### Clear README
18+
19+
- Explain what your example does and how to run it
20+
21+
### Use scripts to get external resources
22+
23+
- **For datasets:** Use a script named `get_data.sh`
24+
- **For models**: If you use an externally-hosted model, call your script `get_model.sh` or similar
25+
- **For other assets:** Follow the `get_xxx.sh` pattern
26+
27+
### `.gitignore` and `.dockerignore`
28+
29+
Have a `.gitignore` file and list any directories that should be ignored. The same goes for `.dockerignore` if you have `Dockerfile`:
30+
31+
- `data` directory
32+
- `workspace` directory
33+
- virtual environment directories
34+
- directories that store assets retrieved by [scripts](#use-scripts-to-get-external-resources)
35+
36+
### License
37+
38+
You **must** use an open-source license, specified in `LICENSE` in the root of your repo
39+
40+
## Guidelines
41+
42+
We're more easy-going on these
43+
44+
### One Example Per Repo
45+
46+
To make code more maintainable and easier for end users, please include one example per repo.
47+
48+
### Tests
49+
50+
Please include tests to ensure your app or Pod works correctly.
51+
52+
### File Structure
53+
54+
- Please follow the file structure as created by `jina hub new --type app`
55+
- Store data in `data` and externally-downloaded models in `models`
56+
57+
### Dockerfile
58+
59+
We highly encourage you to add a `Dockerfile`.
60+
61+
### Docker image
62+
63+
For self-contained apps, we would love to host a Docker image on [Jina Hub](https://github.com/jina-ai/jina-hub)

0 commit comments

Comments
 (0)