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

iD editor upgrade to v2.30.2 #119

Open
wants to merge 214 commits into
base: deployment/naxa
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
214 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
74a705a
Cleanup backend dockerfile
eternaltyro May 16, 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
85a65aa
docs: remove info about running independent dockerised postgres
spwoodcock Apr 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
180c083
Feat: DB Migration: partners table column mapswipe_group_id
bshankar Aug 22, 2024
a86c7e2
Feat: Update partner APIs to support mapswipe_group_id
bshankar Aug 22, 2024
05cf25b
Fix: Required fields for partner creation
bshankar Aug 22, 2024
66525cb
feat: add support to input mapswipe group id for partner
VinayakRugvedi Aug 22, 2024
cd9a770
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 22, 2024
abfdc06
Fix: Linting errors for migration file ecb6985693c0_.py
bshankar Aug 22, 2024
9d641a4
Update docs for Partners API
emi420 Aug 7, 2024
2ad13a5
Corrected typo (docke -> docker)
astros-dev Aug 25, 2024
7a2afad
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 25, 2024
0019975
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 2, 2024
f1079a2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 2, 2024
77b26c1
Merge pull request #6436 from hotosm/upgrade/backend-dockerfile
dakotabenjamin Sep 3, 2024
688a6a5
Merge pull request #6543 from astros-dev/patch-1
ramyaragupathy Sep 3, 2024
e787ec2
fix: db container healthchecks that was earlier broken
mahesh-naxa Jul 19, 2024
6ca1394
build: remove redundant / duplicate dockerfiles
spwoodcock Sep 4, 2024
2508ae0
build: apply dockerfile updates from PR #6436
spwoodcock Sep 4, 2024
039350d
build: relock pdm after version update + strategy=inherit_metadata
spwoodcock Sep 4, 2024
42eb817
build: dockerfile package installs alphabetical (sonarcloud)
spwoodcock Sep 4, 2024
f54d760
build: tweak backend dockerfile for sonarcloud linting fixes
spwoodcock Sep 4, 2024
2662786
Merge pull request #6331 from spwoodcock/docs/info-for-postgres-docker
spwoodcock Sep 5, 2024
c973f33
Merge pull request #6542 from bshankar/feature/6536-partner-with-maps…
ramyaragupathy Sep 5, 2024
47859b2
Merge pull request #6469 from hotosm/pre-commit-ci-update-config
spwoodcock Sep 5, 2024
d39c6fc
Add project search by partner_id, partnership time range
bshankar Jul 18, 2024
f26f292
Add checks for project search by partnerId, partnershipFrom, partners…
bshankar Jul 18, 2024
62ed25a
Add project search ordering by mapped, validated percent
bshankar Jul 19, 2024
a31c49c
Implement API to download search results as CSV
bshankar Jul 24, 2024
7fe3cb4
Fix: Project search crash when user is none
bshankar Jul 25, 2024
16a334d
Project search csv dump: Remove unnecessary columns
bshankar Jul 25, 2024
e5b6d32
Add to project search (csv): creation date, partners, total_area
bshankar Jul 25, 2024
f9b180f
Feat: add author to project search results
bshankar Aug 13, 2024
25aa717
Add and export FilledNineCellsGridIcon
VinayakRugvedi Jul 22, 2024
88ceb25
Add and export tablelist icon
VinayakRugvedi Jul 22, 2024
1ab0a44
Typo fix of existing component name
VinayakRugvedi Jul 22, 2024
9718445
feat: add view toggler for explore projects page
VinayakRugvedi Jul 23, 2024
ea573d4
feat: add redux state to handle view toggle of explore projects page
VinayakRugvedi Jul 29, 2024
6452095
Update redux type keys
VinayakRugvedi Jul 29, 2024
8ad4bc1
Pass isExploreProjectsPage prop to ProjectSearchResults
VinayakRugvedi Jul 30, 2024
1132fcd
Remove existing font size class and pass it through extraClasses for …
VinayakRugvedi Jul 30, 2024
a2712a4
Add support for isDisabled prop and handle it
VinayakRugvedi Jul 31, 2024
6eed6d2
feat: handle showing of explore projects table view
VinayakRugvedi Aug 1, 2024
a9959e6
Disable show map toggle when on table view
VinayakRugvedi Aug 1, 2024
707adad
feat: show partner select in more filters window only for admins
VinayakRugvedi Aug 2, 2024
b50c012
feat: create partner filter component with select and date range
VinayakRugvedi Aug 2, 2024
4999509
chore: add tanstack react table into dependencies
VinayakRugvedi Aug 5, 2024
dc5449f
Update messages to consume it in partner select filter
VinayakRugvedi Aug 5, 2024
596d552
chore: install tanstack react table and update lock file
VinayakRugvedi Aug 5, 2024
115ad02
Add support for external inputStyles and placeholder, pass inputStyles
VinayakRugvedi Aug 6, 2024
2686221
Update placeholder and remove date format shown
VinayakRugvedi Aug 6, 2024
87d3c6b
Update messages for the explore projects table view
VinayakRugvedi Aug 7, 2024
97a02c8
feat: create explore projects table view component
VinayakRugvedi Aug 7, 2024
ec31860
feat: define columns of table
VinayakRugvedi Aug 7, 2024
db3a04a
Add stylesheet for table to style resizer and striped rows
VinayakRugvedi Aug 7, 2024
668e392
Pass query param props to partner filter
VinayakRugvedi Aug 8, 2024
2de238d
Update query specification and update more filters active state
VinayakRugvedi Aug 8, 2024
e91e5ad
Update state handling and integrate with query params
VinayakRugvedi Aug 9, 2024
d2e78b4
Handle overflow for explore projects table view
VinayakRugvedi Aug 9, 2024
1475752
feat: implement download CSV for project details
VinayakRugvedi Aug 13, 2024
cd212b3
feat: update download CSV link
VinayakRugvedi Aug 13, 2024
76f6b30
feat: handle empty state of projects table
VinayakRugvedi Aug 13, 2024
2fa85ad
Update behaviour of clear filters
VinayakRugvedi Aug 15, 2024
5f0aa05
Link name to details, mappers to contributors, and fix due date column
VinayakRugvedi Aug 15, 2024
4bdf201
feat: add due soon, most mapped, and most validated options to sort by
VinayakRugvedi Aug 15, 2024
1f531c4
fix: dont set omitMapResults when downloadAsCSV is true
VinayakRugvedi Aug 19, 2024
de9ec02
feat: handle empty state of projects table
VinayakRugvedi Aug 13, 2024
c2e69e0
Fix: Cannot set omitMapResults when downloadAsCSV is true
bshankar Aug 19, 2024
06b0d66
Feat: Add organisation name to CSV
bshankar Aug 22, 2024
900d43b
Fix: Rename CSV column total_area -> totalAreaSquareKilometers
bshankar Aug 22, 2024
28ce653
Chore: Add a comment to clarify total area computation
bshankar Aug 22, 2024
6fd975a
Show tooltip content only if present
VinayakRugvedi Aug 20, 2024
5d0e16e
Add custom tooltip to progress, set omitMapResults to undefined for C…
VinayakRugvedi Aug 21, 2024
cc816d2
Handle empty data column, update basic styling of table, and add titl…
VinayakRugvedi Aug 23, 2024
9f2bf02
refactor: use conditional operator, simplify expression
VinayakRugvedi Aug 23, 2024
89054f1
fix: change medium to moderate, ensure tooltip is not masked by progr…
VinayakRugvedi Aug 26, 2024
5f015ed
Set fill to currentColor on DownloadIcon
VinayakRugvedi Aug 27, 2024
04952a7
feat: replace anchor tag with thorough state and api integration for …
VinayakRugvedi Aug 27, 2024
5a57a35
Set minimum threshold width of progress bar
VinayakRugvedi Aug 27, 2024
51c8c3b
fix: remap query params to API spec while downloading as CSV
VinayakRugvedi Aug 29, 2024
2571921
Fix: percent_mapped and validated calculation in table view
bshankar Sep 2, 2024
28b61f3
Fix: CSV: Remove empty partnerNames column for non admins
bshankar Sep 4, 2024
6bf7f2b
Fix: CSV: Round total area in Sqkm to 3 decimal places
bshankar Sep 4, 2024
e26f3c7
Merge pull request #6510 from hotosm/fix-docker-healthchecks
dakotabenjamin Sep 6, 2024
d639285
Merge pull request #6554 from spwoodcock/build/cleanup-dockerfiles
spwoodcock Sep 9, 2024
6ae8c1c
Temporarily disable automatic deployment of dev branch to servers for…
dakotabenjamin Sep 9, 2024
0eef46a
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 9, 2024
1126500
Merge pull request #6559 from hotosm/develop-disable-ci
dakotabenjamin Sep 9, 2024
249ae84
Merge pull request #6504 from bshankar/feature/6500-project-summary-t…
ramyaragupathy Sep 10, 2024
525a972
Merge pull request #6560 from hotosm/pre-commit-ci-update-config
spwoodcock Sep 10, 2024
8390fd7
Upgrade iD editor to 2.30.2
emi420 Sep 16, 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
26 changes: 12 additions & 14 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 @@ -81,7 +81,7 @@ jobs:
- run: sudo apt-get update
- run: sudo apt-get -y install libgeos-dev # Required for shapely
- run: sudo apt-get -y install proj-bin libproj-dev
- run: pip install --upgrade pip pdm==2.7.4
- run: pip install --upgrade pip pdm==2.18.1
- run: pdm export --dev --without-hashes > requirements.txt
- run: pip install -r requirements.txt
- run: mkdir --mode 766 -p /tmp/logs
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 @@ -452,8 +452,8 @@ workflows:
pattern: "^deployment/.*"
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: [ develop, << pipeline.git.branch >> ] # Disabled while we use dev setup for e2e testing
- equal: [ dev-switch-to-sandbox, << pipeline.git.branch >> ]
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.29.0
hooks:
- id: commitizen
stages: [commit-msg]

