Commit d24931a7 authored by Cresson Remi's avatar Cresson Remi
Browse files

DOC: fix mkdocs

1 merge request!36Replace pydoc
Pipeline #36123 passed with stages
in 5 minutes and 26 seconds
Showing with 72 additions and 40 deletions
+72 -40
...@@ -45,6 +45,10 @@ superimposed.write("superimposed.tif") ...@@ -45,6 +45,10 @@ superimposed.write("superimposed.tif")
# Classes # Classes
## Scene class
The scene class handles all the metadata and the imagery.
```mermaid ```mermaid
classDiagram classDiagram
...@@ -55,16 +59,6 @@ classDiagram ...@@ -55,16 +59,6 @@ classDiagram
Sentinel2SceneBase <|-- Sentinel23AScene Sentinel2SceneBase <|-- Sentinel23AScene
Scene --* Imagery: root_scene Scene --* Imagery: root_scene
Imagery <|-- Spot67Imagery
Imagery <|-- Sentinel2ImageryBase
Sentinel2ImageryBase <|-- Sentinel22AImagery
Sentinel2ImageryBase <|-- Sentinel23AImagery
Imagery --* Source: root_imagery
Source <|-- Spot67Source
Source <|-- Sentinel2Source
Sentinel2Source <|-- Sentinel22ASource
Sentinel2Source <|-- Sentinel23ASource
class Scene{ class Scene{
+datetime acquisition_date +datetime acquisition_date
...@@ -109,7 +103,66 @@ classDiagram ...@@ -109,7 +103,66 @@ classDiagram
+Sentinel3AImagery get_imagery() +Sentinel3AImagery get_imagery()
+get_metadata() +get_metadata()
} }
```
## Imagery
The imagery stores the images sources for a particular sensor.
```mermaid
classDiagram
Imagery <|-- Spot67Imagery
Imagery <|-- Sentinel2ImageryBase
Sentinel2ImageryBase <|-- Sentinel22AImagery
Sentinel2ImageryBase <|-- Sentinel23AImagery
Imagery --* Source: root_imagery
class Imagery{
+__init__(root_scene)
+Scene root_scene
}
class Spot67Imagery{
+__init__(root_scene)
+Source get_pxs()
+Source get_pan()
+Source get_xs()
}
class Sentinel2ImageryBase{
+_concatenate_10m_bands()
+_concatenate_20m_bands()
}
class Sentinel22AImagery{
+get_10m_bands()
+get_20m_bands()
}
class Sentinel23AImagery{
+get_10m_bands()
+get_20m_bands()
}
```
## Source
The source stores the image pipeline that delivers the pixels.
```mermaid
classDiagram
Source <|-- Spot67Source
Source <|-- Sentinel2Source
Sentinel2Source <|-- Sentinel22ASource
Sentinel2Source <|-- Sentinel23ASource
class Source{ class Source{
+__init__(root_imagery, out, parent=None) +__init__(root_imagery, out, parent=None)
+Imagery root_imagery +Imagery root_imagery
...@@ -139,32 +192,5 @@ classDiagram ...@@ -139,32 +192,5 @@ classDiagram
class Sentinel23ASource{ class Sentinel23ASource{
+Source flg_msk_drilled(keep_flags_values=(3, 4), nodata=0) +Source flg_msk_drilled(keep_flags_values=(3, 4), nodata=0)
} }
class Imagery{
+__init__(root_scene)
+Scene root_scene
}
class Spot67Imagery{
+__init__(root_scene)
+Source get_pxs()
+Source get_pan()
+Source get_xs()
}
class Sentinel2ImageryBase{
+_concatenate_10m_bands()
+_concatenate_20m_bands()
}
class Sentinel22AImagery{
+get_10m_bands()
+get_20m_bands()
}
class Sentinel23AImagery{
+get_10m_bands()
+get_20m_bands()
}
``` ```
...@@ -6,16 +6,22 @@ import mkdocs_gen_files ...@@ -6,16 +6,22 @@ import mkdocs_gen_files
nav = mkdocs_gen_files.Nav() nav = mkdocs_gen_files.Nav()
for path in sorted(Path("scenes").rglob("*.py")): processed_paths = ["app", "scenes"]
for path in sorted(Path(".").rglob("*.py")):
print(f"path: {path}") print(f"path: {path}")
module_path = path.relative_to("scenes").with_suffix("") module_path = path.relative_to(".").with_suffix("")
doc_path = path.relative_to("scenes").with_suffix(".md") doc_path = path.relative_to(".").with_suffix(".md")
full_doc_path = Path("reference", doc_path) full_doc_path = Path("reference", doc_path)
print(f"module path: {module_path}") print(f"module path: {module_path}")
print(f"doc path:{doc_path}") print(f"doc path:{doc_path}")
parts = tuple(module_path.parts) parts = tuple(module_path.parts)
print(f"parts: {parts}") print(f"parts: {parts}")
if parts[0] not in processed_paths:
continue
print("--------")
if parts[-1] == "__init__": if parts[-1] == "__init__":
if len(parts) <= 1: if len(parts) <= 1:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment