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

Feature/6500 project summary table view #115

Merged
merged 175 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
0579892
ci: use hotosm/gh-workflows for container img builds
spwoodcock Apr 30, 2024
002384e
ref: frontend tests now has parallel workers & removed warnings
mahesh-naxa May 7, 2024
70f5bca
add: general pre-commit hooks for static code checks
mahesh-naxa May 2, 2024
85ee336
pre-commit: run --all-files applied
mahesh-naxa May 2, 2024
26413e1
applied pre-commit run-all files for end-of-file-fixer & trailing-whi…
mahesh-naxa May 3, 2024
b1d01c5
Remove `Footer` in `Create New Partner` page
royallsilwallz Jun 25, 2024
07ec188
Remove grain background in `Manage Partners` section
royallsilwallz Jun 26, 2024
cd3b1bc
Do not fetch data if current projects is null in `Partners Page`
royallsilwallz Jun 28, 2024
b596137
Add `no current projects` placeholder text for no projects in `Partne…
royallsilwallz Jun 28, 2024
0dd68f6
Left align Add/Edit Partners content
royallsilwallz Jul 2, 2024
6220850
Adjust content spacing in `Partners Page`
royallsilwallz Jul 2, 2024
b02fafe
Fix mismatch value for language json file for Traditional Chinese
royallsilwallz Jun 13, 2024
c3a0f16
Changes in `Partners Page` Design
royallsilwallz Jul 10, 2024
a6e5e5d
Add `Resources` tab for other links in `Partners Page`
royallsilwallz Jul 11, 2024
736cd5f
Show `Resources` tab only when links are available
royallsilwallz Jul 11, 2024
04efae7
Fix grey background color in switch component
royallsilwallz Jul 11, 2024
b68cdb7
Show only 2 primary hashtags in `Partners` card view
royallsilwallz Jul 11, 2024
af1b0a8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2024
9feaf0b
Merge pull request #6490 from hotosm/fix/6462-partners-page-issues
ramyaragupathy Jul 11, 2024
059cc2a
Add base url referrer to Nominatum api
dakotabenjamin Jun 28, 2024
2219239
build: update cloudformation config to use pdm export instead of venv
spwoodcock Jun 27, 2024
735f260
build: add --user flag to cloudformation pip install (avoid sys confl…
spwoodcock Jun 28, 2024
1c5f01a
Set path to use root user local dir for python packages installed loc…
dakotabenjamin Jun 28, 2024
c0e7193
Merge pull request #6494 from hotosm/fix/pdm-develop-cherrypicked
dakotabenjamin Jul 11, 2024
4696687
Merge pull request #6414 from hotosm/deploy-frontend-tests
dakotabenjamin Jul 11, 2024
dd0bd5d
Partners table atrributes lengths adjusted
prabinoid Jul 12, 2024
05877fb
Merge pull request #6498 from hotosm/fix/partners-attributes-length
ramyaragupathy Jul 12, 2024
c643248
Fix activity section loading forever on secondary hashtag empty issue
royallsilwallz Jul 15, 2024
07f1a8b
Display partner name in the banner when logo not present
royallsilwallz Jul 15, 2024
74519c5
Refactor Partners card component
royallsilwallz Jul 17, 2024
bd11988
Change inline styles to tachyons classes in Partners page
royallsilwallz Jul 17, 2024
310b1e2
Reorder Activity section of Partners page
royallsilwallz Jul 17, 2024
44a8c1f
Change translation texts for Partners Stats page
royallsilwallz Jul 17, 2024
97c348a
Use short description in Partners Stats Current Project section
royallsilwallz Jul 17, 2024
6d7408a
Fix console error for `class instead of className` in Partners Stats …
royallsilwallz Jul 17, 2024
351b72c
Add stats info footer in Partners Stats page
royallsilwallz Jul 17, 2024
edf898d
Add contribution number to Current Projects in Partners Stats
royallsilwallz Jul 18, 2024
16c4fa5
Adjust styling in Current Projects section Partners page
royallsilwallz Jul 18, 2024
af8c654
Show partner creation error message from backend
royallsilwallz Jul 22, 2024
3833d15
Handle Partner edit error message display
royallsilwallz Jul 22, 2024
04c6379
Reduce spacing between contents in Partners Stats page
royallsilwallz Jul 23, 2024
d3a96a2
Use a more generic method for getting Ubuntu 20.04 AMI
tsmock Jul 18, 2024
58628e2
Merge pull request #6502 from hotosm/refactor/partners-page-code
ramyaragupathy Jul 30, 2024
f4e8686
Merge pull request #6484 from hotosm/fix/6456-traditional-chinese-lan…
ramyaragupathy Jul 30, 2024
fcf3b3d
Merge pull request #6374 from spwoodcock/ci/gh-workflow-img-build
dakotabenjamin Jul 30, 2024
e7fd9a6
build: add bind mounts to docker compose dev setup
spwoodcock Jul 4, 2024
e2d19c9
build: better devex with default POSTGRES_USER and POSTGRES_DB
spwoodcock Jul 11, 2024
629bb6e
fix: react-placeholder react 18 peerDep conflict (temp)
spwoodcock Jul 11, 2024
f19035a
build: relock dependencies using yarn
spwoodcock Jul 11, 2024
74b574a
build: prevent usage of git ssh during docker npm install
spwoodcock Jul 11, 2024
717a217
build: add --ignore-scripts to frontend dockerfile npm install (secur…
spwoodcock Jul 30, 2024
b7e4601
Merge pull request #6512 from facebook/feature/cloudformation-ssm-ami
dakotabenjamin Jul 30, 2024
2b213fa
Fix ssm permissions to pull the AMI
dakotabenjamin Jul 30, 2024
167ff31
Merge pull request #6514 from hotosm/fix/ssm-perms
dakotabenjamin Jul 30, 2024
401dd43
Revert "Fix ssm permissions to pull the AMI"
dakotabenjamin Jul 30, 2024
c847eba
Merge pull request #6515 from hotosm/revert-6514-fix/ssm-perms
dakotabenjamin Jul 30, 2024
0f63180
Merge pull request #6493 from spwoodcock/fix/react-placeholder
dakotabenjamin Jul 30, 2024
443bf60
Docker: Dev setup: Use yarn instead of npm in tm-frontend
bshankar Jun 25, 2024
cdaad2f
Docs: Fix Oauth 2 redirect URL
bshankar Jun 26, 2024
a59836b
Docs: Give tasking-manager.env as default ENV for compose
bshankar Jun 26, 2024
ece5c33
Add migrations for linking partners with projects
bshankar Jun 27, 2024
de6bfcd
Fix: project_partners table doesn't need ended_on column
bshankar Jun 28, 2024
e5e0f14
Add DTOs for project_partners
bshankar Jun 28, 2024
3ecd0c7
Add models for project_partners
bshankar Jun 28, 2024
06f5528
Remove update time range action (for now)
bshankar Jul 1, 2024
914f8ab
Update migrations for new project-partner spec
bshankar Jul 3, 2024
8144a38
Update DTOs for new project-partner spec
bshankar Jul 3, 2024
30fbb75
Update postgis models for new project-partner spec
bshankar Jul 3, 2024
bf40de4
Fix: Rename project-partners table -> project-partnerships
bshankar Jul 3, 2024
759d96e
Fix: Add ended_on column for partnerships
bshankar Jul 3, 2024
6f8bbe1
Fix: Remove all relationships
bshankar Jul 3, 2024
617dc97
Fix: Add missing column ended_on for project partnerships
bshankar Jul 3, 2024
c319edd
Implement API to retrieve partnership by ID
bshankar Jul 4, 2024
f9fb193
Implement API to add partners to projects
bshankar Jul 4, 2024
f292f6a
Fix: Only admins can link projects with partners
bshankar Jul 4, 2024
fcb3ec0
Implement patch and delete of project partner links
bshankar Jul 4, 2024
3c87836
Implement API to get partners associated with a project
bshankar Jul 5, 2024
50ab964
ProjectPartnerActions rename: START -> CREATE, END -> DELETE
bshankar Jul 8, 2024
779b022
Fix: action column in project_partners_history is integer
bshankar Jul 8, 2024
95e92a3
Log changes to project partner associations in DB
bshankar Jul 8, 2024
09390ee
Validate the time range of a partnership: start <= end date
bshankar Jul 8, 2024
5f38e87
Fix: Docker dev setup: Frontend hot reloading
bshankar Jul 10, 2024
14fbc0f
chore: introduce partners section to link partners to projects
VinayakRugvedi Jul 12, 2024
140fb52
chore: add circle exclamation and circle minus icons
VinayakRugvedi Jul 12, 2024
4331212
chore: update messages for partners linking form, listing, remove, an…
VinayakRugvedi Jul 12, 2024
e535dbf
feat: create partners input form to link a partner to the project
VinayakRugvedi Jul 12, 2024
235247f
feat: show listing of linked partners and integrate remove and update…
VinayakRugvedi Jul 12, 2024
7606fce
Fix: Optimize docker caching of frontend build
bshankar Jul 12, 2024
4a4ba5c
Fix: docker-compose.override.sample.yml: DB uses 5433 port
bshankar Jul 12, 2024
2ee54dd
docker-compose.override.sample.yml: Backend reload
bshankar Jul 12, 2024
6949b5a
Fix: docker-compose.override.sample.yml: Port 8000: frontend
bshankar Jul 12, 2024
a5516ff
Fix: Linting errors and merge conflicts
bshankar Jul 12, 2024
fcd64ad
Fix project_partner_dto.py: line too long error
bshankar Jul 12, 2024
b03f2ad
Fix: Allow managers of a project to edit partnerships
bshankar Jul 12, 2024
efefb19
chore: add proptypes and minor styling updates
VinayakRugvedi Jul 15, 2024
0ee5842
chore: move partners listing into a separate file
VinayakRugvedi Jul 15, 2024
f3b1b4c
chore: eslint fix for react-hooks/exhaustive-deps
VinayakRugvedi Jul 15, 2024
713f071
chore: add circleMinus and circleExclamation icons to common export
VinayakRugvedi Jul 16, 2024
4bd21b8
Fix: Sync partnership migrations with develop branch
bshankar Jul 22, 2024
b54429f
Fix: Sonarcloud error: yarn install --ignore-scripts
bshankar Jul 22, 2024
153f75c
chore: code refactoring
VinayakRugvedi Jul 23, 2024
3b3aad8
Refactor: extract function: check user if manager of project
bshankar Jul 24, 2024
40c481a
fix: add trailing slash partnership edit API call
VinayakRugvedi Jul 24, 2024
42c6a04
refactor: remove extra spaces, add explanatory comments, and remove t…
VinayakRugvedi Jul 24, 2024
e1311f3
refactor: abstract the logic of extracting the date object and string…
VinayakRugvedi Jul 24, 2024
3abbead
chore: create useAllPartnersQuery in api/projects and utilise it
VinayakRugvedi Jul 24, 2024
d3aa458
refactor: remove unused imports
VinayakRugvedi Jul 24, 2024
fdd39e5
refactor: improve accessibility on DateCustomInput
VinayakRugvedi Jul 24, 2024
8d2caed
chore: clear selected partner after saving
VinayakRugvedi Jul 26, 2024
4fcbfa7
chore: ensure consistent loader postion in save button
VinayakRugvedi Jul 29, 2024
460980b
chore: disable text selection upon partner row double click
VinayakRugvedi Jul 29, 2024
7918f64
Revert dev setup changes to docker-compose.yml
bshankar Jul 31, 2024
e337f96
Merge pull request #6479 from bshankar/partner-to-project
ramyaragupathy Aug 7, 2024
d18c864
Replace AMI id with SSM parameter ID
dakotabenjamin Aug 8, 2024
c8ee29f
Update pg version to align with deployed
dakotabenjamin Aug 8, 2024
09153d1
Merge pull request #6488 from spwoodcock/build/dev-bind-mounts
dakotabenjamin Aug 13, 2024
3d3e717
Merge pull request #6519 from hotosm/fix/ci-deployment-ami-perms
dakotabenjamin Aug 13, 2024
e057b2d
docs: add user roadmap directly to readme
spwoodcock Aug 14, 2024
a36ca50
docs: further update roadmap in readme
spwoodcock Aug 19, 2024
166a092
Modify the roadmap
ramyaragupathy Aug 19, 2024
0e609d3
List based roadmap
ramyaragupathy Aug 19, 2024
7330318
update roadmap list
ramyaragupathy Aug 19, 2024
308df28
roadmap language change
ramyaragupathy Aug 20, 2024
df0cb76
docs: fix readme roadmap typo
spwoodcock Aug 20, 2024
8c7364f
Add project search by partner_id, partnership time range
bshankar Jul 18, 2024
1fa8b48
Add checks for project search by partnerId, partnershipFrom, partners…
bshankar Jul 18, 2024
5bf4dc7
Add project search ordering by mapped, validated percent
bshankar Jul 19, 2024
4fae15e
Implement API to download search results as CSV
bshankar Jul 24, 2024
ee6227c
Fix: Project search crash when user is none
bshankar Jul 25, 2024
db5a96b
Project search csv dump: Remove unnecessary columns
bshankar Jul 25, 2024
eea06cc
Add to project search (csv): creation date, partners, total_area
bshankar Jul 25, 2024
80c63b5
Feat: add author to project search results
bshankar Aug 13, 2024
6bb4db2
Add and export FilledNineCellsGridIcon
VinayakRugvedi Jul 22, 2024
92dbff7
Add and export tablelist icon
VinayakRugvedi Jul 22, 2024
7d07f01
Typo fix of existing component name
VinayakRugvedi Jul 22, 2024
435d4c4
feat: add view toggler for explore projects page
VinayakRugvedi Jul 23, 2024
7cf1972
feat: add redux state to handle view toggle of explore projects page
VinayakRugvedi Jul 29, 2024
a187e63
Update redux type keys
VinayakRugvedi Jul 29, 2024
bccc05e
Pass isExploreProjectsPage prop to ProjectSearchResults
VinayakRugvedi Jul 30, 2024
d8d6305
Remove existing font size class and pass it through extraClasses for …
VinayakRugvedi Jul 30, 2024
8d3f408
Add support for isDisabled prop and handle it
VinayakRugvedi Jul 31, 2024
093ff82
feat: handle showing of explore projects table view
VinayakRugvedi Aug 1, 2024
d570a98
Disable show map toggle when on table view
VinayakRugvedi Aug 1, 2024
00a5693
feat: show partner select in more filters window only for admins
VinayakRugvedi Aug 2, 2024
8e2cca5
feat: create partner filter component with select and date range
VinayakRugvedi Aug 2, 2024
5ab07a9
chore: add tanstack react table into dependencies
VinayakRugvedi Aug 5, 2024
e88853c
Update messages to consume it in partner select filter
VinayakRugvedi Aug 5, 2024
09c18f4
chore: install tanstack react table and update lock file
VinayakRugvedi Aug 5, 2024
5c0a653
Add support for external inputStyles and placeholder, pass inputStyles
VinayakRugvedi Aug 6, 2024
53a7069
Update placeholder and remove date format shown
VinayakRugvedi Aug 6, 2024
2f74d90
Update messages for the explore projects table view
VinayakRugvedi Aug 7, 2024
31e0d06
feat: create explore projects table view component
VinayakRugvedi Aug 7, 2024
d6f93eb
feat: define columns of table
VinayakRugvedi Aug 7, 2024
720d4da
Add stylesheet for table to style resizer and striped rows
VinayakRugvedi Aug 7, 2024
15b5154
Pass query param props to partner filter
VinayakRugvedi Aug 8, 2024
ca17ae3
Update query specification and update more filters active state
VinayakRugvedi Aug 8, 2024
0de659a
Update state handling and integrate with query params
VinayakRugvedi Aug 9, 2024
a4fdd70
Handle overflow for explore projects table view
VinayakRugvedi Aug 9, 2024
763d3d3
feat: implement download CSV for project details
VinayakRugvedi Aug 13, 2024
7d00b4a
feat: update download CSV link
VinayakRugvedi Aug 13, 2024
ecfad7c
feat: handle empty state of projects table
VinayakRugvedi Aug 13, 2024
9f031b0
Update behaviour of clear filters
VinayakRugvedi Aug 15, 2024
4452d9b
Link name to details, mappers to contributors, and fix due date column
VinayakRugvedi Aug 15, 2024
effc98e
feat: add due soon, most mapped, and most validated options to sort by
VinayakRugvedi Aug 15, 2024
c5fbcf1
fix: dont set omitMapResults when downloadAsCSV is true
VinayakRugvedi Aug 19, 2024
ee43cfc
feat: handle empty state of projects table
VinayakRugvedi Aug 13, 2024
ecc2bdb
Fix: Cannot set omitMapResults when downloadAsCSV is true
bshankar Aug 19, 2024
bc424ca
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 19, 2024
d9f1bf4
Feat: Add organisation name to CSV
bshankar Aug 22, 2024
45480ef
Fix: Rename CSV column total_area -> totalAreaSquareKilometers
bshankar Aug 22, 2024
6fdad99
Chore: Add a comment to clarify total area computation
bshankar Aug 22, 2024
3f4489b
Show tooltip content only if present
VinayakRugvedi Aug 20, 2024
71e358d
Add custom tooltip to progress, set omitMapResults to undefined for C…
VinayakRugvedi Aug 21, 2024
cb58d1b
Handle empty data column, update basic styling of table, and add titl…
VinayakRugvedi Aug 23, 2024
0d44e15
refactor: use conditional operator, simplify expression
VinayakRugvedi Aug 23, 2024
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
22 changes: 10 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
name: Run yarn test
command: |
cd ${CIRCLE_WORKING_DIRECTORY}/frontend/
CI=true yarn test -w 1
CI=true yarn test -w 3 --silent
CI=true GENERATE_SOURCEMAP=false yarn build

backend-code-check-PEP8:
Expand All @@ -42,7 +42,7 @@ jobs:
- checkout
- run:
name: flake8 tests
command: |
command: |
pip install flake8
flake8 manage.py backend tests migrations

Expand All @@ -53,7 +53,7 @@ jobs:
- checkout
- run:
name: black tests
command: |
command: |
pip install 'black==23.12.1' ## TODO: Update to version 24
black --check manage.py backend tests migrations

Expand Down Expand Up @@ -294,7 +294,7 @@ workflows:
name: Deploy backend production
gitsha: $CIRCLE_SHA1
stack_name: "tm4-production"
host_ami: "ami-01e5ff16fd6e8c542"
host_ami: "/aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id"
backend_instance_type: c6a.large
pg_version: "13.10"
pg_param_group: "default.postgres13"
Expand Down Expand Up @@ -357,7 +357,7 @@ workflows:
name: Deploy backend production
gitsha: $CIRCLE_SHA1
stack_name: "tm4-production"
host_ami: "ami-01e5ff16fd6e8c542"
host_ami: "/aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id"
backend_instance_type: c6a.large
pg_version: "13.10"
pg_param_group: "default.postgres13"
Expand All @@ -384,7 +384,7 @@ workflows:
name: Deploy TeachOSM Backend
gitsha: $CIRCLECI_SHA1
stack_name: "teachosm"
host_ami: "ami-01e5ff16fd6e8c542"
host_ami: "/aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id"
requires:
- backend-functional-tests
context: tasking-manager-teachosm
Expand Down Expand Up @@ -422,7 +422,7 @@ workflows:
name: Deploy staging backend
gitsha: $CIRCLE_SHA1
stack_name: "staging"
host_ami: "ami-01e5ff16fd6e8c542"
host_ami: "/aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id"
pg_version: "14.8"
pg_param_group: "default.postgres14"
db_instance_type: "db.t4g.small"
Expand Down Expand Up @@ -453,7 +453,7 @@ workflows:
value: << pipeline.git.branch >>
- or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ fix/febdeployment, << pipeline.git.branch >> ] # change this to the branch you wish to test
- equal: [ fix/ci-deployment-ami-perms, << pipeline.git.branch >> ] # change this to the branch you wish to test
jobs:
- database-backup:
name: Backup development database
Expand All @@ -473,8 +473,8 @@ workflows:
name: Deploy development backend
gitsha: $CIRCLE_SHA1
stack_name: "dev"
host_ami: "ami-01e5ff16fd6e8c542"
pg_version: "14.8"
host_ami: "/aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id"
pg_version: "14.10"
pg_param_group: "default.postgres14"
db_instance_type: "db.t4g.small"
backend_instance_type: "t3.medium"
Expand Down Expand Up @@ -509,5 +509,3 @@ workflows:
- backend-code-check-PEP8
- backend-code-check-Black
- backend-functional-tests


2 changes: 1 addition & 1 deletion .circleci/rdsid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ for line in $ARNS; do
if [[ ! -z $MATCHES ]]; then
echo $MATCHES
fi
done
done
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exclude_lines =

# Don't complain if tests don't hit defensive assertion code:
except Exception as e:


ignore_errors = True

Expand Down
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ frontend/package-lock.json
frontend/.env
frontend/.eslintcache
frontend/coverage/

2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ Notes for the reviewer. How to test this change?
- βœ… Provide tests for your changes.
- πŸ“ Use descriptive commit messages.
- πŸ“— Update any related documentation and include any relevant screenshots.
- πŸ”  Does this PR introduce or change any environment variables? If so, make sure to specify this change in the description.
- πŸ”  Does this PR introduce or change any environment variables? If so, make sure to specify this change in the description.

## [optional] What gif best describes this PR or how it makes you feel?
58 changes: 11 additions & 47 deletions .github/workflows/docker-image-push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#
name: Build & publish TM backend container image

on:
Expand All @@ -18,50 +17,15 @@ on:
- deployment/container-tasking-manager


env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}


jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

tags: |
type=ref,event=pr
type=ref,event=tag
type=ref,event=branch
type=semver,pattern=raw
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha

- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
backend-build:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
with:
image_name: ghcr.io/${{ github.repository }}/backend
build_target: prod

# frontend-build:
# uses: hotosm/gh-workflows/.github/workflows/[email protected]
# with:
# image_name: ghcr.io/${{ github.repository }}/backend
# dockerfile: scripts/docker/Dockerfile.frontend
3 changes: 0 additions & 3 deletions .github/workflows/ecs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,3 @@ jobs:
service: ${{ env.ECS_SERVICE }}
cluster: ${{ env.ECS_CLUSTER }}
wait-for-service-stability: true



106 changes: 106 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
name: trim trailing whitespace
description: trims trailing whitespace.
entry: trailing-whitespace-fixer
language: python
types: [text]
stages: [commit, push, manual]

- id: end-of-file-fixer
name: fix end of files
description: ensures that a file is either empty, or ends with one newline.
entry: end-of-file-fixer
language: python
types: [text]
stages: [commit, push, manual]

- id: detect-aws-credentials
name: detect aws credentials
description: detects *your* aws credentials from the aws cli credentials file.
entry: detect-aws-credentials
language: python
types: [text]
args:
- "--allow-missing-credentials"

- id: detect-private-key
name: detect private key
description: detects the presence of private keys.
entry: detect-private-key
language: python
types: [text]

# - id: pretty-format-json
# name: pretty format json
# description: sets a standard for formatting json files.
# entry: pretty-format-json
# language: python
# types: [text]
# files: \.(json)$
# args:
# - "--autofix"

- id: check-merge-conflict
name: check for merge conflicts
description: checks for files that contain merge conflict strings.
entry: check-merge-conflict
language: python
types: [text]

- id: check-yaml
name: YAML File check
description: Checks if YAML File is valid and there are not any indention errors.

- id: check-added-large-files
name: check for added large files
description: prevents giant files from being committed.
entry: check-added-large-files
language: python
stages: [commit, push, manual]
args: ['--maxkb=10240']

# Versioning: Commit messages & changelog
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
stages: [commit-msg]

# Lint / autoformat: Python code
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.4.2"
hooks:
# Run the linter
- id: ruff
files: ^backend/(?:.*/)*.*$
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter
- id: ruff-format
files: ^backend/(?:.*/)*.*$

# INFO: Searches for code that is used or lingering around. (Disabled since there were a lot of work from dev end to remove stuff)
# - repo: https://github.com/asottile/dead
# rev: v1.5.2
# hooks:
# - id: dead

# Autoformat: YAML, JSON, Markdown, etc. (Disabled since pre-commit wasn't able to fix and needs dev input)
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: v3.1.0
# hooks:
# - id: prettier
# args:
# [
# --ignore-unknown,
# --no-error-on-unmatched-pattern,
# "!chart/**",
# "!CHANGELOG.md",
# "!CONTRIBUTING.md",
# "!frontend/pnpm-lock.yaml",
# "!backend/tests/test_data/**",
# ]
1 change: 0 additions & 1 deletion .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ trans.el = frontend/src/locales/el.json
trans.it = frontend/src/locales/it.json
trans.ja = frontend/src/locales/ja.json
trans.zh_TW = frontend/src/locales/zh_TW.json

22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,27 @@ This is Free and Open Source Software. You are welcome to use the code and set u
* Read the monthly update blogs on [OSM Discourse](https://community.openstreetmap.org/c/general/38/all).

## Product Roadmap
We have included below a [high level roadmap/plan](https://github.com/orgs/hotosm/projects/28/) [subject to change] that can be used as an overview.



Status | Feature
-------|---------
βœ… | 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.
| | Latest Translations Update: Keep all content current with the latest translations.
| | OSM Practice Projects: Enable users to engage in OSM practice projects within Tasking Manager workflow.
| | Improved Project Sorting & Filtering: Enhance the user experience with better sorting and filtering options.
| | UI/UX Enhancements: Continuous improvements to the user interface and experience.





## Developers
Expand Down
23 changes: 23 additions & 0 deletions backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ def add_api_endpoints(app):
)

from backend.api.projects.favorites import ProjectsFavoritesAPI
from backend.api.projects.partnerships import (
ProjectPartnershipsRestApi,
PartnersByProjectAPI,
)

# Tasks API import
from backend.api.tasks.resources import (
Expand Down Expand Up @@ -470,6 +474,25 @@ def add_api_endpoints(app):
ProjectsStatisticsQueriesPopularAPI, format_url("projects/queries/popular/")
)

api.add_resource(
ProjectPartnershipsRestApi,
format_url("projects/partnerships/<int:partnership_id>/"),
methods=["GET", "PATCH", "DELETE"],
)

api.add_resource(
ProjectPartnershipsRestApi,
format_url("projects/partnerships/"),
endpoint="create_partnership",
methods=["POST"],
)

api.add_resource(
PartnersByProjectAPI,
format_url("/projects/<int:project_id>/partners"),
methods=["GET"],
)

api.add_resource(
ProjectsTeamsAPI,
format_url("projects/<int:project_id>/teams/"),
Expand Down
Loading
Loading