-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add NDVI process endpoint and OpenAPI documentation #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 37 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
113b5cb
Add proprietary license for software usage
ChristianBeilschmidt 461876e
ndvi process
ChristianBeilschmidt 31d5c90
use geoengine library for building operators
ChristianBeilschmidt cabf036
feat: jobs
ChristianBeilschmidt 7cbb8be
linting
ChristianBeilschmidt 0cab1f4
tests
ChristianBeilschmidt c306736
use upstream version
ChristianBeilschmidt 4239d01
ci fixes
ChristianBeilschmidt 0775edb
fix ci
ChristianBeilschmidt 2eb1b3d
fix ci
ChristianBeilschmidt 68e6b9b
fix ci
ChristianBeilschmidt 1e1a9b0
ci
ChristianBeilschmidt 09b5887
some tests
ChristianBeilschmidt d82cc68
more tests
ChristianBeilschmidt 5e7e3ee
complicated CI for coverage
ChristianBeilschmidt 1a61f7f
paths
ChristianBeilschmidt 7ee8633
paths
ChristianBeilschmidt 9826e1b
paths
ChristianBeilschmidt 34be3a5
checkout code
ChristianBeilschmidt d484dfb
base path
ChristianBeilschmidt 22c00f4
other coverage path
ChristianBeilschmidt 4c85463
pwd
ChristianBeilschmidt b77f9c5
modify lcov paths
ChristianBeilschmidt 387d2ed
health and auth
ChristianBeilschmidt 7948bea
readme
ChristianBeilschmidt 830867a
justfile
ChristianBeilschmidt 3cd10a9
use task local vars
ChristianBeilschmidt b6e4941
update dependencies and refactor WFS handler usage in NDVI process an…
ChristianBeilschmidt d7062c3
Refactor NDVI process and update dependencies
ChristianBeilschmidt 0219f8f
Update geoengine-openapi-client source and refactor NDVI output band …
ChristianBeilschmidt b4d83dd
feat: add NDVI process endpoint and OpenAPI documentation
ChristianBeilschmidt d02feef
feat: initialize Angular frontend application with routing, styles, a…
ChristianBeilschmidt 20fae4a
build: update build scripts and CI
ChristianBeilschmidt e47599d
fix: adjust to current WIP version of ogcapi
ChristianBeilschmidt 858ba5d
refactor: use o2o
ChristianBeilschmidt 8050898
refactor: remove call.http
ChristianBeilschmidt 388c0f1
fix: status code in auth
ChristianBeilschmidt 7720cb7
refactor: use current api
ChristianBeilschmidt fb76d81
refactor: generate openapi without starting the server
ChristianBeilschmidt 9bb8e09
fix: better error message for failed ndvi computation
ChristianBeilschmidt e730440
refactor: use ogcapi crate against repository main
ChristianBeilschmidt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Copilot Instructions | ||
|
|
||
| This BioIS monorepo is written in Rust, SQL, TypeScript and Python. | ||
|
|
||
| ## Repository Structure | ||
|
|
||
| | Path | Description | | ||
| | -------------- | ----------------------------------------------- | | ||
| | `README.md` | Project Documentation | | ||
| | `LICENSE` | License File | | ||
| | `.github/` | GitHub Configuration | | ||
| | `justfile` | Justfile for task automation | | ||
| | `backend/` | Rust API Code | | ||
| | `frontend/` | TypeScript Angular Frontend Code | | ||
| | `api-client/` | OpenAPI client code generated from the API spec | | ||
| | `test-client/` | Snippet-based test client for testing the API | | ||
|
|
||
| - Commit messages and pull request titles should be in the conventional commit format of `<type>(<scope>): <description>`, where: | ||
| - `<type>` is one of `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`. | ||
| - `<scope>` is a noun describing the section of the codebase affected (e.g., `backend`, `frontend`, `api`). | ||
| - `<description>` is a short summary of the change. | ||
| - Diagrams should be created using Mermaid syntax and included in the relevant Markdown files for documentation purposes. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| applyTo: "api-client/**/*" | ||
| --- | ||
|
|
||
| # Copilot Instructions | ||
|
|
||
| - Never modify the `typescript` directory manually. | ||
| It is generated from the OpenAPI specification in `openapi.json` using the OpenAPI Generator. | ||
| To regenerate the API client, run `just generate-api-client` from the project root. | ||
| - The OpenAPI Generator configuration is defined in `config.yaml`. | ||
| If you need to change the generated code, modify the configuration and regenerate the client. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| --- | ||
| applyTo: "backend/**/*.rs, backend/**/*.sql" | ||
| --- | ||
|
|
||
| # Copilot Instructions | ||
|
|
||
| ## Coding Style | ||
|
|
||
| ### Rust | ||
|
|
||
| - Follow the Rust API guidelines for naming conventions, error handling, and documentation. | ||
| - Use `snake_case` for variable and function names, and `PascalCase` for struct and enum names. | ||
| - Ensure that all public functions and types have documentation comments using `///`. | ||
| - Use `Result<T>` (from anyhow) for error handling and define custom error types where appropriate. | ||
| - Use `camelCase` for JSON field names when serializing/deserializing with serde, and use `#[serde(rename_all = "camelCase")]` on structs to enforce this convention. | ||
| - Never use `unwrap()` or `expect()` in production code. Instead, propagate errors using the `?` operator or handle them gracefully. | ||
| - Start test function names with `it_` and use descriptive names that indicate what the test is verifying. | ||
|
|
||
| ### SQL | ||
|
|
||
| - The SQL dialect used in this project is PostgreSQL. Follow the PostgreSQL SQL style guide for formatting and conventions. | ||
| - For SQL queries, use uppercase for SQL keywords (e.g., SELECT, FROM, WHERE) and lowercase for table and column names. | ||
| - SQLFluff is used for linting SQL files. Ensure that your SQL code adheres to the configured SQLFluff rules. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| --- | ||
| applyTo: "frontend/**" | ||
| --- | ||
|
|
||
| You are an expert in TypeScript, Angular, and scalable web application development. You write functional, maintainable, performant, and accessible code following Angular and TypeScript best practices. | ||
|
|
||
| ## TypeScript Best Practices | ||
|
|
||
| - Use strict type checking | ||
| - Prefer type inference when the type is obvious | ||
| - Avoid the `any` type; use `unknown` when type is uncertain | ||
|
|
||
| ## Angular Best Practices | ||
|
|
||
| - Always use standalone components over NgModules | ||
| - Must NOT set `standalone: true` inside Angular decorators. It's the default in Angular v20+. | ||
| - Use signals for state management | ||
| - Implement lazy loading for feature routes | ||
| - Do NOT use the `@HostBinding` and `@HostListener` decorators. Put host bindings inside the `host` object of the `@Component` or `@Directive` decorator instead | ||
| - Use `NgOptimizedImage` for all static images. | ||
| - `NgOptimizedImage` does not work for inline base64 images. | ||
|
|
||
| ## Accessibility Requirements | ||
|
|
||
| - It MUST pass all AXE checks. | ||
| - It MUST follow all WCAG AA minimums, including focus management, color contrast, and ARIA attributes. | ||
|
|
||
| ### Components | ||
|
|
||
| - Keep components small and focused on a single responsibility | ||
| - Use `input()` and `output()` functions instead of decorators | ||
| - Use `computed()` for derived state | ||
| - Set `changeDetection: ChangeDetectionStrategy.OnPush` in `@Component` decorator | ||
| - Prefer inline templates for small components | ||
| - Prefer Reactive forms instead of Template-driven ones | ||
| - Do NOT use `ngClass`, use `class` bindings instead | ||
| - Do NOT use `ngStyle`, use `style` bindings instead | ||
| - When using external templates/styles, use paths relative to the component TS file. | ||
|
|
||
| ## State Management | ||
|
|
||
| - Use signals for local component state | ||
| - Use `computed()` for derived state | ||
| - Keep state transformations pure and predictable | ||
| - Do NOT use `mutate` on signals, use `update` or `set` instead | ||
|
|
||
| ## Templates | ||
|
|
||
| - Keep templates simple and avoid complex logic | ||
| - Use native control flow (`@if`, `@for`, `@switch`) instead of `*ngIf`, `*ngFor`, `*ngSwitch` | ||
| - Use the async pipe to handle observables | ||
| - Do not assume globals like (`new Date()`) are available. | ||
| - Do not write arrow functions in templates (they are not supported). | ||
|
|
||
| ## Services | ||
|
|
||
| - Design services around a single responsibility | ||
| - Use the `providedIn: 'root'` option for singleton services | ||
| - Use the `inject()` function instead of constructor injection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,229 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| merge_group: | ||
| push: | ||
| branches: | ||
| - main # For generating code coverage on main branch | ||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| lint-backend: | ||
| name: Lint Backend | ||
|
|
||
| runs-on: ubuntu-24.04 | ||
| container: quay.io/geoengine/devcontainer:latest | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| - uses: extractions/setup-just@v3 | ||
| - name: Init rustup toolchain | ||
| run: rustup show | ||
| - name: setup rust build cache | ||
| uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| # An explicit cache key that is used instead of the automatic `job`-based | ||
| # cache key and is thus stable across jobs. | ||
| # Default: empty | ||
| shared-key: "" | ||
|
|
||
| # An additional cache key that is added alongside the automatic `job`-based | ||
| # cache key and can be used to further differentiate jobs. | ||
| # Default: empty | ||
| key: ci_test_ | ||
| - name: Rustfmt | ||
| run: just lint-backend-rustfmt | ||
| - name: Clippy | ||
| run: just lint-backend-clippy | ||
| - name: SQLFluff | ||
| run: just lint-backend-sqlfluff | ||
| - name: Start PostgreSQL | ||
| run: | | ||
| service postgresql start | ||
| psql postgres://geoengine:geoengine@localhost -c "CREATE DATABASE biois;" | ||
| - name: Diesel Check | ||
| run: | | ||
| just install-diesel-cli | ||
| just lint-backend-diesel-cli | ||
| env: | ||
| DATABASE_URL: postgres://geoengine:geoengine@localhost/biois | ||
|
|
||
| lint-api-client: | ||
| name: Lint API Client | ||
|
|
||
| runs-on: ubuntu-24.04 | ||
| container: quay.io/geoengine/devcontainer:latest | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| - uses: extractions/setup-just@v3 | ||
| - name: Start PostgreSQL | ||
| run: | | ||
| service postgresql start | ||
| psql postgres://geoengine:geoengine@localhost -c "CREATE DATABASE biois;" | ||
| - name: Install Java (OpenAPI Generator requires Java to run) | ||
| run: | | ||
| # deleted in devcontainer image, but required by java installer | ||
| mkdir -p /usr/share/man/man1 | ||
| apt-get update | ||
| apt-get install -y openjdk-21-jre-headless | ||
| - name: Lint OpenAPI specification | ||
| run: | | ||
| just lint-openapi-spec | ||
| - name: Idempotency of OpenAPI doc generation | ||
| run: | | ||
| just generate-openapi-spec | ||
| just check-no-changes-in-git-repo | ||
| - name: Idempotency of API client code generation | ||
| run: | | ||
| just build-api-client | ||
| just check-no-changes-in-git-repo | ||
| - name: Check API client for build errors | ||
| run: just lint-api-client | ||
|
|
||
| lint-frontend: | ||
| name: Lint Frontend | ||
|
|
||
| runs-on: ubuntu-24.04 | ||
| container: quay.io/geoengine/devcontainer:latest | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| - uses: extractions/setup-just@v3 | ||
| - name: Install dependencies | ||
| run: | | ||
| just install-api-client-deps | ||
| just install-frontend-deps | ||
| - name: Code Format | ||
| run: just lint-frontend-fmt | ||
| - name: Lints | ||
| run: just lint-frontend-code | ||
|
|
||
| test-backend: | ||
| name: Test Backend | ||
|
|
||
| runs-on: ubuntu-24.04 | ||
| container: quay.io/geoengine/devcontainer:latest | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| outputs: | ||
| coverage-artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }} | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| - uses: extractions/setup-just@v3 | ||
| - name: Init rustup toolchain | ||
| run: rustup show | ||
|
|
||
| - name: Start PostgreSQL | ||
| run: | | ||
| service postgresql start | ||
| psql postgres://geoengine:geoengine@localhost -c "CREATE DATABASE biois;" | ||
| - name: setup rust build cache | ||
| uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| # An explicit cache key that is used instead of the automatic `job`-based | ||
| # cache key and is thus stable across jobs. | ||
| # Default: empty | ||
| shared-key: "" | ||
|
|
||
| # An additional cache key that is added alongside the automatic `job`-based | ||
| # cache key and can be used to further differentiate jobs. | ||
| # Default: empty | ||
| key: ci_test_ | ||
| - name: Test | ||
| run: | | ||
| just install-llvm-cov | ||
| just test-backend-with-coverage "/lcov.info" | ||
| - id: upload-artifact | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: lcov-report-backend-${{ github.run_id }}-${{ github.run_attempt }} | ||
| path: /lcov.info | ||
| compression-level: 9 | ||
| retention-days: 1 | ||
| if-no-files-found: error | ||
|
|
||
| test-frontend: | ||
| name: Test Frontend | ||
|
|
||
| runs-on: ubuntu-24.04 | ||
| container: quay.io/geoengine/devcontainer:latest | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| outputs: | ||
| coverage-artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }} | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| - uses: extractions/setup-just@v3 | ||
| - name: Install dependencies | ||
| run: | | ||
| just install-api-client-deps | ||
| just install-frontend-deps | ||
| - name: Build | ||
| run: just build-frontend | ||
|
|
||
| - name: Test | ||
| run: just test-frontend | ||
|
|
||
| - id: upload-artifact | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: lcov-report-frontend-${{ github.run_id }}-${{ github.run_attempt }} | ||
| path: frontend/coverage/BioIS/lcov.info | ||
| compression-level: 9 | ||
| retention-days: 1 | ||
| if-no-files-found: error | ||
|
|
||
| upload-coverage: | ||
| name: Upload Coverage Report | ||
|
|
||
| runs-on: ubuntu-24.04 | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| needs: | ||
| - test-backend | ||
| - test-frontend | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| - name: Download Backend Coverage Report | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| artifact-ids: ${{ needs.test-backend.outputs.coverage-artifact-id }} | ||
| path: backend/ | ||
| - name: Modify lcov paths | ||
| run: | | ||
| sed -i 's|SF:/__w/BioIS/BioIS/|SF:|' backend/lcov.info | ||
| - name: Download Frontend Coverage Report | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| artifact-ids: ${{ needs.test-frontend.outputs.coverage-artifact-id }} | ||
| path: frontend/ | ||
| - name: Upload coverage to Coveralls | ||
| uses: coverallsapp/github-action@v2 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: "Lint PR" | ||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - edited | ||
|
|
||
| jobs: | ||
| title: | ||
| name: Title | ||
| if: github.event.action == 'opened' || github.event.changes.title.from | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: geo-engine/conventional-pr-title@v1 | ||
| with: | ||
| types: |- | ||
| build | ||
| ci | ||
| docs | ||
| feat | ||
| fix | ||
| perf | ||
| refactor | ||
| test | ||
| scopes: |- | ||
| api-client | ||
| backend | ||
| frontend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.