[doc] README.md: fix the local curl test command
Browse files
README.md
CHANGED
@@ -35,13 +35,11 @@ Run the container (keep it on background) and show logs
|
|
35 |
docker run -d --name samgis-huggingface -p 7860:7860 example-docker-namespace/samgis-huggingface; docker logs -f samgis-huggingface
|
36 |
```
|
37 |
|
38 |
-
Test it with curl:
|
39 |
|
40 |
```bash
|
41 |
-
|
42 |
-
|
43 |
-
-H 'accept: application/json' \
|
44 |
-
-d '{}'
|
45 |
```
|
46 |
|
47 |
or better visiting the swagger page on http://localhost:7860/docs
|
@@ -69,7 +67,7 @@ Run the container (keep it on background) and show logs
|
|
69 |
docker run -d --name lambda-fastsam-api -p 8080:8080 lambda-fastsam-api; docker logs -f lambda-fastsam-api
|
70 |
```
|
71 |
|
72 |
-
Test it with curl:
|
73 |
|
74 |
```bash
|
75 |
URL=http://localhost:8080/2015-03-31/functions/function/invocations
|
@@ -94,13 +92,13 @@ python -m pytest --cov=samgis --cov-report=term-missing && coverage html
|
|
94 |
|
95 |
### How to update the static documentation with sphinx
|
96 |
|
97 |
-
|
98 |
extension, document a whole package in the style of other automatic API documentation tools. See the
|
99 |
[documentation page](https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html) for details.
|
100 |
Run the command from the project root:
|
101 |
|
102 |
```bash
|
103 |
-
# missing docs folder (run from project root)
|
104 |
cd docs && sphinx-quickstart -p SamGIS -r 1.0.0 -l python --master index
|
105 |
|
106 |
# update docs folder (from project root)
|
|
|
35 |
docker run -d --name samgis-huggingface -p 7860:7860 example-docker-namespace/samgis-huggingface; docker logs -f samgis-huggingface
|
36 |
```
|
37 |
|
38 |
+
Test it with curl using a json payload:
|
39 |
|
40 |
```bash
|
41 |
+
URL=http://localhost:7860/infer_samgis
|
42 |
+
curl -d@./events/payload_point_eolie.json -H 'accept: application/json' ${URL}
|
|
|
|
|
43 |
```
|
44 |
|
45 |
or better visiting the swagger page on http://localhost:7860/docs
|
|
|
67 |
docker run -d --name lambda-fastsam-api -p 8080:8080 lambda-fastsam-api; docker logs -f lambda-fastsam-api
|
68 |
```
|
69 |
|
70 |
+
Test it with curl using a json payload:
|
71 |
|
72 |
```bash
|
73 |
URL=http://localhost:8080/2015-03-31/functions/function/invocations
|
|
|
92 |
|
93 |
### How to update the static documentation with sphinx
|
94 |
|
95 |
+
This project documentation uses sphinx-apidoc: it's a tool for automatic generation of Sphinx sources that, using the autodoc
|
96 |
extension, document a whole package in the style of other automatic API documentation tools. See the
|
97 |
[documentation page](https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html) for details.
|
98 |
Run the command from the project root:
|
99 |
|
100 |
```bash
|
101 |
+
# missing docs folder (run from project root) initialize this way
|
102 |
cd docs && sphinx-quickstart -p SamGIS -r 1.0.0 -l python --master index
|
103 |
|
104 |
# update docs folder (from project root)
|