[doc] update docs, bump to version 1.3.0
Browse files- docs/Changelog.md +5 -0
- docs/brief_project_presentation.md +5 -4
- docs/conf.py +1 -10
- docs/make.bat +0 -35
- docs/modules.rst +3 -2
- docs/samgis_core.prediction_api.rst +21 -0
- docs/samgis_core.rst +19 -0
- docs/samgis_core.utilities.rst +53 -0
- poetry.lock +30 -10
- pyproject.toml +7 -2
- samgis/__version__.py +4 -1
docs/Changelog.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
# Changelog
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
## Version 1.2.2
|
4 |
- update dependencies version
|
5 |
|
|
|
1 |
# Changelog
|
2 |
|
3 |
+
## Version 1.3.0
|
4 |
+
- take advantage of re-usable image embeddings in SAM model using samgis_core@1.1.1
|
5 |
+
- add map navigation locking (unlockable!) on ML request to take advantage of image embedding re-use
|
6 |
+
- add a metadata section within the pyproject.toml file
|
7 |
+
|
8 |
## Version 1.2.2
|
9 |
- update dependencies version
|
10 |
|
docs/brief_project_presentation.md
CHANGED
@@ -7,14 +7,15 @@ The backend perform machine learning inference using a [Segment Anything](https:
|
|
7 |
|
8 |
Check about implementation details on my [blog](https://trinca.tornidor.com/projects/samgis-segment-anything-applied-to-GIS).
|
9 |
|
10 |
-
|
11 |
|
12 |
You can visit my self-hosted demo [here](https://ml-trinca.tornidor.com).
|
13 |
Since this demo uses a python container backend hosted on my AWS account I keep it under authentication to prevent abuses.
|
14 |
[Here](https://docs.ml-trinca.tornidor.com/openapi) the OpenAPI swagger documentation.
|
15 |
|
16 |
-
|
17 |
|
18 |
I added also a demo on this [HuggingFace Space](https://huggingface.co/spaces/aletrn/samgis). It's
|
19 |
-
possible to find [here](https://aletrn-samgis.hf.space/) the direct space url and
|
20 |
-
|
|
|
|
7 |
|
8 |
Check about implementation details on my [blog](https://trinca.tornidor.com/projects/samgis-segment-anything-applied-to-GIS).
|
9 |
|
10 |
+
## Self-hosted demo
|
11 |
|
12 |
You can visit my self-hosted demo [here](https://ml-trinca.tornidor.com).
|
13 |
Since this demo uses a python container backend hosted on my AWS account I keep it under authentication to prevent abuses.
|
14 |
[Here](https://docs.ml-trinca.tornidor.com/openapi) the OpenAPI swagger documentation.
|
15 |
|
16 |
+
## HuggingFace Space demo
|
17 |
|
18 |
I added also a demo on this [HuggingFace Space](https://huggingface.co/spaces/aletrn/samgis). It's
|
19 |
+
possible to find [here](https://aletrn-samgis.hf.space/) the direct space url and [here](https://aletrn-samgis.hf.space/docs#/) the OpenAPI swagger documentation.
|
20 |
+
|
21 |
+
Another interesting resource is my [HuggingFace SamGIS - LISA on CUDA demo](https://huggingface.co/spaces/aletrn/samgis-lisa-on-cuda): you can find some details about it on [its project page](https://trinca.tornidor.com/projects/lisa-adapted-for-samgis).
|
docs/conf.py
CHANGED
@@ -11,7 +11,7 @@ import sys
|
|
11 |
project = 'SamGIS'
|
12 |
copyright = '2023-now, alessandro trinca tornidor'
|
13 |
author = 'alessandro trinca tornidor'
|
14 |
-
release = '1.
|
15 |
|
16 |
# -- General configuration ---------------------------------------------------
|
17 |
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
@@ -28,8 +28,6 @@ extensions = [
|
|
28 |
]
|
29 |
# Napoleon settings
|
30 |
napoleon_google_docstring = True
|
31 |
-
|
32 |
-
#
|
33 |
typehints_defaults = "comma"
|
34 |
|
35 |
templates_path = ['_templates']
|
@@ -43,13 +41,6 @@ source_suffix = {
|
|
43 |
'.md': 'markdown',
|
44 |
}
|
45 |
|
46 |
-
# default args values
|
47 |
-
rst_prolog = """
|
48 |
-
.. |default| raw:: html
|
49 |
-
|
50 |
-
<div class="default-value-section">""" + \
|
51 |
-
' <span class="default-value-label">Default:</span>'
|
52 |
-
|
53 |
# -- Options for HTML output -------------------------------------------------
|
54 |
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
55 |
|
|
|
11 |
project = 'SamGIS'
|
12 |
copyright = '2023-now, alessandro trinca tornidor'
|
13 |
author = 'alessandro trinca tornidor'
|
14 |
+
release = '1.3.0'
|
15 |
|
16 |
# -- General configuration ---------------------------------------------------
|
17 |
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
|
28 |
]
|
29 |
# Napoleon settings
|
30 |
napoleon_google_docstring = True
|
|
|
|
|
31 |
typehints_defaults = "comma"
|
32 |
|
33 |
templates_path = ['_templates']
|
|
|
41 |
'.md': 'markdown',
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
# -- Options for HTML output -------------------------------------------------
|
45 |
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
46 |
|
docs/make.bat
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
@ECHO OFF
|
2 |
-
|
3 |
-
pushd %~dp0
|
4 |
-
|
5 |
-
REM Command file for Sphinx documentation
|
6 |
-
|
7 |
-
if "%SPHINXBUILD%" == "" (
|
8 |
-
set SPHINXBUILD=sphinx-build
|
9 |
-
)
|
10 |
-
set SOURCEDIR=.
|
11 |
-
set BUILDDIR=_build
|
12 |
-
|
13 |
-
%SPHINXBUILD% >NUL 2>NUL
|
14 |
-
if errorlevel 9009 (
|
15 |
-
echo.
|
16 |
-
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
17 |
-
echo.installed, then set the SPHINXBUILD environment variable to point
|
18 |
-
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
19 |
-
echo.may add the Sphinx directory to PATH.
|
20 |
-
echo.
|
21 |
-
echo.If you don't have Sphinx installed, grab it from
|
22 |
-
echo.https://www.sphinx-doc.org/
|
23 |
-
exit /b 1
|
24 |
-
)
|
25 |
-
|
26 |
-
if "%1" == "" goto help
|
27 |
-
|
28 |
-
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
29 |
-
goto end
|
30 |
-
|
31 |
-
:help
|
32 |
-
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
33 |
-
|
34 |
-
:end
|
35 |
-
popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/modules.rst
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
-
|
2 |
-
|
3 |
|
4 |
.. toctree::
|
5 |
:maxdepth: 4
|
6 |
|
7 |
samgis
|
|
|
|
1 |
+
modules
|
2 |
+
=======
|
3 |
|
4 |
.. toctree::
|
5 |
:maxdepth: 4
|
6 |
|
7 |
samgis
|
8 |
+
samgis_core
|
docs/samgis_core.prediction_api.rst
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
samgis\_core.prediction\_api package
|
2 |
+
====================================
|
3 |
+
|
4 |
+
Submodules
|
5 |
+
----------
|
6 |
+
|
7 |
+
samgis\_core.prediction\_api.sam\_onnx module
|
8 |
+
---------------------------------------------
|
9 |
+
|
10 |
+
.. automodule:: samgis_core.prediction_api.sam_onnx
|
11 |
+
:members:
|
12 |
+
:undoc-members:
|
13 |
+
:show-inheritance:
|
14 |
+
|
15 |
+
Module contents
|
16 |
+
---------------
|
17 |
+
|
18 |
+
.. automodule:: samgis_core.prediction_api
|
19 |
+
:members:
|
20 |
+
:undoc-members:
|
21 |
+
:show-inheritance:
|
docs/samgis_core.rst
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
samgis\_core package
|
2 |
+
====================
|
3 |
+
|
4 |
+
Subpackages
|
5 |
+
-----------
|
6 |
+
|
7 |
+
.. toctree::
|
8 |
+
:maxdepth: 4
|
9 |
+
|
10 |
+
samgis_core.prediction_api
|
11 |
+
samgis_core.utilities
|
12 |
+
|
13 |
+
Module contents
|
14 |
+
---------------
|
15 |
+
|
16 |
+
.. automodule:: samgis_core
|
17 |
+
:members:
|
18 |
+
:undoc-members:
|
19 |
+
:show-inheritance:
|
docs/samgis_core.utilities.rst
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
samgis\_core.utilities package
|
2 |
+
==============================
|
3 |
+
|
4 |
+
Submodules
|
5 |
+
----------
|
6 |
+
|
7 |
+
samgis\_core.utilities.constants module
|
8 |
+
---------------------------------------
|
9 |
+
|
10 |
+
.. automodule:: samgis_core.utilities.constants
|
11 |
+
:members:
|
12 |
+
:undoc-members:
|
13 |
+
:show-inheritance:
|
14 |
+
|
15 |
+
samgis\_core.utilities.fastapi\_logger module
|
16 |
+
---------------------------------------------
|
17 |
+
|
18 |
+
.. automodule:: samgis_core.utilities.fastapi_logger
|
19 |
+
:members:
|
20 |
+
:undoc-members:
|
21 |
+
:show-inheritance:
|
22 |
+
|
23 |
+
samgis\_core.utilities.serialize module
|
24 |
+
---------------------------------------
|
25 |
+
|
26 |
+
.. automodule:: samgis_core.utilities.serialize
|
27 |
+
:members:
|
28 |
+
:undoc-members:
|
29 |
+
:show-inheritance:
|
30 |
+
|
31 |
+
samgis\_core.utilities.type\_hints module
|
32 |
+
-----------------------------------------
|
33 |
+
|
34 |
+
.. automodule:: samgis_core.utilities.type_hints
|
35 |
+
:members:
|
36 |
+
:undoc-members:
|
37 |
+
:show-inheritance:
|
38 |
+
|
39 |
+
samgis\_core.utilities.utilities module
|
40 |
+
---------------------------------------
|
41 |
+
|
42 |
+
.. automodule:: samgis_core.utilities.utilities
|
43 |
+
:members:
|
44 |
+
:undoc-members:
|
45 |
+
:show-inheritance:
|
46 |
+
|
47 |
+
Module contents
|
48 |
+
---------------
|
49 |
+
|
50 |
+
.. automodule:: samgis_core.utilities
|
51 |
+
:members:
|
52 |
+
:undoc-members:
|
53 |
+
:show-inheritance:
|
poetry.lock
CHANGED
@@ -2130,22 +2130,24 @@ files = [
|
|
2130 |
|
2131 |
[[package]]
|
2132 |
name = "samgis-core"
|
2133 |
-
version = "1.1.
|
2134 |
description = "SamGIS CORE"
|
2135 |
optional = false
|
2136 |
-
python-versions = "
|
2137 |
-
files = [
|
2138 |
-
|
2139 |
-
{file = "samgis_core-1.1.1.tar.gz", hash = "sha256:3f779cbb75b5555f0f27f9d473f7d311c3d170a6164867bb5fa5768bce74b1f4"},
|
2140 |
-
]
|
2141 |
|
2142 |
[package.dependencies]
|
2143 |
-
bson = "
|
2144 |
-
loguru = "
|
2145 |
numpy = "1.25.2"
|
2146 |
onnxruntime = "1.16.3"
|
2147 |
opencv-python-headless = "4.8.1.78"
|
2148 |
-
pillow = "
|
|
|
|
|
|
|
|
|
2149 |
|
2150 |
[[package]]
|
2151 |
name = "setuptools"
|
@@ -2399,6 +2401,24 @@ docs = ["sphinxcontrib-websupport"]
|
|
2399 |
lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"]
|
2400 |
test = ["cython (>=3.0)", "filelock", "html5lib", "pytest (>=4.6)", "setuptools (>=67.0)"]
|
2401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2402 |
[[package]]
|
2403 |
name = "sphinx-autodoc-typehints"
|
2404 |
version = "1.25.3"
|
@@ -2691,4 +2711,4 @@ files = [
|
|
2691 |
[metadata]
|
2692 |
lock-version = "2.0"
|
2693 |
python-versions = "~3.10"
|
2694 |
-
content-hash = "
|
|
|
2130 |
|
2131 |
[[package]]
|
2132 |
name = "samgis-core"
|
2133 |
+
version = "1.1.2"
|
2134 |
description = "SamGIS CORE"
|
2135 |
optional = false
|
2136 |
+
python-versions = "~3.10"
|
2137 |
+
files = []
|
2138 |
+
develop = false
|
|
|
|
|
2139 |
|
2140 |
[package.dependencies]
|
2141 |
+
bson = "^0.5.10"
|
2142 |
+
loguru = "^0.7.2"
|
2143 |
numpy = "1.25.2"
|
2144 |
onnxruntime = "1.16.3"
|
2145 |
opencv-python-headless = "4.8.1.78"
|
2146 |
+
pillow = "^10.2.0"
|
2147 |
+
|
2148 |
+
[package.source]
|
2149 |
+
type = "directory"
|
2150 |
+
url = "../samgis_core"
|
2151 |
|
2152 |
[[package]]
|
2153 |
name = "setuptools"
|
|
|
2401 |
lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-simplify", "isort", "mypy (>=0.990)", "ruff", "sphinx-lint", "types-requests"]
|
2402 |
test = ["cython (>=3.0)", "filelock", "html5lib", "pytest (>=4.6)", "setuptools (>=67.0)"]
|
2403 |
|
2404 |
+
[[package]]
|
2405 |
+
name = "sphinx-autodoc-defaultargs"
|
2406 |
+
version = "0.1.2"
|
2407 |
+
description = "Automatic generation of default arguments for the Sphinx autodoc extension."
|
2408 |
+
optional = false
|
2409 |
+
python-versions = ">=3.5"
|
2410 |
+
files = [
|
2411 |
+
{file = "sphinx-autodoc-defaultargs-0.1.2.tar.gz", hash = "sha256:b11cd9ac43510c1f1e9a3f9469a370e6bbe2bc2cb9e67cb79987f4dcd3be5be3"},
|
2412 |
+
{file = "sphinx_autodoc_defaultargs-0.1.2-py3-none-any.whl", hash = "sha256:1513b1aea8c20348f1763dbfd7ff11f86cd77f2ce3246c73e1405a2a67fea3ff"},
|
2413 |
+
]
|
2414 |
+
|
2415 |
+
[package.dependencies]
|
2416 |
+
Sphinx = ">=3.0"
|
2417 |
+
|
2418 |
+
[package.extras]
|
2419 |
+
test = ["Sphinx (>=3.2.0)", "dataclasses", "pytest (>=3.1.0)", "sphobjinv (>=2.0)", "typing-extensions (>=3.5)"]
|
2420 |
+
type-comments = ["typed-ast (>=1.4.0)"]
|
2421 |
+
|
2422 |
[[package]]
|
2423 |
name = "sphinx-autodoc-typehints"
|
2424 |
version = "1.25.3"
|
|
|
2711 |
[metadata]
|
2712 |
lock-version = "2.0"
|
2713 |
python-versions = "~3.10"
|
2714 |
+
content-hash = "c976c4dd1ee54e5bc8a77e978c4462771f4f2729ff1a2272885f588219c91e41"
|
pyproject.toml
CHANGED
@@ -1,11 +1,15 @@
|
|
1 |
[tool.poetry]
|
2 |
name = "samgis"
|
3 |
-
version = "1.
|
4 |
description = "A backend for machine learning instance segmentation on geospatial data even without dedicated graphics cards."
|
5 |
authors = ["alessandro trinca tornidor <alessandro@trinca.tornidor.com>"]
|
6 |
license = "MIT license"
|
7 |
readme = "README.md"
|
8 |
|
|
|
|
|
|
|
|
|
9 |
[tool.poetry.dependencies]
|
10 |
bson = "^0.5.10"
|
11 |
contextily = "^1.5.2"
|
@@ -19,7 +23,7 @@ python = "~3.10"
|
|
19 |
python-dotenv = "^1.0.1"
|
20 |
rasterio = "^1.3.9"
|
21 |
requests = "^2.31.0"
|
22 |
-
samgis-core = "^1.1.
|
23 |
|
24 |
[tool.poetry.group.aws_lambda]
|
25 |
optional = true
|
@@ -47,6 +51,7 @@ sphinx = "^7.2.6"
|
|
47 |
sphinx-autodoc-typehints = "^1.25.2"
|
48 |
sphinxcontrib-openapi = "^0.8.4"
|
49 |
myst-parser = "^2.0.0"
|
|
|
50 |
|
51 |
[tool.poetry.group.fastapi]
|
52 |
optional = true
|
|
|
1 |
[tool.poetry]
|
2 |
name = "samgis"
|
3 |
+
version = "1.3.0"
|
4 |
description = "A backend for machine learning instance segmentation on geospatial data even without dedicated graphics cards."
|
5 |
authors = ["alessandro trinca tornidor <alessandro@trinca.tornidor.com>"]
|
6 |
license = "MIT license"
|
7 |
readme = "README.md"
|
8 |
|
9 |
+
[metadata]
|
10 |
+
name = "samgis"
|
11 |
+
version = "1.3.0"
|
12 |
+
|
13 |
[tool.poetry.dependencies]
|
14 |
bson = "^0.5.10"
|
15 |
contextily = "^1.5.2"
|
|
|
23 |
python-dotenv = "^1.0.1"
|
24 |
rasterio = "^1.3.9"
|
25 |
requests = "^2.31.0"
|
26 |
+
samgis-core = "^1.1.2"
|
27 |
|
28 |
[tool.poetry.group.aws_lambda]
|
29 |
optional = true
|
|
|
51 |
sphinx-autodoc-typehints = "^1.25.2"
|
52 |
sphinxcontrib-openapi = "^0.8.4"
|
53 |
myst-parser = "^2.0.0"
|
54 |
+
sphinx-autodoc-defaultargs = "^0.1.2"
|
55 |
|
56 |
[tool.poetry.group.fastapi]
|
57 |
optional = true
|
samgis/__version__.py
CHANGED
@@ -1 +1,4 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
1 |
+
import importlib.metadata
|
2 |
+
|
3 |
+
|
4 |
+
__version__ = importlib.metadata.version(__package__ or __name__)
|