{"id":19816977,"url":"https://github.com/geoadmin/service-alti","last_synced_at":"2025-05-01T10:33:19.535Z","repository":{"id":9760183,"uuid":"63243665","full_name":"geoadmin/service-alti","owner":"geoadmin","description":"Height/profile services for geo.admin.ch","archived":false,"fork":false,"pushed_at":"2025-02-25T14:46:16.000Z","size":258102,"stargazers_count":2,"open_issues_count":3,"forks_count":2,"subscribers_count":22,"default_branch":"develop","last_synced_at":"2025-04-06T12:51:46.538Z","etag":null,"topics":["flask","managed-by-tf","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geoadmin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-13T12:21:48.000Z","updated_at":"2025-02-25T14:45:55.000Z","dependencies_parsed_at":"2024-08-23T12:29:45.042Z","dependency_job_id":"0375e275-1a5d-4f21-b1cb-4c0328f081fe","html_url":"https://github.com/geoadmin/service-alti","commit_stats":null,"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Fservice-alti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Fservice-alti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Fservice-alti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoadmin%2Fservice-alti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geoadmin","download_url":"https://codeload.github.com/geoadmin/service-alti/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251860579,"owners_count":21655770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","managed-by-tf","python3"],"created_at":"2024-11-12T10:11:19.325Z","updated_at":"2025-05-01T10:33:19.525Z","avatar_url":"https://github.com/geoadmin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# service-alti\n\n| Branch | Status |\n|--------|-----------|\n| develop | ![Build Status](https://codebuild.eu-central-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiY0FaWjB3UUVsNUl1T1Zic2tMbHVjUU82WmJrNDRXbVJzZjE1UThDT0F2K0xDajJiajdCQXZFek54ZEw2b3c0czFrZ3gxMWt3ZGxWWHowZ1A0TmlON3RRPSIsIml2UGFyYW1ldGVyU3BlYyI6IlZZMkRrSDZRek9SYTV6OFUiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D\u0026branch=develop) |\n| master | ![Build Status](https://codebuild.eu-central-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiY0FaWjB3UUVsNUl1T1Zic2tMbHVjUU82WmJrNDRXbVJzZjE1UThDT0F2K0xDajJiajdCQXZFek54ZEw2b3c0czFrZ3gxMWt3ZGxWWHowZ1A0TmlON3RRPSIsIml2UGFyYW1ldGVyU3BlYyI6IlZZMkRrSDZRek9SYTV6OFUiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D\u0026branch=master) |\n\n- [Summary of the project](#summary-of-the-project)\n- [How to run locally](#how-to-run-locally)\n  - [Dependencies](#dependencies)\n  - [Setting up to work](#setting-up-to-work)\n  - [Linting and formatting your work](#linting-and-formatting-your-work)\n  - [Test your work](#test-your-work)\n- [Versioning](#versioning)\n- [Endpoints](#endpoints)\n  - [/checker GET](#checker-get)\n  - [`/rest/services/height` GET](#restservicesheight-get)\n  - [`/rest/services/profile.json` and `/rest/services/profile.csv` GET/POST](#restservicesprofilejson-and-restservicesprofilecsv-getpost)\n- [Deploying the project and continuous integration](#deploying-the-project-and-continuous-integration)\n  - [Deployment configuration](#deployment-configuration)\n\n## Summary of the project\n\nHeight and profile services for http://api3.geo.admin.ch\n\n## How to run locally\n\n### Dependencies\n\nThe **Make** targets assume you have **bash**, **curl**, **python3.9**, **pipenv**, **docker** installed.\n\n### Setting up to work\n\nFirst, you'll need to clone the repo\n\n    git clone git@github.com:geoadmin/service-alti.git\n\nThen, you can run the setup target to ensure you have everything needed to develop, test and serve locally\n\n    make setup\n\nThat's it, you're ready to work.\n\n### Linting and formatting your work\n\nIn order to have a consistent code style the code should be formatted using `yapf`. Also to avoid syntax errors and non\npythonic idioms code, the project uses the `pylint` linter. Both formatting and linter can be manually run using the\nfollowing command:\n\n    make format-lint\n\n**Formatting and linting should be at best integrated inside the IDE, for this look at\n[Integrate yapf and pylint into IDE](https://github.com/geoadmin/doc-guidelines/blob/master/PYTHON.md#yapf-and-pylint-ide-integration)**\n\n### Test your work\n\nTesting if what you developed work is made simple. You have four targets at your disposal. **test, serve, gunicornserve, dockerrun**\n\n    make test\n\nThis command run the integration and unit tests.\n\n    make serve\n\nThis will serve the application through Flask without any wsgi in front.\n\n    make gunicornserve\n\nThis will serve the application with the Gunicorn layer in front of the application\n\n    make dockerrun\n\nThis will serve the application with the wsgi server, inside a container.\nTo stop serving through containers,\n\n    make shutdown\n\nIs the command you're looking for.\n\n## Versioning\n\nThis service uses [SemVer](https://semver.org/) as versioning scheme. The versioning is automatically handled by `.github/workflows/main.yml` file.\n\nSee also [Git Flow - Versioning](https://github.com/geoadmin/doc-guidelines/blob/master/GIT_FLOW.md#versioning) for more information on the versioning guidelines.\n\n## Endpoints\n\n### /checker GET\n\nthis is a simple route meant to test if the server is up.\n\n### `/rest/services/height` GET\n\nhttp://api3.geo.admin.ch/services/sdiservices.html#height\n\n### `/rest/services/profile.json` and `/rest/services/profile.csv` GET/POST\n\nhttp://api3.geo.admin.ch/services/sdiservices.html#profile\n\n## Deploying the project and continuous integration\n\nWhen creating a PR, it should run a codebuild job to test, build and push automatically your PR as a tagged container.\n\nThis service is to be deployed to the Kubernetes cluster once it is merged.\n\nTO DO: give instructions to deploy to kubernetes.\n\n### Deployment configuration\n\nThe service is configured by Environment Variable:\n\n| Env                  | Default                   | Description                            |\n|----------------------|---------------------------|----------------------------------------|\n| HTTP_PORT            | `'5000'`                  | HTTP port of the service               |\n| LOGGING_CFG          | `'logging-cfg-local.yml'` | Logging configuration file             |\n| LOGS_DIR             | `'./logs'`                | Directory for logging output files     |\n| DTM_BASE_PATH        | `'/var/local/profile/'`   | Raster and COMB files location         |\n| PRELOAD_RASTER_FILES | `False`                   | Preload raster files at startup. If not set they will be loaded during first request |\n| ALTI_WORKERS         | `0`                       | Number of workers. `0` or negative value means that the number of worker are computed from the number of cpu |\n| DFT_CACHE_HEADER     | `public, max-age=86400`   | Default cache settings for successful GET, HEAD and OPTIONS requests |\n| GUNICORN_WORKER_TMP_DIR | `None` | This should be set to an tmpfs file system for better performance. See https://docs.gunicorn.org/en/stable/settings.html#worker-tmp-dir. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoadmin%2Fservice-alti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeoadmin%2Fservice-alti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoadmin%2Fservice-alti/lists"}