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

2024-01-30 Development --> Staging #1149

Closed
wants to merge 77 commits into from
Closed

2024-01-30 Development --> Staging #1149

wants to merge 77 commits into from

Conversation

spwoodcock
Copy link
Member

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

Describe this PR

Early dev --> staging merge to migrate qrcodes to odk_token.

Checklist before requesting a review

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

spwoodcock and others added 30 commits January 14, 2024 04:51
* build: add justfile to repo for basic commands

* build: remove Makefile, update Justfile

* build: add Justfile commands to clean databases

* docs: add Justfile to pr auto labeller
* fix: use enums for HTTPStatus over codes

* refactor: update organization routes/crud/schemas best pracice

* added int to the union with str in org_exists functions

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

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

---------

Co-authored-by: Niraj Adhikari <nrjadkry@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: update role enums: UserRole and ProjectRole

* feat: update DbUserRole model to use ProjectRole enum + comp key

* build: update base schema with new enum types

* fix: osm login methods to async

* feat: add basic roles: super admin & validator

* build: add migration for ProjectRole db enum type

* build: fix migrations with revert for projectrole

* build: fix enum migrations with intermediate varchar

* fix: handle invalid access tokens

* refactor: correct use of 403 http status over 401

* refactor: tidy minor code edits & lint fixes

* build: default to 4 workers on dev uvicorn container

* feat: add project_deps with get_project_by_id logic

* feat: add org_admin role to role deps

* fix: add user role to response /me for frontend

