|
| 1 | +# Installation |
| 2 | + |
| 3 | +## Using pip |
| 4 | + |
| 5 | +The S2GOS controller packages are not yet deployed on PyPI, therefore |
| 6 | +installing it as a package using `pip` is not yet available. |
| 7 | + |
| 8 | +## Using conda/mamba |
| 9 | + |
| 10 | +The S2GOS controller packages are not yet deployed on conda-forge, therefore |
| 11 | +installing it using as a conda package using `conda` or `mamba` is not yet available. |
| 12 | + |
| 13 | +## Using pixi |
| 14 | + |
| 15 | +The S2GOS controller packages are not yet deployed on conda-forge, therefore |
| 16 | +installing it as a conda package using `pixi` is not yet available. |
| 17 | + |
| 18 | +## Using GitHub |
| 19 | + |
| 20 | +To install the S2GOS controller packages from their sources on GitHub you'll |
| 21 | +need to install both [git](https://git-scm.com/install/) and |
| 22 | +[pixi](https://pixi.sh/latest/installation/) first. Then: |
| 23 | + |
| 24 | +```bash |
| 25 | +git clone https://github.com/eo-tools/sen4cap-client.git |
| 26 | +cd s2gos-controller |
| 27 | +pixi install |
| 28 | +pixi shell |
| 29 | +``` |
| 30 | + |
| 31 | +The installed development environment includes also JupyterLab so the recommended |
| 32 | +way to get started is to take a look at the notebooks in the `notebooks` folder. |
| 33 | + |
| 34 | +```bash |
| 35 | +cd notebooks |
| 36 | +jupyter-lab |
| 37 | +``` |
| 38 | + |
| 39 | +## Getting started |
| 40 | + |
| 41 | +After installing the S2GOS controller packages in your Python environment |
| 42 | +and activating it (conda/mamba: `conda activate <your-env>`, pixi: `pixi shell`) |
| 43 | +make sure the respective command-line tools are accessible: Type |
| 44 | + |
| 45 | +```bash |
| 46 | +s2gos-server --help |
| 47 | +``` |
| 48 | + |
| 49 | +and |
| 50 | + |
| 51 | +```bash |
| 52 | +s2gos-client --help |
| 53 | +``` |
| 54 | + |
| 55 | +to get an overview of the available commands and options. |
| 56 | + |
| 57 | +You can then run the S2GOS server with one of the development services |
| 58 | +or use the deployed server. To run the development service with a local |
| 59 | +process executor run |
| 60 | + |
| 61 | +```bash |
| 62 | +s2gos-server dev -- wraptile.services.local:service |
| 63 | +``` |
| 64 | + |
| 65 | +To run the S2GOS gateway server with a local Airflow instance (assuming |
| 66 | +the local Airflow webserver runs on http://localhost:8080): |
| 67 | + |
| 68 | +```bash |
| 69 | +s2gos-server dev -- wraptile.services.airflow:service --airflow-password=abcd1234 |
| 70 | +``` |
| 71 | + |
| 72 | +The next step is configure the client, which will also serve as default configuration |
| 73 | +for the client's Python API and its GUI: |
| 74 | + |
| 75 | +```bash |
| 76 | +s2gos-client configure |
| 77 | +``` |
| 78 | + |
| 79 | +Test: |
| 80 | + |
| 81 | +```bash |
| 82 | +s2gos-client list-processes |
| 83 | +``` |
| 84 | + |
| 85 | +## Development |
| 86 | + |
| 87 | +Install the S2GOS controller packages as described in |
| 88 | +[Installation / Using GitHub](#using-github) above. |
| 89 | + |
| 90 | +## Linting and Testing |
| 91 | + |
| 92 | +To run all checks, execute |
| 93 | + |
| 94 | +```bash |
| 95 | +pixi run checks |
| 96 | +``` |
| 97 | + |
| 98 | +To run all tests, execute |
| 99 | + |
| 100 | +```bash |
| 101 | +pixi run tests |
| 102 | +``` |
| 103 | + |
| 104 | +To generate a coverage report, execute |
| 105 | + |
| 106 | +```bash |
| 107 | +pixi run coverage |
| 108 | +``` |
| 109 | + |
| 110 | +## Implementing Enhancements |
| 111 | + |
| 112 | +The S2GOS controller code relies heavily on the |
| 113 | +[Eozilla](https://eo-tools.github.io/eozilla/) packages |
| 114 | + |
| 115 | +* [wraptile](https://github.com/eo-tools/eozilla/tree/main/wraptile), |
| 116 | + which provides the gateway server implementation, |
| 117 | +* [cuiman](https://github.com/eo-tools/eozilla/tree/main/cuiman), |
| 118 | + which provides the client CLI, GUI, and API implementations, and |
| 119 | +* [gavicore](https://github.com/eo-tools/eozilla/tree/main/gavicore) |
| 120 | + which provides common OGC model classes and basic utilities. |
| 121 | + |
| 122 | +Should S2GOS controller require non-S2GOS-specific enhancements it |
| 123 | +would likely be best to implement the required changes in the respective |
| 124 | +Eozilla packages. For this, check out the Eozilla sources directly next |
| 125 | +to this project's sources to achieve this folder structure: |
| 126 | + |
| 127 | +``` |
| 128 | + <projects>/ |
| 129 | + ├── s2gos-controller/ |
| 130 | + │ ├── s2gos-client/ |
| 131 | + │ ├── s2gos-server/ |
| 132 | + │ └── ... |
| 133 | + └── eozilla/ |
| 134 | + ├── appligator/ |
| 135 | + ├── cuiman/ |
| 136 | + ├── gavicore/ |
| 137 | + ├── procodile/ |
| 138 | + ├── wraptile/ |
| 139 | + └── ... |
| 140 | +``` |
| 141 | + |
| 142 | +For development, change the root `pyproject.toml` file as follows |
| 143 | + |
| 144 | +1. Comment out the dependencies `cuiman`, `gavicore`, etc. in the |
| 145 | + `[tool.pixi.dependencies]` table. |
| 146 | + |
| 147 | +2. Uncomment the editable PyPI dependencies for `cuiman`, `gavicore`, etc. in |
| 148 | + the `[tool.pixi.pypi-dependencies]` table. |
| 149 | + |
| 150 | +The run |
| 151 | + |
| 152 | +```bash |
| 153 | +pixi i |
| 154 | +``` |
| 155 | + |
| 156 | +to make the changes effective. Check with |
| 157 | + |
| 158 | +```bash |
| 159 | +pixi ls |
| 160 | +``` |
| 161 | + |
| 162 | +which should now list the Eozilla packages as editable. |
0 commit comments