Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c001177
Fix: Render markdown correctly for short descriptions
asmigarg04 Jan 10, 2025
c7b92c0
Made changes to improve maintainibily rating
asmigarg04 Jan 10, 2025
26d16b6
improve maintainability factor
asmigarg04 Jan 10, 2025
be4752a
Fix auto unlocked tasks showing `Resume Mapping` issue
royallsilwallz May 14, 2025
a19db93
fix(projectCard): add supports to render markdown content in project …
Ashik-AD May 19, 2025
c6f7aa3
fix: add project card short description child elements to inherit par…
Ashik-AD May 19, 2025
242487a
Task grid download made file response instead of streaming response
prabinoid May 19, 2025
8723b58
query parameters in the api docs
prabinoid May 22, 2025
facf1ec
black version downgraded to match circle ci and black formatting ran …
prabinoid May 22, 2025
9b7cc22
User search query dto populate by name
prabinoid May 27, 2025
4b31ebf
Task aoi download file response
prabinoid May 27, 2025
e5b4236
Single notification to the users when validating multiple tasks at once
prabinoid May 27, 2025
967e8e4
Fix tab change not working when search filter applied issue
royallsilwallz Jun 2, 2025
cb2a7f1
Merge pull request #6683 from asmigarg04/develop
ramyaragupathy Jun 4, 2025
3f8dce3
Revert "Fix: Render markdown correctly for short descriptions"
ramyaragupathy Jun 4, 2025
a96d747
Merge pull request #6882 from hotosm/revert-6683-develop
ramyaragupathy Jun 4, 2025
4d6bc9d
Refactor/Fix: FE Dockerfile
nischalstha9 May 27, 2025
67e413c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 27, 2025
d0e7531
ci: fix CI on basis of new Dockerfile refactor
nischalstha9 May 27, 2025
533308e
feat: refactor/changes for hot-reload feature in frontend during deve…
nischalstha9 Jun 4, 2025
29dd901
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2025
bc0840d
Merge pull request #6879 from hotosm/ns/refactor/FE
nischalstha9 Jun 5, 2025
e8e9038
Remove Live Monitoring Data Quality feature (deprecated)
emi420 Jun 9, 2025
dca0242
Remove unused imports
royallsilwallz Jun 12, 2025
98c2586
Merge pull request #6863 from Ashik-AD/fix/6674-incorrect-project-des…
ramyaragupathy Jun 12, 2025
0330de3
Merge pull request #6892 from hotosm/fix/6761-auto-unlock-task-crash-…
ramyaragupathy Jun 12, 2025
a839eff
Merge pull request #6891 from hotosm/fix/6865-tabs-not-accessible-whe…
ramyaragupathy Jun 12, 2025
63d33c9
Upgrade iD editor version to latest (v2.34.0)
royallsilwallz Jun 12, 2025
6badeb3
Merge pull request #6889 from hotosm/feature/removeLiveMonitoringDQ
ramyaragupathy Jun 12, 2025
3883e61
Fix `Manage` section not displaying on smaller screen issue
royallsilwallz Jun 13, 2025
173f7db
black version restored
prabinoid Jun 13, 2025
5d71388
Merge pull request #6880 from hotosm/feature-development
ramyaragupathy Jun 16, 2025
d278641
Merge pull request #6881 from hotosm/fix/validation-notifications
ramyaragupathy Jun 16, 2025
285aefc
roadmap file update
ramyaragupathy Jun 17, 2025
39f8dbd
Merge pull request #6902 from hotosm/roadmap-update
ramyaragupathy Jun 17, 2025
8b918fd
Merge pull request #6903 from hotosm/fix/6864-manage-section-on-small…
ramyaragupathy Jun 17, 2025
69d6f52
Merge pull request #6893 from hotosm/chore/upgrade-id-editor-v2.34.0
ramyaragupathy Jun 17, 2025
061cb30
Merge pull request #6904 from hotosm/develop
ramyaragupathy Jun 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/backend-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
context: "{{defaultContext}}"
target: prod
platforms: linux/amd64,linux/arm64
file: scripts/docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/backend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ jobs:
with:
image_name: ghcr.io/${{ github.repository }}/backend
build_target: prod
dockerfile: scripts/docker/Dockerfile
10 changes: 10 additions & 0 deletions .github/workflows/frontend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,13 @@ jobs:
name: tm-fe-${{ github.sha }}
path: ./frontend/build
retention-days: 2

