Skip to content

Commit c80f063

Browse files
authored
Small nits for better description on Pypi. (#231)
1 parent 43dc931 commit c80f063

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ want to be integrated.
1515
- `docker_images/example/requirements.txt`
1616
- `docker_images/example/app/main.py`
1717
- `docker_images/example/app/pipelines/{task_name}.py`
18+
1819
to implement the desired functionality. All required code is marked with `IMPLEMENT_THIS` markup.
1920
3. Remove:
2021
- Any pipeline files in `docker_images/example/app/pipelines/` that are not used.
2122
- Any tests associated with deleted pipelines in `docker_images/example/tests`.
2223
- Any imports of the pipelines you deleted from `docker_images/example/app/pipelines/__init__.py`
24+
2325
4. Feel free to customize anything required by your lib everywhere you want. The only real requirements, are to honor the HTTP endpoints, in the same fashion as the `common` folder for all your supported tasks.
2426
5. Edit `example/tests/test_api.py` to add TESTABLE_MODELS.
2527
6. Pass the test suite `pytest -sv --rootdir docker_images/example/ docker_images/example/`
@@ -58,7 +60,6 @@ Edit the `tests/test_dockers.py` file to add a new test with your new framework
5860
in it (`def test_{framework}(self):` for instance). As a basic you should have 1 line per task in this test function with a real working model on the hub. Those tests are relatively slow but will check automatically that correct errors are replied by your API and that the cache works properly. To run those tests your can simply do:
5961

6062
```bash
61-
6263
RUN_DOCKER_TESTS=1 pytest -sv tests/test_dockers.py::DockerImageTests::test_{framework}
6364
```
6465

@@ -68,17 +69,16 @@ If you ever come across a bug within `api-inference-community/` package or want
6869
the development process is slightly more involved.
6970

7071
- First, make sure you need to change this package, each framework is very autonomous
71-
so if your code can get away by being standalone go that way first as it's much simpler.
72+
so if your code can get away by being standalone go that way first as it's much simpler.
7273
- If you can make the change only in `api-inference-community` without depending on it
73-
that's also a great option. Make sure to add the proper tests to your PR.
74+
that's also a great option. Make sure to add the proper tests to your PR.
7475
- Finally, the best way to go is to develop locally using `manage.py` command:
7576
- Do the necessary modifications within `api-inference-community` first.
7677
- Install it locally in your environment with `pip install -e .`
7778
- Install your package dependencies locally.
7879
- Run your webserver locally: `./manage.py start --framework example --task audio-source-separation --model-id MY_MODEL`
7980
- When everything is working, you will need to split your PR in two, 1 for the `api-inference-community` part.
80-
The second one will be for your package specific modifications and will only land once the `api-inference-community`
81-
tag has landed.
81+
The second one will be for your package specific modifications and will only land once the `api-inference-community` tag has landed.
8282
- This workflow is still work in progress, don't hesitate to ask questions to maintainers.
8383

8484
Another similar command `./manage.py docker --framework example --task audio-source-separation --model-id MY_MODEL`

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
name="api_inference_community",
66
version="0.0.28",
77
description="A package with helper tools to build an API Inference docker app for Hugging Face API inference using huggingface_hub",
8+
long_description=open("README.md", "r", encoding="utf-8").read(),
9+
long_description_content_type="text/markdown",
810
url="http://github.com/huggingface/api-inference-community",
911
author="Nicolas Patry",
1012
author_email="[email protected]",

0 commit comments

Comments
 (0)