# Lint / autoformat: Python code
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.6.4"
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

26 changes: 15 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
ARG DEBIAN_IMG_TAG=slim-bookworm
ARG PYTHON_IMG_TAG=3.10



FROM docker.io/python:${PYTHON_IMG_TAG}-${DEBIAN_IMG_TAG} as base
ARG APP_VERSION=0.1.0
ARG DOCKERFILE_VERSION=0.5.0
ARG ALPINE_IMG_TAG
ARG DEBIAN_IMG_TAG
ARG PYTHON_IMG_TAG
ARG [email protected]
LABEL org.hotosm.tasks.app-version="${APP_VERSION}" \
Expand All @@ -25,7 +28,7 @@ FROM base as extract-deps
RUN pip install --no-cache-dir --upgrade pip
WORKDIR /opt/python
COPY pyproject.toml pdm.lock README.md /opt/python/
RUN pip install --no-cache-dir pdm==2.7.4
RUN pip install --no-cache-dir pdm==2.18.1
RUN pdm export --prod --without-hashes > requirements.txt


Expand All @@ -34,13 +37,13 @@ FROM base as build
RUN pip install --no-cache-dir --upgrade pip
WORKDIR /opt/python
# Setup backend build-time dependencies
RUN apt-get update
RUN apt-get install --no-install-recommends -y build-essential
RUN apt-get install --no-install-recommends -y \
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential \
libffi-dev \
libgeos-dev \
postgresql-server-dev-15 \
python3-dev \
libffi-dev \
libgeos-dev
&& rm -rf /var/lib/apt/lists/*
# Setup backend Python dependencies
COPY --from=extract-deps \
/opt/python/requirements.txt /opt/python/
Expand All @@ -63,8 +66,8 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
# Setup backend runtime dependencies
RUN apt-get update && \
apt-get install --no-install-recommends -y \
postgresql-client libgeos3.11.1 proj-bin && \
apt-get clean && rm -rf /var/lib/apt/lists/*
libgeos3.11.1 postgresql-client proj-bin && \
rm -rf /var/lib/apt/lists/*
COPY --from=build \
/home/appuser/.local \
/home/appuser/.local
Expand All @@ -79,7 +82,7 @@ COPY manage.py .

FROM runtime as debug
RUN pip install --user --no-warn-script-location \
--no-cache-dir debugpy==1.6.7
--no-cache-dir debugpy==1.8.5
EXPOSE 5678/tcp
CMD ["python", "-m", "debugpy", "--wait-for-client", "--listen", "0.0.0.0:5678", \
"-m", "gunicorn", "-c", "python:backend.gunicorn", "manage:application", \
Expand All @@ -91,12 +94,13 @@ FROM runtime as prod
USER root
RUN apt-get update && \
apt-get install -y curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Pre-compile packages to .pyc (init speed gains)
RUN python -c "import compileall; compileall.compile_path(maxlevels=10, quiet=1)"
RUN python -m compileall .
EXPOSE 5000/tcp
USER appuser:appuser
# Default gunicorn worker count is 1
# For prod the WEB_CONCURRENCY env var can be used to set this
CMD ["gunicorn", "-c", "python:backend.gunicorn", "manage:application", \
"--workers", "1", "--log-level", "error"]
"--log-level", "error"]
Loading
Loading