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

Feat: Updated endpoints(download-assets) to fetch task assets status. #282

Merged
merged 6 commits into from
Oct 14, 2024

Conversation

Pradip-p
Copy link
Collaborator

@Pradip-p Pradip-p commented Oct 14, 2024

Description

This PR updates drone_flightplan to version 0.3.1 and improves the existing endpoints:

  • Now able to retrieve all tasks and their task assets status for a given project.
  • Allows for the retrieval of individual task status by task_id, or all tasks if no task_id is provided.
  • Fixes deprecation warning: Resolved the deprecated async pool initialization for psycopg. Updated get_db_connection_pool to explicitly call await pool.open() and refactored lifespan to use async with for managing the connection pool lifecycle.

The following warning was addressed:

/project/.venv/lib/python3.11/site-packages/psycopg_pool/pool_async.py:138: RuntimeWarning: opening the async pool AsyncConnectionPool in the constructor is deprecated and will not be supported anymore in a future release. Please use `await pool.open()`, or use the pool as context manager using: `async with AsyncConnectionPool(...) as pool: ...`

@github-actions github-actions bot added enhancement New feature or request backend Related to backend code labels Oct 14, 2024
@Pradip-p Pradip-p changed the title Feat: Updated endpoints(download-assets) to fetch task statuses. Feat: Updated endpoints(download-assets) to fetch task assets status. Oct 14, 2024
Pradip-p and others added 3 commits October 14, 2024 14:24
* fix(task-description): set height to update takeoff point button section

* feat(project-dashboard): udpdate row per page options

* feat(project-dashboard): update map and project card style

* feat(task-description): update assest information api endpoint

* feat(individual-project): get assets list

* feat(individual-project):fetch all assets and modify project details to insert each assets on respective task detail

---------

Co-authored-by: Sujit <sujitkarki703@gmail.com>
@nrjadkry nrjadkry merged commit c5dc954 into develop Oct 14, 2024
2 checks passed
nrjadkry added a commit that referenced this pull request Oct 14, 2024
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/commitizen-tools/commitizen: v3.29.0 → v3.29.1](commitizen-tools/commitizen@v3.29.0...v3.29.1)
- [github.com/astral-sh/ruff-pre-commit: v0.6.7 → v0.6.8](astral-sh/ruff-pre-commit@v0.6.7...v0.6.8)

* feat: added updated at field in task events table

* fix: handle exception if project not found in db

* feat(user-profile): pass watch on form props

* fix(user-profile)-#209: able to submit if the password and confirm password not matched

* fix(user-profile)-#208: validation issue

* feat: added updated_at field  when user request, lock, unlock task

* feat: added updated_at in task details endpoint

* fix: get superuser from user table instead of access token

* feat: update file and folder structure and rename `UserProfile` to `Complete UserProfile`

* refac: remove super user from AuthUser Schemas

* feat: add Breadcrumb component

* feat: replace user-profile layout component and and add new route called complete-profile

* feat: added two new enums such as IMAGE_UPLOADED & IMAGE_PROCESSED

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix(task-description): Remove BLOB middleware for processing result downloads

* fix: issues reslove on updated date

* feat: added change password based on old and new password

* feat(individual-project): post date with other data on task lock/unlock

* feat(task-description): show task locked date

* feat(update-profile): add BasicDetails component

* feat(update-profile): add Header component

* feat(update-profile): add OrganizationDetail component

* feat(update-profile): add Password component

* feat(update-profile): add OtherDetails component

* feat: add common css class main-content that gives the full screen height after reducing the nav bar height

* feat(user-profile): add UpdateUserProfile component

* feat: remove the route `user-profile` add `complete-profile` from the list of routes without navbar

* feat(user-profile): update basic details

* refactor: remove user data fetching on projects page

* refactor(user-profile): revalidate user details data on basic details patch success

* feat: store user details on local storage on fetch success

* feat(user-profile): create user profile patch service

* feat(user-profile): call user details api on userProfile of nav section

* feat(user-profile): update organization details

* feat(user-profile): update other details

* feat(user-profile): update password

* fix: typo

* fix: minor style

* fix: typo

* fix(ser-profile): make patch request on profile data change

* feat(user-profile): show error message

* hot-fix(user-profile): check old & new password before verify the password

* fix: added message if user do not sent old and new password

* refac: exception raise on password check

* feat(user-profile): redirect to complete profile page if the user not completed the signup

* feat(user-profile): redirect to complete profile on google auth success

* fix(user-profile): minor UI

* fix(user-profile): navigate to complete profile only after the profile fetching is completed

* fix: typo

* used presigned url for map screenshot in projects endpoint

* feat: added search features in projects read endpoit

* fix(update-userProfile): update background color

* feat(dashboard): show user role

* feat: updated the task as completed after process from s3