* [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: add migration for ProjectRole db enum type

* fix: database model backrefs for DbUserRole --> (DbProject/DbUser)

* fix: add debug user to bypass auth during tests

* refactor: simplify project deletion endpoint /project/{id}

* test: add test for project deletion endpoint

* refactor: rename upload_multi_polygon --> custom_task_boundaries

* ci: disable markdownlint rule MD033 (allow inline html img resize)

* docs: update docs home page to use ref links

* refactor: fix all linting errors for code

* ci: add CONTRIBUTING.md to prettier ignore list

* docs: fix linting errors for all markdown docs

* refactor: rename LICENSE --> LICENSE.md

* refactor: update badges in readme

* docs: add allcontributors to badge table

* ci: add LICENSE.md to markdownlint ignore

* ci: update markdownlint ignore syntax for ci

* ci: add LICENSE.md to prettier ignore

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

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

* style: revert prettier changes to LICENSE.md

* ci: update pre-commit hook versions

* docs: fix markdown linting errors after update

* ci: disable hadolint until bundled binary

* ci: do not run shellcheck on contrib dir

* ci: ignore SC2188,SC2143 from shellcheck

* refactor: fix lint errors for all shell/bash scripts

---------

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

* fix (vectorLayer): style - conditionaly apply style on onModify present

* fix (splitTasks): map - edit added to splitted taskLayer

* fix (splitTasks): onModify - edited geojson set to dividedTaskGeojson state

* feat (createNewProject): only enable generate task btn if fgb file fetch is completed

* fix (createNewProject): splitTasks - logic fix

* fix (createNewProject): splitTasks - clear dividedTaskGeojson, splitTasksSelection, and dataExtractGeojson state on previous click

* feat (createNewProject): splitTasks - show loader and message until FGB file is fetching

* fix (createNewProject): taskSplit - display error on taskSplit fail

* fix vectorLayer: on modifyEnd return area of boundary as well

* fix button: loading text added to the button

* fix NewDefineAreaMap: removed data extraction in progress message from mapComponent

* fix (createNewProject): splitTasks - clearing state on step toggle remove

* fix (createNewProject): uploadArea - clear step4 & step5 step on AOI edit

* fix (createNewProject): dataExtract - generateTaskBTN added, disable next until taskGeneration success, state logic changed to track extractWays & featureType state validation

* fix (createNewProject): dataExtract - clear file state on reset click or if generateDataExtract click

* fix (createNewProject): customLine, customPolygon file state clear on AOI edit

* fix (createNewProject): dataExtract - clear previous extractGeojson, customLine, customPolygon on generate extract, btn disable state update
* fix: backend import error fix

* fix (vectorLayer): style - conditionaly apply style on onModify present

* fix (splitTasks): map - edit added to splitted taskLayer

* fix (splitTasks): onModify - edited geojson set to dividedTaskGeojson state

* feat (createNewProject): only enable generate task btn if fgb file fetch is completed

* fix (createNewProject): splitTasks - logic fix

* fix (createNewProject): splitTasks - clear dividedTaskGeojson, splitTasksSelection, and dataExtractGeojson state on previous click

* feat (createNewProject): splitTasks - show loader and message until FGB file is fetching

* fix (createNewProject): taskSplit - display error on taskSplit fail

* fix vectorLayer: on modifyEnd return area of boundary as well

* fix button: loading text added to the button

* fix NewDefineAreaMap: removed data extraction in progress message from mapComponent

* fix (createNewProject): splitTasks - clearing state on step toggle remove

* fix (createNewProject): uploadArea - clear step4 & step5 step on AOI edit

* fix (createNewProject): dataExtract - generateTaskBTN added, disable next until taskGeneration success, state logic changed to track extractWays & featureType state validation

* fix (createNewProject): dataExtract - clear file state on reset click or if generateDataExtract click

* fix (createNewProject): customLine, customPolygon file state clear on AOI edit

* fix (createNewProject): dataExtract - clear previous extractGeojson, customLine, customPolygon on generate extract, btn disable state update

* fix (createNewProject): uploadArea - warning & error shown if AOI exceeds 100 & 1000 sq.km respectively
Use organisation manager table for organisation admins
Fix condition in elif statement for Feature type detection
Upgrade osm-fieldwork --> 0.4.1 & fmtm-splitter --> 0.2.6
spwoodcock and others added 13 commits January 25, 2024 18:31
…rts (#1136)

* fix: add vite alias @ for src dir

* refactor(frontend): replace all relative imports with @ alias

* build: add lint command to package.json (eslint)

* build: add @ alias to tsconfig for type imports

* refactor: fix all linting errors from eslint

* fix: browser console errors incorrect React usage

* fix: add axios interceptor withCredentials, plus API const

* refactor: fix remaining relative imports
hotfix: retrieve id and username directly instead of using .get
fix: login_required decorator return value converted to AuthUser
fix: API interceptor used in getOrganizationRequest
* feat(frontend): add qrcode-generator dependency

* fix: use existing task-list for frontend qrcodes

* build: add migration to remove qrcode table, add odk_token

* build: add cryptography to dependencies for Fernet

* fix(frontend): incorrect import path for SelectFormValidation

* feat: add ENCRYPTION_KEY var, with encrypt/decrypt db val methods

* refactor: remove qr code from db, add odk_token field for tasks

* feat(backend): remove qrcode from tasks, replace with odk_token only

* feat(frontend): dyanamic qrcode generation  on click

* fix: case when project_log.json does not exist

* feat: add default odk credentials to organisation models

* feat: encrypt project odk credentials by default

* refactor: move field_validator for odk password to base model

* build: small migrations script to convert existing qrcodes

* build: update osm-fieldwork --> 0.4.2, fmtm-splitter --> 1.0.0

* build: move qrcode_to_odktoken script to migrations dir

* refactor: remove assigned vars when not used

* refactor: move password decrypt to model_post_init

* build: set central-db restart policy unless-stopped

* refactor: update odk password type to obfuscated SecretStr
* 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>
@spwoodcock spwoodcock self-assigned this Jan 30, 2024
@github-actions github-actions bot added docs Improvements or additions to documentation frontend Related to frontend code backend Related to backend code devops Related to deployment or configuration migration Contains a DB migration contrib External contributions, or not related to core functionality labels Jan 30, 2024
@spwoodcock
Copy link
Member Author

Resetting branch to current development to avoid lengthy merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code contrib External contributions, or not related to core functionality devops Related to deployment or configuration docs Improvements or additions to documentation frontend Related to frontend code migration Contains a DB migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants