Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 26, 2024
1 parent 963479c commit 9972a4e
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
# Cleanup db upgrade containers
docker compose --file contrib/pg-upgrade/docker-compose.yml down
docker compose --file docker-compose.vm.yml --env-file .env up \
--detach --remove-orphans --force-recreate --pull=always
env:
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->


**Drone TM** is an integrated digital public good solution designed to harness
the power of the crowd to generate high-resolution aerial maps of any location.

This innovative platform provides drone pilots, particularly in developing
countries, with job opportunities while contributing to the creation of
This innovative platform provides drone pilots, particularly in developing
countries, with job opportunities while contributing to the creation of
high-resolution datasets crucial for disaster response and community resilience.

## Problem Statement
Expand Down
1 change: 0 additions & 1 deletion docs/INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# Installation Guide

1 change: 0 additions & 1 deletion docs/about/about.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# 📖 History

2 changes: 1 addition & 1 deletion docs/about/team.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# The Drone TM Team
# The Drone TM Team
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ nav:
- Contribution Guidelines: CONTRIBUTING.md
- Code of Conduct: https://docs.hotosm.org/code-of-conduct
- FAQ: about/faq.md
- The Team: about/team.md
- The Team: about/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ <h1>{{ email_subject }}</h1>
</div>
<div class="content">
<p>Dear {{ drone_operator_name }},</p>
<p>
{{ email_body }}
</p>
<p>{{ email_body }}</p>
<p>Please find below the details of the {{ task_status }} task:</p>
<div class="task">
<h2>{{ task_status|capitalize }} Task Details</h2>
Expand All @@ -127,7 +125,9 @@ <h2>{{ task_status|capitalize }} Task Details</h2>
<p><strong>Description:</strong> {{ description }}</p>
</div>
{% if task_status == 'approved' %}
<a href="https://dronetm-dev.naxa.com.np" class="task-button">Start Mapping</a>
<a href="https://dronetm-dev.naxa.com.np" class="task-button"
>Start Mapping</a
>
{% endif %}
</div>
</div>
Expand Down
7 changes: 3 additions & 4 deletions src/backend/app/email_templates/mapping_requests.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,10 @@ <h1>Drone Tasking Manager Invite</h1>
<div class="task">
<h2>Mapping Task Details</h2>
<div class="task-details">
<p><strong>Drone Operator:</strong> {{drone_operator_name}} </p>
<p><strong>Task ID:</strong> {{task_id}} </p>
<p><strong>Drone Operator:</strong> {{drone_operator_name}}</p>
<p><strong>Task ID:</strong> {{task_id}}</p>
<p><strong>Project:</strong>{{project_name}}</p>
<p>
<strong>Description:</strong> {{description}}</p>
<p><strong>Description:</strong> {{description}}</p>
</div>
<a href="https://dronetm-dev.naxa.com.np" class="task-button"
>Start Mapping</a
Expand Down
12 changes: 4 additions & 8 deletions src/backend/app/projects/project_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from app.s3 import s3_client
from app.config import settings
from databases import Database
from app.db import db_models
from shapely.geometry import shape, mapping
from shapely.ops import unary_union

Expand Down Expand Up @@ -55,15 +54,12 @@ async def delete_project_by_id(
)
SELECT id FROM deleted_project
"""

result = await db.fetch_one(
query=delete_query,
values={"project_id": project_id}
)


result = await db.fetch_one(query=delete_query, values={"project_id": project_id})

if not result:
raise HTTPException(status_code=404)

return {"message": f"Project ID: {project_id} is deleted successfully."}


Expand Down
4 changes: 1 addition & 3 deletions src/backend/app/tasks/task_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@


@router.get("/states/{project_id}")
async def task_states(
project_id: uuid.UUID, db: Database = Depends(database.get_db)
):
async def task_states(project_id: uuid.UUID, db: Database = Depends(database.get_db)):
"""Get all tasks states for a project."""

return await task_crud.all_tasks_states(db, project_id)
Expand Down
12 changes: 2 additions & 10 deletions src/backend/app/users/user_deps.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import jwt
from typing import Annotated
from fastapi import Depends, HTTPException, Request, status, Header
from fastapi.security import OAuth2PasswordBearer
from jwt.exceptions import InvalidTokenError
from pydantic import ValidationError
from sqlalchemy.orm import Session
from fastapi import HTTPException, Request, Header
from app.config import settings
from app.db import database
from app.users import user_crud, user_schemas
from app.db.db_models import DbUser
from app.users import user_crud
from app.users.auth import Auth
from app.users.user_schemas import AuthUser
from loguru import logger as log
Expand Down

0 comments on commit 9972a4e

Please sign in to comment.