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

Removed outline and task info from project/id endpoint #1120

Closed
wants to merge 4 commits into from

Conversation

Sujanadh
Copy link
Collaborator

@Sujanadh Sujanadh commented Jan 19, 2024

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

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Related Issue

Describe this PR

This changes removes the inherited ProjectBase schema model from ReadProject where only required fields are defined which excludes outline_geojson and project_tasks.

Response

{
  "id": 54,
  "odkid": 1817,
  "author": {
    "username": "Sujan Adhikari",
    "id": 18427944
  },
  "project_info": {
    "name": "testing sujan ",
    "short_description": "a",
    "description": "a"
  },
  "status": 2,
  "xform_title": "buildings",
  "hashtags": [
    "#FMTM"
  ],
  "organisation_id": 1,
  "project_uuid": "f27c2c4d-4338-41a2-bacc-0945a23afb38",
  "location_str": "Kathmandu,Nepal"
}

Checklist before requesting a review

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

@spwoodcock
Copy link
Member

It's fine to remove the tasks from the response on the backend, but that's a tiny part of the task in issue #935.

Most of the edits are on the frontend, where we need to load the project info first, then progressively load in task data as it's returned.

  • The basic implementation needs coordination with the backend and frontend changes.
  • A more complex implementation may require testing how to load in the task data progressively as it's returned, perhaps using something like StreamingResponse.

@Sujanadh
Copy link
Collaborator Author

Oh okay. Then fetching data in chunks rather than all at once in frontend must be the desired behaviour?

@spwoodcock
Copy link
Member

Possibly! It's probably not worth optimising for now. Only the basic version is necessarily, then we can improve later.

@spwoodcock spwoodcock marked this pull request as draft January 25, 2024 18:35
@spwoodcock
Copy link
Member

Closing for now - we will come back to this and coordinate with the frontend.

@spwoodcock spwoodcock closed this Feb 6, 2024
@spwoodcock spwoodcock deleted the remove-task-info branch August 6, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UX: remove task info from projects/<id> endpoint, call separately
2 participants