frontend-dev-image-build:
name: Build dev image for testing
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
with:
image_name: ghcr.io/${{ github.repository }}/frontend
build_target: debug
dockerfile: scripts/docker/Dockerfile.frontend
scan_image: false
scan_dockerfile: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Configuration files #
tasking-manager*.env
.env

# Generated frontend #
frontend/node_modules/
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ Status | Feature | Release
-------|---------|---------
βœ… | Up-to-date OSM Statistics: Integrated with [ohsome Now](https://stats.now.ohsome.org/) for real-time data insights.| Released in [v4.6.2](https://github.com/hotosm/tasking-manager/releases/tag/v4.6.2).
βœ… | Downloadable OSM Exports: Export data directly from each project. | Available in[ v4.7.0](https://github.com/hotosm/tasking-manager/releases/tag/v4.7.0).
βœ… | Live Data Quality Monitoring: Monitor project data quality in real-time. | Introduced in [v4.7.2](https://github.com/hotosm/tasking-manager/releases/tag/v4.7.2).
βœ… | Rapid Editor Upgrade: Enhanced mapping experience with the latest rapid editor updates.
βœ… | Public-Facing Partner Pages: Create and display dedicated pages for partners running remote mapathons.
βœ… | Downloadable Project List View: Allow users to explore projects via a downloadable list. [View issue](https://github.com/hotosm/tasking-manager/issues/3394).
βœ… | MapSwipe Stats Integration: Display MapSwipe statistics on Partner Pages.
βœ… | iD Editor Latest Features: Integrate the newest features of the iD editor.
πŸ”„ | FastAPI Migration: Improve performance and scalability of Tasking Manager to handle large scale validation and mapping efforts.
βœ… | Rapid Editor Upgrade: Enhanced mapping experience with the latest rapid editor updates.| Last updated in [v4.8.2](https://github.com/hotosm/tasking-manager/releases/tag/v4.8.2)
βœ… | Public-Facing Partner Pages: Create and display dedicated pages for partners running remote mapathons.| [v4.8.2](https://github.com/hotosm/tasking-manager/releases/tag/v4.8.2)
βœ… | Downloadable Project List View: Allow users to explore projects via a downloadable list. [View issue](https://github.com/hotosm/tasking-manager/issues/3394).| [v4.8.2](https://github.com/hotosm/tasking-manager/releases/tag/v4.8.2)
βœ… | MapSwipe Stats Integration: Display MapSwipe statistics on Partner Pages.|[v4.8.2](https://github.com/hotosm/tasking-manager/releases/tag/v4.8.2)
βœ… | iD Editor Latest Features: Integrate the newest features of the iD editor.|[v5.0.5](https://github.com/hotosm/tasking-manager/releases/tag/v5.0.5)
βœ… | FastAPI Migration: Improve performance and scalability of Tasking Manager to handle large scale validation and mapping efforts.| [v5 launch πŸŽ‰](https://github.com/hotosm/tasking-manager/releases/tag/v5.0.0)
πŸ”„ | Super Mapper: Redefine Mapper Level Milestones
πŸ”„ | OSM Practice Projects: Enable users to engage in OSM practice projects within Tasking Manager workflow.
πŸ“… | Expanding Project Types beyond basemap features
Expand Down
15 changes: 8 additions & 7 deletions backend/api/comments/resources.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from databases import Database
from fastapi import APIRouter, BackgroundTasks, Depends, Request
from fastapi import APIRouter, BackgroundTasks, Depends, Request, Query
from fastapi.responses import JSONResponse
from loguru import logger

Expand Down Expand Up @@ -95,8 +95,13 @@ async def post_comment(


@router.get("/{project_id}/comments/")
async def ge_comments(
request: Request, project_id: int, db: Database = Depends(get_db)
async def get_comments(
project_id: int,
page: int = Query(1, description="Page of results user requested"),
per_page: int = Query(
20, alias="perPage", description="Number of elements per page"
),
db: Database = Depends(get_db),
):
"""
Get all chat messages for a project
Expand Down Expand Up @@ -131,10 +136,6 @@ async def ge_comments(
description: Internal Server Error
"""
await ProjectService.exists(project_id, db)
page = (
int(request.query_params.get("page")) if request.query_params.get("page") else 1
)
per_page = int(request.query_params.get("perPage", 20))
project_messages = await ChatService.get_messages(project_id, db, page, per_page)
return project_messages

Expand Down
12 changes: 9 additions & 3 deletions backend/api/issues/resources.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from databases import Database
from fastapi import APIRouter, Body, Depends, Request
from fastapi import APIRouter, Body, Depends, Request, Query
from fastapi.responses import JSONResponse
from loguru import logger

Expand Down Expand Up @@ -164,7 +164,14 @@ async def delete_issue(


@router.get("/issues/categories/")
async def get_issues_categories(request: Request, db: Database = Depends(get_db)):
async def get_issues_categories(
include_archived: bool = Query(
False,
alias="includeArchived",
description="Optional filter to include archived categories",
),
db: Database = Depends(get_db),
):
"""
Gets all mapping issue categories
---
Expand All @@ -184,7 +191,6 @@ async def get_issues_categories(request: Request, db: Database = Depends(get_db)
500:
description: Internal Server Error
"""
include_archived = request.query_params.get("includeArchived") == "true"
categories = await MappingIssueCategoryService.get_all_mapping_issue_categories(
include_archived, db
)
Expand Down
16 changes: 11 additions & 5 deletions backend/api/notifications/actions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from databases import Database
from fastapi import APIRouter, Depends, Request
from fastapi import APIRouter, Depends, Request, Query
from fastapi.responses import JSONResponse

from backend.db import get_db
Expand Down Expand Up @@ -60,7 +60,11 @@ async def delete_multiple_notifications(

@router.delete("/delete-all/")
async def delete_all_notifications(
request: Request,
message_type: str = Query(
None,
alias="messageType",
description="Optional message-type filter; leave blank to delete all",
),
db: Database = Depends(get_db),
user: AuthUserDTO = Depends(login_required),
):
Expand Down Expand Up @@ -88,15 +92,18 @@ async def delete_all_notifications(
500:
description: Internal Server Error
"""
message_type = request.query_params.get("messageType")
async with db.transaction():
await MessageService.delete_all_messages(user.id, db, message_type)
return JSONResponse(content={"Success": "Messages deleted"}, status_code=200)


@router.post("/mark-as-read-all/")
async def mark_all_as_read(
request: Request,
message_type: str = Query(
None,
alias="messageType",
description="Optional message-type filter; leave blank to mark all as read",
),
user: AuthUserDTO = Depends(login_required),
db: Database = Depends(get_db),
):
Expand Down Expand Up @@ -124,7 +131,6 @@ async def mark_all_as_read(
500:
description: Internal Server Error
"""
message_type = request.query_params.get("messageType")
await MessageService.mark_all_messages_read(user.id, db, message_type)
return JSONResponse(content={"Success": "Messages marked as read"}, status_code=200)

Expand Down
59 changes: 49 additions & 10 deletions backend/api/notifications/resources.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from databases import Database
from fastapi import APIRouter, Depends, Request
from fastapi import APIRouter, Depends, Request, Query
from fastapi.responses import JSONResponse

from backend.db import get_db
Expand Down Expand Up @@ -117,6 +117,53 @@ async def get_notifications(
request: Request,
db: Database = Depends(get_db),
user: AuthUserDTO = Depends(login_required),
message_type: str | None = Query(
default=None,
description=(
"Optional message-type filter; leave blank to retrieve all.\n"
"Accepted values: 1 (System), 2 (Broadcast), 3 (Mention), 4 (Validation),\n"
"5 (Invalidation), 6 (Request team), 7 (Invitation), 8 (Task comment),\n"
"9 (Project chat), 10 (Project Activity), 11 (Team broadcast)"
),
alias="messageType",
),
from_username: str | None = Query(
default=None,
alias="from",
description="Optional from username filter",
),
project: str | None = Query(
default=None,
description="Optional project filter",
),
task_id: int | None = Query(
default=None,
description="Optional task filter",
alias="taskId",
),
status: str | None = Query(
default=None,
description="Optional status filter (read or unread)",
),
sort_by: str = Query(
default="date",
description="Field to sort by. Options: 'date', 'read', 'project_id', 'message_type'",
alias="sortBy",
),
sort_direction: str = Query(
default="desc",
description="Sorting direction: 'asc' or 'desc'",
alias="sortDirection",
),
page: int = Query(
default=1,
description="Page number",
),
page_size: int = Query(
default=10,
alias="pageSize",
description="Number of results per page",
),
):
"""
Get all messages for logged in user
Expand Down Expand Up @@ -182,15 +229,7 @@ async def get_notifications(
description: Internal Server Error
"""
preferred_locale = request.headers.get("accept-language")
page = request.query_params.get("page", 1)
page_size = request.query_params.get("pageSize", 10)
sort_by = request.query_params.get("sortBy", "date")
sort_direction = request.query_params.get("sortDirection", "desc")
message_type = request.query_params.get("messageType", None)
from_username = request.query_params.get("from")
project = request.query_params.get("project", None)
task_id = request.query_params.get("taskId", None)
status = request.query_params.get("status", None)

user_messages = await MessageService.get_all_messages(
db,
user.id,
Expand Down
37 changes: 23 additions & 14 deletions backend/api/partners/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Optional

from databases import Database
from fastapi import APIRouter, Depends, Request
from fastapi import APIRouter, Depends, Query
from fastapi.responses import StreamingResponse

from backend.db import get_db
Expand All @@ -27,8 +27,19 @@ def is_valid_group_id(group_id: Optional[str]) -> bool:

@router.get("/{permalink:str}/filtered-statistics/")
async def get_filtered_statistics(
request: Request,
permalink: str,
from_date: str | None = Query(
default=None,
alias="fromDate",
description="Fetch partner statistics from date as yyyy-mm-dd",
example="2024-01-01",
),
to_date: str | None = Query(
default=None,
alias="toDate",
description="Fetch partner statistics to date as yyyy-mm-dd",
example="2024-09-01",
),
db: Database = Depends(get_db),
):
"""
Expand Down Expand Up @@ -66,9 +77,6 @@ async def get_filtered_statistics(
500:
description: Internal Server Error
"""
mapswipe = MapswipeService()
from_date = request.query_params.get("fromDate")
to_date = request.query_params.get("toDate")

if from_date is None:
raise BadRequest(
Expand Down Expand Up @@ -102,15 +110,22 @@ async def get_filtered_statistics(
message=MAPSWIPE_GROUP_EMPTY_MESSAGE,
)

mapswipe = MapswipeService()
return mapswipe.fetch_filtered_partner_stats(
partner.id, partner.mapswipe_group_id, from_date, to_date
)


@router.get("/{permalink:str}/general-statistics/")
async def get_general_statistics(
request: Request,
permalink: str,
limit: int = Query(10, description="The number of partner members to fetch"),
offset: int = Query(
0, description="The starting index from which to fetch partner members"
),
download_as_csv: bool = Query(
False, alias="downloadAsCSV", description="Download users in this group as CSV"
),
db: Database = Depends(get_db),
):
"""
Expand Down Expand Up @@ -152,8 +167,6 @@ async def get_general_statistics(
500:
description: Internal Server Error
"""

mapswipe = MapswipeService()
partner = await PartnerService.get_partner_by_permalink(permalink, db)

if not is_valid_group_id(partner.mapswipe_group_id):
Expand All @@ -162,10 +175,7 @@ async def get_general_statistics(
message=MAPSWIPE_GROUP_EMPTY_MESSAGE,
)

limit = int(request.query_params.get("limit", 10))
offset = int(request.query_params.get("offset", 0))
download_as_csv = bool(request.query_params.get("downloadAsCSV", "false") == "true")

mapswipe = MapswipeService()
group_dto = mapswipe.fetch_grouped_partner_stats(
partner.id,
partner.mapswipe_group_id,
Expand All @@ -176,9 +186,8 @@ async def get_general_statistics(

if download_as_csv:
csv_content = group_dto.to_csv()
csv_buffer = io.StringIO(csv_content)
return StreamingResponse(
content=csv_buffer,
content=io.StringIO(csv_content),
media_type="text/csv",
headers={"Content-Disposition": "attachment; filename=partner_members.csv"},
)
Expand Down
9 changes: 4 additions & 5 deletions backend/api/projects/activities.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from databases import Database
from fastapi import APIRouter, Depends, Request
from fastapi import APIRouter, Depends, Request, Query

from backend.db import get_db
from backend.services.project_service import ProjectService
Expand All @@ -14,7 +14,9 @@

@router.get("/{project_id}/activities/")
async def get_activities(
request: Request, project_id: int, db: Database = Depends(get_db)
project_id: int,
page: int = Query(1, description="Page of results user requested", ge=1),
db: Database = Depends(get_db),
):
"""
Get all user activity on a project
Expand Down Expand Up @@ -43,9 +45,6 @@ async def get_activities(
description: Internal Server Error
"""
await ProjectService.exists(project_id, db)
page = (
int(request.query_params.get("page")) if request.query_params.get("page") else 1
)
activity = await StatsService.get_latest_activity(project_id, page, db)
return activity

Expand Down
Loading
Loading