Skip to content

Commit

Permalink
Merge Development --> Staging (#1526)
Browse files Browse the repository at this point in the history
* fix (frontend): remove usage of encode and decode of id's (#1387)

* fix: project edit form update validation (#1397)

* feat formUpdateTab: form validation api add

* fix projectDetails: toggle debug console btn replaced with checkbox

* fix project: consoles remove

* fix (frontend): required fields, description word limit, odk cred input (#1404)

* feat select: required mark add

* feat projectDetailsForm: organization name select field required

* fix projectDetailsForm: display odk fields if no odk-credentials

* feat textArea: character length limit & current character length display in textArea

* feat projectDescription: short description character length limit set to 200 characters

* fix: update task activity endpoint (#1406)

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* fix: more informative browser tab titles/details (#1411)

* feat useDocumentTitle - hook to dynamically set document title

* feat documentTitle: document title add across all pages

* feat projectDetails: dynamic project name display on document title

* fix: default UNDERPASS_API_URL no trailing slash

* build: revert v2024.3.0 --> v2024.1.0

* bump: version 2024.1.0 → 2024.2.0

* fix: return proper error message if form edit is invalid (#1415)

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* refactor: response of update task status and added user info in task history (#1419)

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* Return task history instead of db task  (#1421)

* refactor: response of update task status and added user info in task history

* fix: return task history instead of db task

---------

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* fix: project name editing validation (#1416)

* fix: edit project name

* feat: calculate prefix name in partial update schema

---------

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* docs: extra info on production data backup / restore

* docs: add section for example xlsforms

* docs: fix links for example xlsforms

* docs: update info about example xlsforms

* docs: link to correct form for each example xlsform/survey

* docs: link for additional info about monrovia xlsform

* refactor: task comment response and schema (#1423)

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* feat: implement ODK Entities for project creation (#1383)

* feat: add route to convert geojson --> odk csv format

* build: add public.xforms table for future multiple form per project

* build: update osm-fieldwork --> 0.6.1 for entities support

* feat: refactor project creation to use entities

* refactor: features and submission counts per task

* refactor: support all geometry type for javarosa geom and add state in nominatim

* refactor: added project_id as a foreign key to xforms table

* build: relock dependencies after merge

* feat: add helper route to convery odk submission json --> geojson

* fix: rename DbXForm.form_id --> odk_form_id

* feat: add javarosa_to_geojson_geom conversion func

* build: rename form_id --> odk_form_id in db

* feat: load odk collect with entity prefilled by intent link

* refactor: run pre-commit hooks formatting

* build: add migration to set odk_token on project, not per task

* fix: frontend

build qrcode based on project, not task

* refactor: remove generating project log (as performance improvements)

* feat: helper route to convert javarosa geom --> geojson

* build: update osm-fieldwork --> 0.7.0

* fix: working entity generation during project creation

* test: fix test for project creation flow

* fix: foreign key refernce for DbXForm to project_id

---------

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* build: make xform migration fully idempotent

* refactor: merged multi polygon to single polygon (#1426)

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* build: add helm chart for deployment in Kubernetes (#1427)

* fix: add favicon.ico to public frontend dir

* fix: make ENCRYPTION_KEY variable mandatory for settings

* docs: update project description

* build: add basic helm chart for deployment

* fix: add odk_token from projectInfo to qrcode creation

* build: fix add runAsUser to helm securityContext for codecov to pass

* ci: update all workflows --> 1.4.10 (fix checkcov false positives)

* fix(backend): allow missing odk_token for project, but log warning

* feat: Playwright integration with test cases to be written (#1433)

* feat: Playwright integration

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* docs: update info in helm chart readme, creating vars + namespace

* build: update osm-login-python --> 1.0.3 for error handling + flexible deps

* fix: project details mobile UI, user details in header (#1407)

* fix projectDetails: task popup padding fix, legend accordion padding fix

* fix projectDetails: mobile UI shift issue fix

* fix projectDetails: tiles set to bottom in large screen

* fix projectDetails: mobile UI bottom sheet margin bottom reduce

* fix primaryAppBar: logo width adjustment for mobile screen

* fix mappingHeader: remove css helper outline toggle

* fix primaryAppBar: user profile display on app bar for mobile screen

* fix projectDetails: increase bottom sheet margin bottom for mobile ui

* fix projectDetails: UI fix for map rotate icon

* feat assetModules: icon add

* feat qrCodeComponent: download qr btn add to mobile UI popup

* fix taskSectionPopup: modal shadow visible on modal close issue solve

* feat projectDetails: download button add to mapControlComponent & layerSwitcher placed down

* feat mobileProjectInfoContent: manage-project btn add

* feat projectDetails: download toggle btn UI fix

* fix taskSectionPopup: component placement above mobile footer

* fix projectOptions: remove buttons

* feat assetModules: barChart icon add

* feat mobileFooter: infographic footer item add, comment footer item shown conditionally, zIndex fix

* fix bottomSheet: zIndex fix

* fix mobileFooter: params id fix

* fix mobileProjectInfoContent: dynamic projectId for redirection to manage-project

* fix comments: comments keys & type fix according to backend response

* fix toolbar: dropdown zIndex issue fix

* fix primaryAppBar: sign-in btn show on small devices

* fix: add optional auth to raw-data-api calls, plus folder structure for persistence (#1431)

* build: update osm-rawdata for better error handling --> 0.2.4

* feat: enable raw-data-api osm auth for folder structure retain

* fix: only use folder structure for raw-data-api if auth

* fix: correctly return OSM_SVC_ACCOUNT_TOKEN in config, if set

* build: relock backend dependencies after rebase

* fix: data extract upload url with slash for s3

* fix: update logic for more flexible submission json --> geojson

* build: relock frontend dependencies to fix build

* build: add instructions for using Playwright frontend E2E tests (#1439)

* docs: add instructions for running playwright tests

* build: relock frontend deps after playwright install

* ci: add playwright test config to ci pr tests

* ci: remove demo playwright ci config

* refactor: move demo playwright file to different dir

* ci: update all workflows --> yml@1.5.0 (for playwright integration)

* test: add exclusions for vitest directories (skip e2e tests)

* fix: filter task_history endpoint using task_id (#1436)

* refactor: use task_id to get task_history

* refactor: added project_id param in path

---------

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* build: add Mozilla Dockerflow spec endpoints for devops systems (#1444)

* fix: XLSForm template download endpoint for specified categories (#1441)

* feat: add /projects/features endpoint for project FeatureCollection (disaster.ninja integration) (#1442)

* refactor: move tasks/features endpoint --> projects/{id}/task-completion

* fix(backend): coerce invalid osm_id integers by removing non-numeric chars

* refactor(frontend): rename project_details page --> project

* feat: add /projects/features/ endpoint to get FeatureCollection

* fix(backend): /projects/features handle empty featcol, hide private projects

* fix(backend): hide projects from home page where visibility!=PUBLIC

* fix: handle multipolygon geometries for project area (#1430)

* fix: choose area as task for multipolygon geojson

* fix_pytest: used featurecollection from geojson to change multi to single polygon

* refactor: created two separate convert and merge multipolygon func and refactor endpoints

* fix_pytest: reformatted outline input

* refactor: repeated code while parsing geojson and fix pytest

---------

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* feat: temporary authentication login for mappers (svcfmtm) (#1410)

* feat: temporary authentication login

* refactor: use osm auth instead of separate jwt

* feat: added svcfmtm token in config setting

* fix: changed access to update tasks status from mapper to login_required

* refactor: removed hard_coded str, added email as an extra param

* feat: replace svcfmtm user with localadmin, use svcfmtm as passwordless user

* refactor: replace svcfmtm usage with localadmin for tests + debug

* feat: added mapper to endpoints,changed osm svc account token variable

* fix: changed localadmin id from 0 to 1

* refactor: reorder task_routes imports via ruff pre-commit

---------

Co-authored-by: sujanadh <sujanadh07@gmail.com>
Co-authored-by: spwoodcock <sam.woodcock@protonmail.com>

* refactor: replace unecessary outline_centroid for tasks with ol.extent.getCenter (#1447)

* fix: activity comment api calls in frontend (#1435)

* feat project: api add to fetch taskActivity

* feat activitiesPanel: getProjectTaskActivity api integration, state update for activityList display

* feat projectType: update project types, add taskActivity and taskBoundries types

* fix comments: comment list fetch from task_history api

* fix projectCommentsList: ts type update

* fix activitiesPanel: decode params id remove

* fix projectDetails: show projecInfo and comments only if task selected

* fix activitiesPanel: get taskHistory of selected tasks only

* feat projectSlice: updateProjectTaskActivity action add to update projectTaskActivity

* fix projectTaskStatus: replace previous taskActivity update approach by updateProjectTaskActivity action call

* fix dialogTaskActions: retrieve taskActivity from projectTaskActivity & update logic to update taskActivity btn according to status

* fix activitiesPanel: remove unsued variables, getTaskActivity api replace, update setHistories logic, update zoomToTask logic

* fix comments: getProjectComments api replace

* fix: fix list-forms endpoint logic to return list of dicts

* feat: endpoints for getting Entity data & updating Entity mapping status (#1445)

* feat: add endpoint for easy entities upload from csv file

* build: update osm-fieldwork --> 0.8.0 for latest entities code

* feat: add logic to get project entities, get and update entity mapping status

* feat: add project/entities and project/entity-mapping-status endpoints

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

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

* refactor: move entities pydantic models to central_schemas

* build: update osm-fieldwork --> 0.8.1 for getEntity method

* fix: fix list-forms endpoint logic to return list of dicts

* fix: add default status=0 (READY) during entity creation

* feat: endpoints for getting and updating entity status

* refactor: rename new_status endpoint --> new-status

* refactor: pass through DbProject to generate_project_files instead of id

* refactor: update task history sql to use params over f-string

* build: remove unused index.html in frontend src dir

* fix(frontend): correctly load favicon.ico using root url '/favicon.ico'

* refactor: change api url tasks/task_history --> tasks/task-history

* fix(frontend): loading of data extract correctly when task area clicked

* fix(backend): logic for updating task state after locked by user id

* refactor: rename TaskSectionPopup --> TaskSelectionPopup

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* docs: add roadmap badge to main readme

* docs: fix roadmap badge emoji for readme

* docs: update link to roadmap in readme

* fix (backend): add custom TMS url during project creation (#1446)

* feat:added tms_url in project model

* feat: added custom tms url in the project detail response

---------

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* fix: role mapper to login required in data extract (#1450)

Co-authored-by: sujanadh <sujanadh07@gmail.com>

* docs: update svg label for roadmap badge, task board --> roadmap

* build: enforce --encoding utf8 on pg_dump database backups

* docs: add link to roadmap in docs sidebar

* docs: update link to roadmap to roadmap.fmtm.dev

* docs: add user/dev roadmaps, timeline, update readme badges

* ci: add action to move assigned tasks to board In Progress column

* ci: remove workflow to for assignment due to insufficient token permissions

* docs: add public beta to timeline

* fix (frontend): working task history button status updates (#1457)

* fix(ActivitiesPanel): taskHistory api fetch remove

* fix(DialogTaskActions): taskHistory api fetch add

* fix(ProjectTaskStatus): updateTaskStatus respnonse message status retrieval update

* feat: append extra hashtag to projects with domain and project id identifier (#1454)

* fix: fix hashtags not appending if no tags provided

* fix: add extra hashtag {domain}-{project_id} for easy identify

* fix(frontend): invalidate login if mismatch between existing and new user login (#1462)

* fix: basemap tile download, refactor to use /{project_id}/name (#1467)

* feat: distinguish between tasks locked by the current user and tasks locked by others (#1469)

* feat(mapStyles): add secondaryColor of red if task is locked by user itself

* feat(projectDetails): popup add if task locked by user itselft, arg add to getTaskStatusStyle

* fix(mapStyles): zIndex of locked task increase

* fix(mapStyles): strokeColor change to black

* feat(asyncPopup): dynamic popupId & className add

* fix(projectDetails): popupId & className add to asyncPopup props

* fix(ProjectTaskStatus): assign & clear userId to locked_by_user based on taskStatus

* feat: frontend buttons to load Entities in ODK Collect by intent (#1449)

* feat: add endpoint for easy entities upload from csv file

* feat: add logic to get project entities, get and update entity mapping status

* feat: add project/entities and project/entity-mapping-status endpoints

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

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

* feat: endpoints for getting and updating entity status

* feat: add endpoint for minimal entity_uuid:osm_id mapping

* fix(backend): handle cases when select_one_from_file is either geojson or csv

* feat(frontend): add popup for task feature (entity) selection with link to odk by intent

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

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

* fix(backend): handle edge case when task area contains no geometries (fmtm-splitter #28)

* build: update osm-fiedwork --> v0.8.2

* refactor: wrap usage of OdkEntity in helper func with error handling

* refactor: directly pass project_info to model during proj create

* refactor: simplify project creation, divide into separate odk function

* refactor: rename state osm:entity mapping var for clarity

* refactor: change label on odk intent button --> map feature in odk

* fix(backend): functions to update existing xform after entity update

* refactor(frontend): allow default odk creds label to be clicked to toggle

* fix(backend): do not pretty print final odk xml (minify)

* build: upgrade osm-fieldwork --> 0.9.0 for entities workflow

* refactor: update references to osm_fieldwork entity registration form

* fix: update xform manipulation to factor in entities fields

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* feat (frontend): add custom tms url linked to a project (#1464)

* feat(projectDetialsForm): add customTmsUrl field

* feat(createProjectValidation): custom_tms_url validation add to verify if url present on tsm_checkbox check & verify valid url

* feat(createProject): custom_tms_url & hasCustomTMS types and state add to projectDetails

* feat(splitTasks): append custom_tms_url during project creation as a parameter

* feat(project): set custom_tms_url to projectInfo state on response

* feat(generateBasemap): set selectedTileSource to tms and set tmsURL if custom tms url associated with the project

* feat(layerSwitcher): tms layer add to layerGroup if tmsUrl associated with the project

* fix(frontend): do not call introspect endpoint on /osmauth callback

* feat(frontend): login options to frontend, OSM or temp auth (#1458)

* fix(signIn): on signIn click dispatch action to open modal

* feat(loginPopup): loginPopup add to show tempLogin & osmLogin option

* fix(login): action to handle login modal toggle

* feat(login): temporaryLoginService add for temporary login

* feat(osmLogo): osm logo add

* feat(LoginPopup): image & description add to loginOptions

* fix(modal): dialog content text set to left

* fix(osm-logo): high resolutions osm-logo replaced with low resolution

* fix: login methods after temp cookie auth (#1471)

* fix(backend): remove access token from login json response (cookie only)

* fix(frontend): do not handle access_token, use async/await syntax

* refactor(frontend): simplify loginpopup, save one click

* feat(backend): add helper endpoint to view current access token

* Replace popup auth flow with redirect flow (#1473)

* refactor: simplify login store using only authDetails variable

* feat(frontend): replace popup auth with redirect auth

* build: remove local compose config var VITE_FMTM_DOMAIN

* refactor(frontend): add route login protection for additional pages

* feat: use task index as an user facing task_id (#1470)

* feat: implemented task index as task id, populate xform table

* fix: handle if empty feature

* fix: merge conflict

* fix(backend): set project_task_index to start from 1

* refactor: remove unused edit project boundary endpoint

* refactor: task history endpoint only take unique task_id

* refactor: use correct task id for comments api

* fix(frontend): replace user facing task_id --> task_index

* fix(backend): add task index to task-completion endpoint

* fix(frontend): replace submission user facing task_id --> task_index

* fix: upload entity to odk central

* refactor: task completion order by id

---------

Co-authored-by: sujanadh <sujanadh07@gmail.com>
Co-authored-by: spwoodcock <sam.woodcock@protonmail.com>

* fix: task hover popup & disable splitting algo without linestring (#1481)

* fix(projectDetailsV2): return message if the locked_by_user is the signed in user else null

* fix(AsyncPopup): show popup if any element is returned

* fix(radioButton): disabled prop add

* feat(checkGeomTypeInGeojson): function to check specified geomType in geojson

* feat(createProject): hasGeojsonLineString add to state and type add

* feat(dataExtract): display warning message if line string not present in custom data extract

* feat(splitTasks): disable taskSplittingAlgorithm option if no lineString in custom data extract

* docs: update timeline with additional dates

* docs: simplify readme, move details to docs

* docs: reorder readme headings

* docs: correctly format bullet points in readme

* docs: add code block style for install script in readme

* fix(backend): get contributors count in project summary (#1484)

* fix: actual number of contributors in project summary

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* fix(backend): use task ids to count validated and mapped status (#1485)

* fix: use task ids to count validated and mapped status

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* docs: add manjitapandey as a contributor for doc (#1486)

* docs: update README.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* docs: add susmina94 as a contributor for doc, ideas, and bug (#1487)

* docs: update README.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* docs: add manjitapandey as a contributor for ideas (#1489)

* docs: update README.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* docs: add Sujanadh as a contributor for maintenance (#1490)

* docs: update README.md

* docs: update .all-contributorsrc

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

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

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* docs: add NSUWAL123 as a contributor for maintenance (#1492)

* docs: update README.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* build: upgrade osm-fieldwork --> v0.9.1 for latest forms

* build: disable vite watch.usePolling due to high cpu usage

* feat: prompt user if task area is not fully mapped on mark complete  (#1493)

* fix(Modal): zIndex fix

* feat(projectDetailsV2): fetch /task-completion api on project page

* feat(dialogTaskActions): task mapped confirmation prompt if features not fully mapped

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* build: update osm-fieldwork --> 0.9.2 for entities sheet fix

* feat: add OpenTelemetry configuration for backend API (monitoring) (#1496)

* feat: otel work in progress

* build: relock dependencies after otel rebase

* feat: add optional monitoring config (openobserve or sentry)

* docs: add SENTRY_DSN optional env var to example .env

* build: add sentry[opentelemetry] dependencies to monitoring group

* build: relock backend dependencies after rebase to development

* fix(backend): invalid use of WKBElement in pydantic model

* ci: upgrade all workflows --> 1.5.1 for WITH_MONITORING var img build

* docs: info on WITH_MONITORING api img build arg

* feat: working sentry opentelemetry optional instrumentation

* docs: add info for using the monitoring setup (sentry)

* docs: remove demo/testing broken routes for monitoring

* fix: linting error for not equal evaluation

* docs: set default .env.example MONITORING empty var

* fix(backend): allow passing MONITORING="" for empty config var

* feat (frontend: colour features based on entity mapping status (#1500)

* feat(getTaskStatusSyle): getFeatureStatusStyle function add to colorize each building according to feature map status

* feat(projectDetailsV2): getFeatureStatusStyle function call to set style of each feature

* refactor(projectDetailsV2): remove unused variables

* Reduce endpoint calls for project details and submission page (#1501)

* fix(backend): add logo to s3 for fmtm beta organisation init

* fix(backend): add organisation_logo field to returned project info

* fix(frontend): replace project_dashboard call on project details page

* refactor: remove task-completion endpoint

* fix(backend): add task_id to entity statuses by default

* fix(backend): simplify central schemas for entities

* fix(backend): fix submission_form_fields endpoint (use xform uuid)

* refactor(frontend): simplify getting project submission data from entities

* fix(frontend): replace missed task_priority_str --> task_status

* fix(dialogTaskActions): same name variable conflict solve (#1506)

* Refactor submission endpoints backend/frontend (#1507)

* refactor: submission table, submission details, review state and filtering

* frontend_fix: updated end point and task id param

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

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

* fix: pre-commit fail

* refactor: removed unnecessary brackets

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* fix: refactored project dashboard and submission graph (#1509)

* Fix/frontend state api issues (#1513)

* fix(customDrawer/primaryAppBar): replace img_url key with profile_img key to display profile picture

* fix(taskSubmissionMap): replace comparision with taskId with task index

* fix(submissionDetails): replace decodedProjectId with projectId

* fix(submissionDetails): replace decodedProjectId with projectId & show recieved status by defualt if no reviewState

* fix(projectSubmissions): statuses endpoint fetch to display taskList and display taskList options

* fix(taskSubmission): replace uid with fid

* fix(taskSelectionPopup): use task index instead of taskId

* fix(dialogTaskActions): use taskId instead of task index on api fetch, post

* fix(activitiesPanel): zoom to task using taskIndex

* Fix/task history tab order (#1514)

* fix(customDrawer/primaryAppBar): replace img_url key with profile_img key to display profile picture

* fix(taskSubmissionMap): replace comparision with taskId with task index

* fix(submissionDetails): replace decodedProjectId with projectId

* fix(submissionDetails): replace decodedProjectId with projectId & show recieved status by defualt if no reviewState

* fix(projectSubmissions): statuses endpoint fetch to display taskList and display taskList options

* fix(taskSubmission): replace uid with fid

* fix(projectDetailsV2): order taskHistory tab to first & defult show taskHistory tab on task click

* fix(taskSelectionPopup): use task index instead of taskId

* fix(dialogTaskActions): use taskId instead of task index on api fetch, post

* fix(activitiesPanel): zoom to task using taskIndex

* fix(projectModel): add index type to taskBoudriesTypes

* fix(comments): use taskId instead of index for get & post api

* fix: populate task_id correctly in feature properties (#1515)

* feat: download submissions in geojson (#1517)

* feat (frontend): submissions geojson download (#1518)

* feat(projectSlice): action and state to track submission download loading

* feat(project): DownloadSubmission geojson service to download geojson

* feat(projectDetailsV2): pass project name to projectOptions component as props

* feat(projectOptions): submission geojson download button & functionality add

* fix: download submissions(csv,json) & refactor submission endpoints (#1519)

* fix: typo error in project name prefix in submission-download-geojson (#1523)

* Fix submission download (#1524)

* fix(projectSubmissions): csv & json download fix according to api

* fix(projectSubmissions): add project name as file name

* Fix merge conflict (development -> staging) (#1525)

* build: bump version string --> 2024.0.2 to prep for next release

* bump: version 2024.2.0 → 2024.3.0

* fix(hotfix): use centroids for extract division by task area (#1336)

* fix: fix random integer generation if missing in data extract

* fix: reduce length of random id generated for data extract

* fix: hotfix add top level id to geojson with it missing

* fix: default UNDERPASS_API_URL no trailing slash

* build: revert v2024.3.0 --> v2024.1.0

* bump: version 2024.1.0 → 2024.2.0

---------

Co-authored-by: spwoodcock <sam.woodcock@protonmail.com>
Co-authored-by: Sam <78538841+spwoodcock@users.noreply.github.com>

---------

Co-authored-by: Nishit Suwal <81785002+NSUWAL123@users.noreply.github.com>
Co-authored-by: sujanadh <sujanadh07@gmail.com>
Co-authored-by: spwoodcock <sam.woodcock@protonmail.com>
Co-authored-by: Sam <78538841+spwoodcock@users.noreply.github.com>
Co-authored-by: Deepak Pradhan (Varun) <37866666+varun2948@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
  • Loading branch information
8 people committed May 17, 2024
1 parent c7a8771 commit 89a423c
Show file tree
Hide file tree
Showing 191 changed files with 6,851 additions and 3,844 deletions.
13 changes: 10 additions & 3 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"name": "Sujan Adhikari",
"avatar_url": "https://avatars.githubusercontent.com/u/109404840?v=4",
"profile": "https://github.com/Sujanadh",
"contributions": ["code"]
"contributions": ["code", "maintenance"]
},
{
"login": "Mudi-business",
Expand All @@ -77,7 +77,7 @@
"name": "Nishit Suwal",
"avatar_url": "https://avatars.githubusercontent.com/u/81785002?v=4",
"profile": "https://github.com/NSUWAL123",
"contributions": ["code"]
"contributions": ["code", "maintenance"]
},
{
"login": "biomassives",
Expand Down Expand Up @@ -154,7 +154,14 @@
"name": "Manjita Pandey",
"avatar_url": "https://avatars.githubusercontent.com/u/97273021?v=4",
"profile": "https://github.com/manjitapandey",
"contributions": ["bug"]
"contributions": ["bug", "doc", "ideas"]
},
{
"login": "susmina94",
"name": "Susmina_Manandhar",
"avatar_url": "https://avatars.githubusercontent.com/u/108750444?v=4",
"profile": "https://github.com/susmina94",
"contributions": ["doc", "ideas", "bug"]
}
],
"contributorsPerLine": 7,
Expand Down
12 changes: 12 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ OSM_URL=${OSM_URL:-"https://www.openstreetmap.org"}
OSM_SCOPE=${OSM_SCOPE:-"read_prefs"}
OSM_LOGIN_REDIRECT_URI="http${FMTM_DOMAIN:+s}://${FMTM_DOMAIN:-127.0.0.1:7051}/osmauth/"
OSM_SECRET_KEY=${OSM_SECRET_KEY}
OSM_SVC_ACCOUNT_TOKEN=${OSM_SVC_ACCOUNT_TOKEN}

### S3 File Storage ###
S3_ENDPOINT=${S3_ENDPOINT:-"http://s3:9000"}
Expand All @@ -43,3 +44,14 @@ FMTM_DB_NAME=${FMTM_DB_NAME:-"fmtm"}

### Underpass (optional override) ###
UNDERPASS_API_URL=${UNDERPASS_API_URL:-"https://api-prod.raw-data.hotosm.org/v1"}

# Monitoring (OpenTelemetry). Options: 'openobserve', 'sentry'.
MONITORING=${MONITORING}
# Monitoring (OpenObserve)
OPENOBSERVE_USER=${OTEL_USERNAME:-${ODK_CENTRAL_USER:-"test@fmtm.dev"}}
OPENOBSERVE_PASSWORD=${OPENOBSERVE_PASSWORD:-"testuserpassword"}
OPENOBSERVE_RETENTION_DAYS=${OPENOBSERVE_RETENTION_DAYS:-90}
OTEL_ENDPOINT=${OTEL_ENDPOINT}
OTEL_AUTH_TOKEN=${OTEL_AUTH_TOKEN}
# Monitoring (Sentry)
SENTRY_DSN=${SENTRY_DSN}
10 changes: 5 additions & 5 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
pytest:
uses: hotosm/gh-workflows/.github/workflows/test_compose.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/test_compose.yml@1.5.1
with:
image_name: ghcr.io/${{ github.repository }}/backend
build_context: src/backend
Expand All @@ -29,20 +29,20 @@ jobs:
secrets: inherit

frontend-tests:
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@1.5.1
with:
working_dir: src/frontend

backend-build:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
needs: [pytest]
with:
context: src/backend
build_target: prod
image_name: ghcr.io/${{ github.repository }}/backend

frontend-build:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
needs: [frontend-tests]
with:
context: src/frontend
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
needs:
- smoke-test-backend
- smoke-test-frontend
uses: hotosm/gh-workflows/.github/workflows/remote_deploy.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/remote_deploy.yml@1.5.1
with:
environment: ${{ github.ref_name }}
docker_compose_file: "docker-compose.${{ github.ref_name }}.yml"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_ci_img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
backend-ci-build:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
with:
context: src/backend
build_target: ci
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_odk_imgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
build-odkcentral:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
with:
context: odkcentral/api
image_tags: |
Expand All @@ -26,7 +26,7 @@ jobs:
# multi_arch: true

build-odkcentral-ui:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
with:
context: odkcentral/ui
image_tags: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_proxy_imgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build-cert-init-main:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
with:
context: nginx
build_target: certs-init-main
Expand All @@ -21,7 +21,7 @@ jobs:
multi_arch: true

build-cert-init-dev:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
with:
context: nginx
build_target: certs-init-development
Expand All @@ -33,7 +33,7 @@ jobs:
multi_arch: true

build-proxy-main:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
with:
context: nginx
build_target: main
Expand All @@ -44,7 +44,7 @@ jobs:
multi_arch: true

build-proxy-dev:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
with:
context: nginx
build_target: development
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ on:

jobs:
build_doxygen:
uses: hotosm/gh-workflows/.github/workflows/doxygen_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/doxygen_build.yml@1.5.1
with:
output_path: docs/apidocs

build_openapi_json:
uses: hotosm/gh-workflows/.github/workflows/openapi_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/openapi_build.yml@1.5.1
with:
image: ghcr.io/${{ github.repository }}/backend:ci-${{ github.ref_name }}
example_env_file_path: ".env.example"
output_path: docs/openapi.json

publish_docs:
uses: hotosm/gh-workflows/.github/workflows/mkdocs_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/mkdocs_build.yml@1.5.1
needs:
- build_doxygen
- build_openapi_json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_test_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
pytest:
uses: hotosm/gh-workflows/.github/workflows/test_compose.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/test_compose.yml@1.5.1
with:
image_name: ghcr.io/${{ github.repository }}/backend
build_context: src/backend
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/pr_test_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ on:
workflow_dispatch:

jobs:
frontend-tests:
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@1.4.9
unit-tests:
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@1.5.1
with:
working_dir: src/frontend

e2e-tests:
uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@main
with:
container_config: '{"image": "mcr.microsoft.com/playwright:v1.43.0"}'
working_dir: src/frontend
run_command: "test:e2e"
2 changes: 1 addition & 1 deletion .github/workflows/tag_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
backend-build:
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.1
with:
context: src/backend
build_target: prod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ on:

jobs:
publish-docs-to-wiki:
uses: hotosm/gh-workflows/.github/workflows/wiki.yml@1.4.9
uses: hotosm/gh-workflows/.github/workflows/wiki.yml@1.5.1
with:
homepage_path: "wiki_redirect.md"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@ envsubst

# Scripts
**/openapi.json

# Chart dependencies
chart/charts
20 changes: 13 additions & 7 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ If more details are required, check out the
- [Build the Frontend](#build-the-frontend)
- [Start the Containers](#start-the-containers)
- [Setup ODK Central User (Optional)](#setup-odk-central-user-optional)
- [Import Test Data (Optional)](#import-test-data-optional)
- [Set Up Monitoring (Optional)](#set-up-monitoring-optional)
- [Check Authentication (Optional)](#check-authentication-optional)
- [Alternative Operating Systems](#alternative-operating-systems)
- [Windows](#windows)
Expand Down Expand Up @@ -218,15 +218,21 @@ docker-compose exec central odk-cmd --email YOUREMAIL@ADDRESSHERE.com user-promo

> Note: Alternatively, you may use an external Central server and user.
### Import Test Data (Optional)
### Set Up Monitoring (Optional)

If running a local test version, test data is available to get started quickly.
- There is an optional configuration for application monitoring via OpenTelemetry.
- To enable this set in your `.env` file:

- Navigate to the `import-test-data` endpoint in the API docs page:
```dotenv
# For OpenObserve
MONITORING="openobserve"
# For Sentry
MONITORING="sentry"
```

<http://api.fmtm.localhost:7050/docs#/debug/import_test_data_debug_import_test_data_get>

- Click `Try it out`, then `execute`.
- Check the `.env.example` for additional required parameters.
- Everything should be configured for you to see endpoint calls in the
selected web dashboard, providing full error tracebacks and stats.

### Check Authentication (Optional)

Expand Down
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ test-backend:
docker compose run --rm api pytest

test-frontend:
docker compose run -e CI=True --rm --entrypoint='sh -c' ui 'npm run test'
docker compose run --rm ui-test

test: test-backend test-frontend

Expand Down

0 comments on commit 89a423c

Please sign in to comment.