Skip to content
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

Create get api for project's geometry log #2090

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

Sujanadh
Copy link
Collaborator

@Sujanadh Sujanadh commented Jan 15, 2025

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation
  • πŸ§‘β€πŸ’» Refactor
  • βœ… Test
  • πŸ€– Build or CI
  • ❓ Other (please specify)

Related Issue

Describe this PR

New get api to retrieve all the geometry logs stored for bad and new geom.
Endpoint: GET /project/{project_id}/geometry/records

Response

[
  {
    "status": "NEW",
    "geojson": {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              85.318679,
              27.702891
            ],
            [
              85.31865,
              27.70259
            ],
            [
              85.318824,
              27.70256
            ],
            [
              85.318853,
              27.702873
            ],
            [
              85.318679,
              27.702891
            ]
          ]
        ]
      },
      "properties": {}
    },
    "project_id": 7,
    "task_id": null
  },
  {
    "status": "NEW",
    "geojson": {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              83.982313,
              28.233884
            ],
            [
              83.982358,
              28.233839
            ],
            [
              83.98244,
              28.233964
            ],
            [
              83.98239,
              28.233994
            ],
            [
              83.982313,
              28.233884
            ]
          ]
        ]
      },
      "properties": {
        "instance_id": "8sveg3348gjlafbrk54ohag5han8"
      }
    },
    "project_id": 7,
    "task_id": null
  }
]

Alternative Approaches Considered

Did you attempt any other approaches that are not documented in code?

Review Guide

Notes for the reviewer. How to test this change?

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

@Sujanadh Sujanadh self-assigned this Jan 15, 2025
@github-actions github-actions bot added enhancement New feature or request backend Related to backend code labels Jan 15, 2025
Copy link
Member

@spwoodcock spwoodcock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, just minor doc changes would be very helpful for users browsing the API (frontend devs probably!) πŸ‘

src/backend/app/projects/project_routes.py Outdated Show resolved Hide resolved
src/backend/app/projects/project_routes.py Outdated Show resolved Hide resolved
@spwoodcock
Copy link
Member

Looks like the backend tests are failing due due to some devops related reason too 😒

@spwoodcock spwoodcock merged commit 5e8753b into development Jan 15, 2025
5 checks passed
@spwoodcock spwoodcock deleted the feat/get-geometrylog-api branch January 15, 2025 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants