aletrn commited on
Commit
9dc65a8
·
1 Parent(s): 9c09a5a

[feat] add markdown support in sphinx

Browse files
Pipfile CHANGED
@@ -6,6 +6,7 @@ name = "pypi"
6
  [packages]
7
  sphinx = "*"
8
  sphinx-autodoc-typehints = "*"
 
9
 
10
  [dev-packages]
11
  aws-lambda-powertools = "*"
 
6
  [packages]
7
  sphinx = "*"
8
  sphinx-autodoc-typehints = "*"
9
+ myst-parser = "*"
10
 
11
  [dev-packages]
12
  aws-lambda-powertools = "*"
Pipfile.lock CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "_meta": {
3
  "hash": {
4
- "sha256": "da8029829365c4111f447148812acd7091a0c004edc3d4b80c6e7ac8b3d5987b"
5
  },
6
  "pipfile-spec": 6,
7
  "requires": {
@@ -169,6 +169,14 @@
169
  "markers": "python_version >= '3.7'",
170
  "version": "==3.1.2"
171
  },
 
 
 
 
 
 
 
 
172
  "markupsafe": {
173
  "hashes": [
174
  "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e",
@@ -235,6 +243,31 @@
235
  "markers": "python_version >= '3.7'",
236
  "version": "==2.1.3"
237
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  "packaging": {
239
  "hashes": [
240
  "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5",
@@ -251,6 +284,62 @@
251
  "markers": "python_version >= '3.7'",
252
  "version": "==2.17.2"
253
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  "requests": {
255
  "hashes": [
256
  "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f",
@@ -368,12 +457,12 @@
368
  },
369
  "aws-lambda-powertools": {
370
  "hashes": [
371
- "sha256:500c6d74716549c769b5294562c0aa31faeb879bb25f7eae9e0b57242c0b5544",
372
- "sha256:e3839e077b0f16abba495f4008d041426dbdc3b029804c5ec3cf838162d1cccb"
373
  ],
374
  "index": "pypi",
375
  "markers": "python_full_version >= '3.7.4' and python_full_version < '4.0.0'",
376
- "version": "==2.28.0"
377
  },
378
  "awslambdaric": {
379
  "hashes": [
 
1
  {
2
  "_meta": {
3
  "hash": {
4
+ "sha256": "0dca1825d21e4d135440e3ee61614eaa25aef49c2f0b20ae23a4cffe27cb1b71"
5
  },
6
  "pipfile-spec": 6,
7
  "requires": {
 
169
  "markers": "python_version >= '3.7'",
170
  "version": "==3.1.2"
171
  },
172
+ "markdown-it-py": {
173
+ "hashes": [
174
+ "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1",
175
+ "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"
176
+ ],
177
+ "markers": "python_version >= '3.8'",
178
+ "version": "==3.0.0"
179
+ },
180
  "markupsafe": {
181
  "hashes": [
182
  "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e",
 
243
  "markers": "python_version >= '3.7'",
244
  "version": "==2.1.3"
245
  },
246
+ "mdit-py-plugins": {
247
+ "hashes": [
248
+ "sha256:b51b3bb70691f57f974e257e367107857a93b36f322a9e6d44ca5bf28ec2def9",
249
+ "sha256:d8ab27e9aed6c38aa716819fedfde15ca275715955f8a185a8e1cf90fb1d2c1b"
250
+ ],
251
+ "markers": "python_version >= '3.8'",
252
+ "version": "==0.4.0"
253
+ },
254
+ "mdurl": {
255
+ "hashes": [
256
+ "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8",
257
+ "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"
258
+ ],
259
+ "markers": "python_version >= '3.7'",
260
+ "version": "==0.1.2"
261
+ },
262
+ "myst-parser": {
263
+ "hashes": [
264
+ "sha256:7c36344ae39c8e740dad7fdabf5aa6fc4897a813083c6cc9990044eb93656b14",
265
+ "sha256:ea929a67a6a0b1683cdbe19b8d2e724cd7643f8aa3e7bb18dd65beac3483bead"
266
+ ],
267
+ "index": "pypi",
268
+ "markers": "python_version >= '3.8'",
269
+ "version": "==2.0.0"
270
+ },
271
  "packaging": {
272
  "hashes": [
273
  "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5",
 
284
  "markers": "python_version >= '3.7'",
285
  "version": "==2.17.2"
286
  },
287
+ "pyyaml": {
288
+ "hashes": [
289
+ "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5",
290
+ "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc",
291
+ "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df",
292
+ "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741",
293
+ "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206",
294
+ "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27",
295
+ "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595",
296
+ "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62",
297
+ "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98",
298
+ "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696",
299
+ "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290",
300
+ "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9",
301
+ "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d",
302
+ "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6",
303
+ "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867",
304
+ "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47",
305
+ "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486",
306
+ "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6",
307
+ "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3",
308
+ "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007",
309
+ "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938",
310
+ "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0",
311
+ "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c",
312
+ "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735",
313
+ "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d",
314
+ "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28",
315
+ "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4",
316
+ "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba",
317
+ "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8",
318
+ "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5",
319
+ "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd",
320
+ "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3",
321
+ "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0",
322
+ "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515",
323
+ "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c",
324
+ "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c",
325
+ "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924",
326
+ "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34",
327
+ "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43",
328
+ "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859",
329
+ "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673",
330
+ "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54",
331
+ "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a",
332
+ "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b",
333
+ "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab",
334
+ "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa",
335
+ "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c",
336
+ "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585",
337
+ "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d",
338
+ "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"
339
+ ],
340
+ "markers": "python_version >= '3.6'",
341
+ "version": "==6.0.1"
342
+ },
343
  "requests": {
344
  "hashes": [
345
  "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f",
 
457
  },
458
  "aws-lambda-powertools": {
459
  "hashes": [
460
+ "sha256:67998f204ea732fadea834680d2a92b9a12899c96438fc6006d5283c648d188c",
461
+ "sha256:a267cc2043dbd0e8f1098e8359b052904b9c8b951a724268c3fcde63039a5707"
462
  ],
463
  "index": "pypi",
464
  "markers": "python_full_version >= '3.7.4' and python_full_version < '4.0.0'",
465
+ "version": "==2.28.1"
466
  },
467
  "awslambdaric": {
468
  "hashes": [
docs/brief_project_presentation.md ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # About this project
2
+
3
+ SamGIS is an attempt to perform instance segmentation on geospatial data even without the use of dedicated graphics cards.
4
+ The user interact on a leaflet webmap choosing areas to recognize and a backend responds with a geojson containing one or more
5
+ recognized polygons within the initial webmap.
6
+
7
+ Check about implementation details on my [blog](https://trinca.tornidor.com/projects/samgis-sam-exporter-for-GIS).
docs/conf.py CHANGED
@@ -21,7 +21,8 @@ extensions = [
21
  'sphinx.ext.autodoc',
22
  'sphinx.ext.viewcode',
23
  'sphinx.ext.napoleon',
24
- 'sphinx_autodoc_typehints'
 
25
  # 'sphinx_autodoc_defaultargs'
26
  ]
27
  # Napoleon settings
 
21
  'sphinx.ext.autodoc',
22
  'sphinx.ext.viewcode',
23
  'sphinx.ext.napoleon',
24
+ 'sphinx_autodoc_typehints',
25
+ 'myst_parser'
26
  # 'sphinx_autodoc_defaultargs'
27
  ]
28
  # Napoleon settings
docs/external_links.rst ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ External links
2
+ ==============
3
+
4
+ .. include:: external_links_md.md
5
+ :parser: myst_parser.sphinx_
docs/external_links_md.md ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ - My [SamGIS demo website](https://ml-trinca.tornidor.com)
2
+ - My [personal website](https://trinca.tornidor.com)
docs/index.rst CHANGED
@@ -6,9 +6,11 @@
6
  Welcome to SamGIS's documentation!
7
  ==================================
8
 
 
 
 
9
  .. toctree::
10
  :maxdepth: 2
11
- :caption: Contents:
12
  :hidden:
13
 
14
  modules
@@ -17,6 +19,9 @@ Welcome to SamGIS's documentation!
17
  src.prediction_api
18
  src.utilities
19
 
 
 
 
20
  Indices and tables
21
  ==================
22
 
 
6
  Welcome to SamGIS's documentation!
7
  ==================================
8
 
9
+ .. include:: brief_project_presentation.md
10
+ :parser: myst_parser.sphinx_
11
+
12
  .. toctree::
13
  :maxdepth: 2
 
14
  :hidden:
15
 
16
  modules
 
19
  src.prediction_api
20
  src.utilities
21
 
22
+ external_links
23
+
24
+
25
  Indices and tables
26
  ==================
27
 
requirements.txt CHANGED
@@ -3,6 +3,7 @@ awslambdaric
3
  bson
4
  geopandas
5
  jmespath
 
6
  numpy
7
  onnxruntime
8
  opencv-python-headless
 
3
  bson
4
  geopandas
5
  jmespath
6
+ myst-parser
7
  numpy
8
  onnxruntime
9
  opencv-python-headless
src/prediction_api/sam_onnx.py CHANGED
@@ -1,5 +1,5 @@
1
  """
2
- Define a machine learning executed by ONNX Runtime (https://onnxruntime.ai/)
3
  for Segment Anything (https://segment-anything.com).
4
  Modified from https://github.com/vietanhdev/samexporter/
5
 
 
1
  """
2
+ Define a machine learning model executed by ONNX Runtime (https://onnxruntime.ai/)
3
  for Segment Anything (https://segment-anything.com).
4
  Modified from https://github.com/vietanhdev/samexporter/
5