* Feat: updated pagination on list projects (#264)

* feat: updated pagination on list projects

* refactor(project): make fetching query dyanamic so the querykey, params can be pass dynamically

* refactor(project): update project list fetching service params

* feat: add usePagination hook

* feat: add Pagination component

* refactor(dashboard-map-section): remove api call and get project list through props

* feat(project-dashboard): implement pagination on project list

* feat: update searchInput component

* feat(project-dashboard): implement project search

* feat(project-dashboard): make responsive header

* fix: added new pydentic model class for read the single project

---------

Co-authored-by: Sujit <sujitkarki703@gmail.com>

* feat: update task state to reflect the start of image processing

* fix: remove comment from the task update function

* fix: adjust the state based on processing...

* fix: refine the state of task processing

* Feat: Updated the task as completed after process from S3 (#270)

* feat: updated the task as completed after process from s3

* feat: update task state to reflect the start of image processing

* fix: remove comment from the task update function

* fix: adjust the state based on processing...

* fix: refine the state of task processing

* feat(projects): Show status on project card

* feat(dashboard): update UI and pass other project details on project card props

* feat: update the status of each projects on projects list endpoint

* feat(dashboard): show slug on project card

* feat: refine the status of tasks

* feat(project-details): add new status on legend

* feat(project-details): show skeleton on project data fetching

* feat(project-details): fill different color for completed task and image uploaded task

show go to task button

* feat(project-details): show loader on table

* feat(dashboard): make logs table responsive

* feat: add Status chip component

* feat(project-dashboard): show complete status on project card

* feat: fill circle color code from properties on VectorLayerWithCluster component

* feat(project-description): add different color code as per project status on properties of projects geojson

* hotfix: Update project/id to project_id in S3 image processing logic

* feat: reduce table height

* feat(project-details): image processing status text update

* fix(project-details): available tasks not showing on table

behave the task not having state as available tasks

* fix: added asyncio event loop to call async update_task_state in process_images_from_s3

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Feat: Show project status and task status on map and project cards (#272)

* fix(update-userProfile): update background color

* feat(dashboard): show user role

* feat(projects): Show status on project card

* feat(dashboard): update UI and pass other project details on project card props

* feat(dashboard): show slug on project card

* feat(project-details): add new status on legend

* feat(project-details): show skeleton on project data fetching

* feat(project-details): fill different color for completed task and image uploaded task

show go to task button

* feat(project-details): show loader on table

* feat(dashboard): make logs table responsive

* feat: add Status chip component

* feat(project-dashboard): show complete status on project card

* feat: fill circle color code from properties on VectorLayerWithCluster component

* feat(project-description): add different color code as per project status on properties of projects geojson

* feat: reduce table height

* feat(project-details): image processing status text update

* fix(project-details): available tasks not showing on table

behave the task not having state as available tasks

---------

Co-authored-by: Sujit <sujitkarki703@gmail.com>

* fix: resolve RuntimeError for missing event loop in AnyIO worker thread

* hot-fix: minor UI issue on chip

* feat: added asgiref package to convert the async to sync function

* feat(project-description): increase opacity of task completed tasks fill color

* fix: completed task status count

* fix: update ongoing_task_count to count tasks in specific states of projects

* fix: optimize project status calculation logic & update ongoing status count.

* fix(task-description): set height to update takeoff point button section

* feat: added new assets download endpoint

* fix: remove await from assets download endpoint

* fix(task-description): set height to update takeoff point button section (#281)

Co-authored-by: Sujit <sujitkarki703@gmail.com>

* feat: added users authentication

* feat(project-dashboard): udpdate row per page options

* feat(project-dashboard): update map and project card style

* feat(task-description): update assest information api endpoint

* feat(individual-project): get assets list

* feat(individual-project):fetch all assets and modify project details to insert each assets on respective task detail

* Style: update rows per page and set project card column to 3  (#283)

* fix(task-description): set height to update takeoff point button section

* feat(project-dashboard): udpdate row per page options

* feat(project-dashboard): update map and project card style

---------

Co-authored-by: Sujit <sujitkarki703@gmail.com>

* feat(individual-project):add loader

* Feat: Updated endpoints(download-assets) to fetch task assets status. (#282)

* feat: added new assets download endpoint

* fix: remove await from assets download endpoint

* feat: added users authentication

* chore: update verison drone_flightplan to v0.3.1

* fix: resolve deprecated async pool initialization in psycopg

* Feat: Update assets downloading endpoint on individual project (#284)

* fix(task-description): set height to update takeoff point button section

* feat(project-dashboard): udpdate row per page options

* feat(project-dashboard): update map and project card style

* feat(task-description): update assest information api endpoint

* feat(individual-project): get assets list

* feat(individual-project):fetch all assets and modify project details to insert each assets on respective task detail

---------

Co-authored-by: Sujit <sujitkarki703@gmail.com>

---------

Co-authored-by: Sujit <90745363+suzit-10@users.noreply.github.com>
Co-authored-by: Sujit <sujitkarki703@gmail.com>

* fix(project-details): add `/` on api endpoint

* feat(project-description): call assets api only on contirbution tab is on view

* fix: merge conflict

* fix(backend): reslove merge conflict in pyproject.toml

* fix(backend): returns values from calculations function

* fix(backend): reslove merge conflict in pyproject.toml

* fix: update the pdm lock file

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Niraj Adhikari <41701707+nrjadkry@users.noreply.github.com>
Co-authored-by: Sujit <sujitkarki703@gmail.com>
Co-authored-by: Niraj Adhikari <nrjadkry@gmail.com>
Co-authored-by: Sujit <90745363+suzit-10@users.noreply.github.com>
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 frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants