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

Migrations to TM 4 #65

Open
wants to merge 1,754 commits into
base: kaart-stage
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1754 commits
Select commit Hold shift + click to select a range
883a410
Update @turfjs libs to 6.3.0, sass and translations
willemarcel Jan 22, 2021
7b59adf
Bump @sentry/react from 6.0.0 to 6.0.1 in /frontend
dependabot-preview[bot] Jan 22, 2021
dfbd223
Bump @sentry/tracing from 6.0.0 to 6.0.1 in /frontend
dependabot-preview[bot] Jan 22, 2021
d363160
Exclude tasks that aren't on mapped status, when locking tasks of a user
willemarcel Jan 22, 2021
f03928a
update react-scripts to 4.0.1
willemarcel Jan 22, 2021
fd648cb
Update translations
willemarcel Jan 22, 2021
2a3a7c5
Bump @testing-library/react-hooks from 5.0.0 to 5.0.3 in /frontend
dependabot-preview[bot] Jan 24, 2021
7ac01ce
Add g++ to fix pip build errors
Jan 26, 2021
942f280
Bump msw from 0.25.0 to 0.26.0 in /frontend
dependabot-preview[bot] Jan 26, 2021
4d3d670
Change email sending to only message users that confirmed their email…
teymour-aldridge Jan 27, 2021
ae92255
Fix "Resume task" button link and add tests to TaskCard component
willemarcel Jan 27, 2021
9ab7a34
Bump marked from 1.2.7 to 1.2.8 in /frontend
dependabot-preview[bot] Jan 26, 2021
a846434
Add slack username to user page
willemarcel Jan 28, 2021
de4937f
Filter users by username on Project's contributors list
max-keviv Dec 26, 2020
1a2df76
create UseFilterContributors hook + add tests to Contributions component
willemarcel Jan 29, 2021
1493554
Bump react-select from 3.2.0 to 4.0.2 in /frontend
dependabot-preview[bot] Feb 1, 2021
5f36f6f
Integrate endpoints, functions in place for task stats
ramyaragupathy Jan 7, 2021
b45e0d0
Add tasks activity stats:
d-rita Jan 8, 2021
da833ab
query by campaign, org name and id, project ids, valid dates
d-rita Jan 8, 2021
3bba8a6
improve tasks stats query
d-rita Jan 15, 2021
209141a
Query modification
ramyaragupathy Jan 26, 2021
3d03028
Return task stats by the day
d-rita Jan 27, 2021
37a63a0
Modify task stats to return mapped, validated and bad imagery numbers
d-rita Jan 28, 2021
9397723
improve start and end dates validation + api documentation
willemarcel Feb 1, 2021
89109d1
Bad imagery count + org query
ramyaragupathy Feb 1, 2021
618b85a
restrict date range to 1 year + require authentication
willemarcel Feb 1, 2021
e968cce
Query by campaign name for task stats
d-rita Feb 2, 2021
d12f19c
Avoid ZeroDivisionError in the percent mapped / validated/ bad imagery
willemarcel Feb 1, 2021
bea908f
Remove multiple looping
ramyaragupathy Feb 2, 2021
d39eb4a
Add TM_ORG_LOGO envvar to AWS backend
dakotabenjamin Jan 7, 2021
32164b7
Use distinct on to filter task & project IDs and fetch action date (#…
ramyaragupathy Feb 2, 2021
c24ca60
Add organisation stats page
willemarcel Jan 25, 2021
e16552a
Finish organisation stats page
willemarcel Feb 1, 2021
bd599a2
handle errors when fetching tasks stats endpoint + add link to org stats
willemarcel Feb 2, 2021
f7f4946
Update translations and frontend dependencies
willemarcel Feb 2, 2021
91f5bd1
Validate date queries on organisation stats + add placeholder on loading
willemarcel Feb 2, 2021
82b473f
Merge pull request #4178 from hotosm/develop
willemarcel Feb 2, 2021
4ad4232
restrict organisation stats to only logged users
willemarcel Feb 3, 2021
d026fa6
Update translations
willemarcel Feb 3, 2021
ed83e31
Bump msw from 0.26.0 to 0.26.1 in /frontend
dependabot-preview[bot] Feb 3, 2021
a8d4592
Bump marked from 1.2.8 to 1.2.9 in /frontend
dependabot-preview[bot] Feb 3, 2021
7e49fce
Complete TaskStats component test coverage
willemarcel Feb 5, 2021
b0c3192
Bump date-fns from 2.16.1 to 2.17.0 in /frontend
dependabot-preview[bot] Feb 5, 2021
7bd19c7
Bump jest-canvas-mock from 2.3.0 to 2.3.1 in /frontend
dependabot-preview[bot] Feb 7, 2021
51a1e33
lint code and move file to correct folder
willemarcel Feb 8, 2021
f042039
Bump marked from 1.2.9 to 2.0.0 in /frontend
dependabot-preview[bot] Feb 8, 2021
ddaa21e
Add type field to organisation model (#4218)
d-rita Feb 9, 2021
76a5358
Don't log known exceptions on tasks stats
willemarcel Feb 9, 2021
dc0bcd4
Bump sass from 1.32.6 to 1.32.7 in /frontend
dependabot-preview[bot] Feb 10, 2021
c53974c
Bump msw from 0.26.1 to 0.26.2 in /frontend
dependabot-preview[bot] Feb 10, 2021
43cb06d
Show information about tiers to managers of non exempt organisations
willemarcel Feb 9, 2021
b32dde2
Create users stats endpoint
max-keviv Feb 3, 2021
83c484e
remove task stats and add users' gender, email and contributed stats
willemarcel Feb 4, 2021
16bf8a6
Bump @testing-library/user-event from 12.6.3 to 12.7.0 in /frontend
dependabot-preview[bot] Feb 11, 2021
2600cef
Allow to order tasks by last action in reverse order
max-keviv Feb 3, 2021
23e60ed
improve task ordering code
willemarcel Feb 15, 2021
a8d9ee6
Add Docker support for additional frontend parameters
frafra Dec 23, 2020
0f5fc2f
Fix contributor counting.
teymour-aldridge Feb 12, 2021
9fae765
Update frontend dependencies
willemarcel Feb 16, 2021
b8ef061
Clean up backend code. (#4233)
teymour-aldridge Feb 16, 2021
7779952
Add org type field to create and patch API endpoints and frontend forms
willemarcel Feb 16, 2021
d897ddd
fix error on PATCH organisation endpoint
willemarcel Feb 16, 2021
2ea20d4
Bump react-accessible-accordion from 3.3.3 to 3.3.4 in /frontend
dependabot-preview[bot] Feb 16, 2021
7392276
update translations
willemarcel Feb 16, 2021
7be6355
Merge pull request #4241 from hotosm/fix/patch-org-endpoint
ramyaragupathy Feb 16, 2021
a602fe8
Bump query-string from 6.13.8 to 6.14.0 in /frontend
dependabot-preview[bot] Feb 16, 2021
0a1abcc
Update service worker with workbox
willemarcel Feb 12, 2021
2b6a274
improve code splitting
willemarcel Feb 15, 2021
858a0e7
add source map explorer
willemarcel Feb 15, 2021
38ed69b
import missing react-datepicker css
willemarcel Feb 15, 2021
32e5610
Modify query to return counts (#4237)
ramyaragupathy Feb 16, 2021
16c824d
Merge pull request #4243 from hotosm/develop
willemarcel Feb 16, 2021
e5b36e4
Bump react-select-event from 5.1.0 to 5.2.0 in /frontend
dependabot-preview[bot] Feb 18, 2021
ae5b220
Bump sass from 1.32.7 to 1.32.8 in /frontend
dependabot-preview[bot] Feb 18, 2021
4d3a95f
Bump mapbox-gl from 1.13.0 to 1.13.1 in /frontend
dependabot-preview[bot] Feb 18, 2021
eed2111
Bump react-datepicker from 3.4.1 to 3.5.0 in /frontend
dependabot-preview[bot] Feb 17, 2021
6f7a15a
Bump @testing-library/user-event from 12.7.1 to 12.7.2 in /frontend
dependabot-preview[bot] Feb 22, 2021
9f7f38c
Reset arbitrary tasks option when clicking the Reset button
willemarcel Feb 18, 2021
97129c5
rename tasksNo to tasksNumber and update it when going back to Step 2
willemarcel Feb 19, 2021
a8bf06d
Bump use-query-params from 1.1.9 to 1.2.0 in /frontend
dependabot-preview[bot] Feb 20, 2021
268c043
Improve the User tasks endpoint and set a default sort_by value
willemarcel Feb 23, 2021
eea40c4
Set order by param on My Tasks API request
willemarcel Feb 23, 2021
352fae8
Use JSON format to get user details from OSM
willemarcel Feb 22, 2021
fbbfd60
truncate Project AoI and Task Grid to 6 decimal places
willemarcel Feb 19, 2021
056ca31
Show discounted label if applicable
d-rita Feb 19, 2021
430fe5d
Improve org usage level tests and translation strings
willemarcel Feb 25, 2021
9cfb146
Improve some pages' title
willemarcel Feb 25, 2021
0349e17
update frontend dependencies
willemarcel Feb 26, 2021
5ad62ff
Bump @testing-library/user-event from 12.7.2 to 12.7.3 in /frontend
dependabot-preview[bot] Feb 26, 2021
a9272f4
Update translations and frontend dependencies
willemarcel Feb 26, 2021
7f621db
Bump marked from 2.0.0 to 2.0.1 in /frontend
dependabot-preview[bot] Feb 27, 2021
e2056c8
Bump @testing-library/user-event from 12.7.3 to 12.8.0 in /frontend
dependabot-preview[bot] Feb 28, 2021
e9a0e05
add BaseTestCase and test environment
willemarcel Aug 6, 2020
70c0cd6
migrate unit test to BaseTestCase
NoemiNahomy Aug 10, 2020
b1dddba
Update test data
NoemiNahomy Aug 11, 2020
faf38a9
Add test to team search
NoemiNahomy Jul 24, 2020
45a7c05
Added more TeamService test
NoemiNahomy Jul 30, 2020
c644313
added test for project search
NoemiNahomy Jul 23, 2020
a104583
Migrate unit test services to BaseTestCas
NoemiNahomy Aug 18, 2020
5048bab
Config file update
ramyaragupathy Mar 1, 2021
060f1af
Add general stats page
willemarcel Feb 25, 2021
531c878
fix NaN percentage issue
d-rita Feb 26, 2021
5b83d13
Add loading icon and use it on Preloader component
willemarcel Feb 26, 2021
7bd7697
Bump @formatjs/intl-pluralrules from 4.0.10 to 4.0.11 in /frontend
dependabot-preview[bot] Mar 1, 2021
a984281
Rename "Add" buttons to "New" on management section + fix alignment
willemarcel Mar 1, 2021
7fd90eb
Bump @testing-library/react-hooks from 5.0.3 to 5.1.0 in /frontend
dependabot-preview[bot] Mar 1, 2021
7fdbef3
Bump date-fns from 2.17.0 to 2.18.0 in /frontend
dependabot-preview[bot] Mar 1, 2021
dbd6cb8
Fix geojson extension writing
willemarcel Mar 2, 2021
43e6ab9
Oceania Tasking Manager
jayenashar Mar 2, 2021
b085be2
Improve UX of orgs, teams, campaigns, licenses, categories editing form
willemarcel Mar 1, 2021
bd7f4cf
Move Statistics page to inside /manage url and adapt style
willemarcel Mar 2, 2021
86266a9
Fix tier information on progress bar tooltip
willemarcel Mar 1, 2021
8ff6ace
Rename "last month/week" to "last 30/7 days"
willemarcel Mar 2, 2021
b7a83dc
Let only invalidated tasks to be validated
ramyaragupathy Mar 2, 2021
9c21a4c
Merge pull request #4315 from hotosm/fix/geojson-extension
ramyaragupathy Mar 2, 2021
0b9b1b3
Merge pull request #3407 from hotosm/fix/testCase
ramyaragupathy Mar 2, 2021
f9cf004
Add slug field to organisations
willemarcel Mar 1, 2021
c620738
add GET org by slug endpoint
willemarcel Mar 1, 2021
69a1a2f
add public organisation frontend page
willemarcel Mar 1, 2021
9f8f231
Handle special chars
ramyaragupathy Mar 2, 2021
bdf8812
Name update for contoller funcs
ramyaragupathy Mar 2, 2021
fb71387
Add organisationSlug to GET project endpoint + link on the detail page
willemarcel Mar 2, 2021
c8f48e0
Improve organisations' form & redirect after items' creation/deletion
willemarcel Mar 2, 2021
a7cbb6e
use replaceIn when updating the query on org and general Stats pages
willemarcel Mar 2, 2021
531900e
include active field of team members on GET organisation endpoint
willemarcel Mar 2, 2021
26bcf6a
Change Edit managers/members toggle
willemarcel Mar 2, 2021
3018b48
update translations and dependencies
willemarcel Mar 2, 2021
51e931b
cache google fonts
willemarcel Mar 2, 2021
9cdb9ac
Enable Korean language
willemarcel Mar 2, 2021
9ff5e20
Merge pull request #4322 from hotosm/develop
willemarcel Mar 2, 2021
d435048
Bump @hotosm/id from 2.19.5 to 2.19.6 in /frontend
dependabot-preview[bot] Mar 4, 2021
5e37938
Update translations (#4339)
willemarcel Mar 4, 2021
da22546
Bump date-fns from 2.18.0 to 2.19.0 in /frontend
dependabot-preview[bot] Mar 5, 2021
43491ac
Bump final-form from 4.20.1 to 4.20.2 in /frontend
dependabot-preview[bot] Mar 5, 2021
8945caa
Bump react-select from 4.1.0 to 4.2.0 in /frontend
dependabot-preview[bot] Mar 5, 2021
bc5cd06
Bump react-select from 4.2.0 to 4.2.1 in /frontend
dependabot-preview[bot] Mar 5, 2021
0bf6020
Adjust font size when the sidebar is hidden to avoid horizontal scroll
willemarcel Mar 7, 2021
6f7abd6
Avoid CORS errors when fetching osm stats api
willemarcel Mar 8, 2021
9aff971
Bump msw from 0.27.0 to 0.27.1 in /frontend
dependabot-preview[bot] Mar 8, 2021
eb968cd
[Security] Bump elliptic from 6.5.3 to 6.5.4 in /frontend
dependabot-preview[bot] Mar 8, 2021
1e78fac
List all orgs to ADMIN users + add msg when orgs list is empty
willemarcel Mar 8, 2021
ff2a217
Move base image source to quay
d-rita Feb 8, 2021
d44f26d
Display "no members" message if team is empty (#4337)
d-rita Mar 9, 2021
d124cad
Bump @testing-library/user-event from 12.8.1 to 12.8.3 in /frontend
dependabot-preview[bot] Mar 9, 2021
bd4ef01
Improve messages and style of project detail page
willemarcel Mar 9, 2021
d2549be
Add public organisation page link to team membership page (#4356)
d-rita Mar 11, 2021
6bd15e6
[Security] Bump react-dev-utils from 11.0.3 to 11.0.4 in /frontend
dependabot-preview[bot] Mar 11, 2021
6bd71bd
Bump dompurify from 2.2.6 to 2.2.7 in /frontend
dependabot-preview[bot] Mar 12, 2021
7347f28
Change position of create/clone button (#4302)
LittleStar21 Mar 12, 2021
d8d5c4e
Improve responsiveness of Total Features section (#4336)
d-rita Mar 15, 2021
a1ac101
Fix privacy issue on user detail API + add privacy notice (#4351)
willemarcel Mar 15, 2021
3f46d87
Display number of comments per task on "My tasks" list (#4357)
d-rita Mar 16, 2021
76a97a7
Add subscription_tier field to Organisation model
willemarcel Mar 16, 2021
c78b221
Update organisation form to handle subscribed tier
willemarcel Mar 16, 2021
9cd1058
Test projectDetail components
d-rita Feb 28, 2021
7cc6a9f
Update frontend dependencies + run build-locales
willemarcel Mar 16, 2021
ab94a76
Rewrite "# total contributors" to "# contributors" and separate 0 case
willemarcel Mar 16, 2021
9680462
Update translations
willemarcel Mar 16, 2021
ba2def2
Merge pull request #4381 from hotosm/develop
willemarcel Mar 16, 2021
e4e1da7
Fix error on User and Message services (#4387)
willemarcel Mar 17, 2021
8372c16
Merge pull request #4389 from hotosm/develop
willemarcel Mar 17, 2021
c947d49
Bump @testing-library/user-event from 12.8.3 to 13.0.1 in /frontend
dependabot-preview[bot] Mar 17, 2021
fc4f1be
Bump @testing-library/user-event from 13.0.1 to 13.0.2 in /frontend
dependabot-preview[bot] Mar 18, 2021
33e5b14
Fix link on fallback component and improve style of contact form.
willemarcel Mar 17, 2021
adfafe8
Bump @testing-library/user-event from 13.0.2 to 13.0.3 in /frontend
dependabot-preview[bot] Mar 19, 2021
53182b5
Update translations and frontend dependencies
willemarcel Mar 22, 2021
604119d
Bump react-select from 4.2.1 to 4.3.0 in /frontend
dependabot-preview[bot] Mar 19, 2021
0c31345
Separate OrganisationUsageLevel and OrganisationTier, add subscribed …
willemarcel Mar 22, 2021
2472288
Bump react, react-dom and react-test-renderer in /frontend
dependabot-preview[bot] Mar 22, 2021
f04f37b
Update react-redux and translations
willemarcel Mar 23, 2021
f375c2a
Add some predefined global imagery options to project edit page (#4404)
willemarcel Mar 23, 2021
0b2d9d0
Update react-intl to 5.13.5. Fix and improve DueDateBox & TaskCard tests
willemarcel Mar 22, 2021
b5376d6
Update blue colour on charts
willemarcel Mar 24, 2021
e04e530
Set map view to fit the AoI's bounds on step 2 of project creation
willemarcel Mar 24, 2021
9b26a6a
Bump react-select-event from 5.2.0 to 5.3.0 in /frontend
dependabot-preview[bot] Mar 25, 2021
51257aa
Add option to discard tasks smaller than 2000m² + refactoring
willemarcel Mar 25, 2021
90a1362
Update tasks number when going back from to step 1 with arbitrary tasks
willemarcel Mar 25, 2021
5ae4096
Count correctly the number of tasks when importing files
willemarcel Mar 25, 2021
23c7708
Bump pyyaml from 5.3.1 to 5.4
dependabot[bot] Mar 25, 2021
b4d88d6
Show loading icon on buttons during mapping/validation API requests
willemarcel Mar 29, 2021
965bc2a
Improve Login page (#4451)
willemarcel Mar 30, 2021
87f8516
[Security] Bump y18n from 4.0.0 to 4.0.1 in /frontend
dependabot-preview[bot] Mar 29, 2021
855fd02
update frontend dependencies
willemarcel Mar 30, 2021
004d6db
Update translations
willemarcel Mar 30, 2021
16e7cd3
fix error message on useAsync tests
willemarcel Mar 30, 2021
f13c709
Load imagery on JOSM using its id instead of url
willemarcel Mar 25, 2021
fa14d8f
Merge pull request #4459 from hotosm/develop
willemarcel Mar 30, 2021
3a9b1e9
Merge pull request #4433 from hotosm/dependabot/pip/pyyaml-5.4
ramyaragupathy Apr 1, 2021
af5a934
Bleach & Jinja version update
ramyaragupathy Apr 1, 2021
60296d3
Bump react-datepicker from 3.6.0 to 3.7.0 in /frontend
dependabot-preview[bot] Mar 31, 2021
5ab364b
Update translations and frontend dependencies
willemarcel Apr 6, 2021
ae44dc1
Add basemap options to Priority Areas form map (#4407)
d-rita Apr 8, 2021
c1d5808
Bump date-fns from 2.19.0 to 2.20.2 in /frontend
dependabot-preview[bot] Apr 12, 2021
2a735d5
improve supportedLanguages fetching
willemarcel Apr 1, 2021
bcbb3eb
Change localized input fields on project edit page
willemarcel Apr 6, 2021
7e30809
Update welcome letter link and improve welcome notification text
willemarcel Apr 13, 2021
5aadb6f
Enable users to import geo files with priority areas polygons:
d-rita Mar 29, 2021
116acf4
Move file functions to utils + refactor render priority area function
d-rita Apr 8, 2021
a8e8fb0
Enable to set different status on multiple tasks validation (#4499)
willemarcel Apr 13, 2021
e30a2bc
Update translations
willemarcel Apr 13, 2021
19c88ce
Update formatjs libs and try to fix #4485
willemarcel Apr 13, 2021
34c6dd8
Fix email validation regex
willemarcel Apr 13, 2021
2d65d8e
Update dependencies
willemarcel Apr 13, 2021
66075a9
Remove tests that fail if a Mapbox token is configured
willemarcel Apr 13, 2021
7fccfbd
Merge pull request #4502 from hotosm/develop
willemarcel Apr 13, 2021
f37b891
Bump workbox-core from 6.1.2 to 6.1.5 in /frontend
dependabot-preview[bot] Apr 14, 2021
ba86eb9
Bump date-fns from 2.20.2 to 2.20.3 in /frontend
dependabot-preview[bot] Apr 14, 2021
57728d8
[Security] Bump ssri from 6.0.1 to 6.0.2 in /frontend
dependabot-preview[bot] Apr 16, 2021
8beca18
Update translations, date-fns and rtl/user-events
willemarcel Apr 19, 2021
15c6146
Remove fitBounds to AoI during step 2 of project creation
willemarcel Apr 19, 2021
8ed5e35
use className instead of style on hidden project creation map input
willemarcel Apr 19, 2021
b11ea6f
Filter projects by last update date (#4521)
willemarcel Apr 20, 2021
fa0a25a
Refactor duplicated components - server and error messages (#4452)
d-rita Apr 20, 2021
d0261a3
Add Alert Component with 4 type options
willemarcel Apr 20, 2021
605848f
Bump sass from 1.32.8 to 1.32.10 in /frontend
dependabot-preview[bot] Apr 22, 2021
e94d8f0
Bump msw from 0.28.1 to 0.28.2 in /frontend
dependabot-preview[bot] Apr 22, 2021
e5a6440
Bump slug from 4.0.3 to 4.0.4 in /frontend
dependabot-preview[bot] Apr 22, 2021
647ab7b
Bump @testing-library/jest-dom from 5.11.10 to 5.12.0 in /frontend
dependabot-preview[bot] Apr 22, 2021
e692f95
Consider only validation time on the project validation estimation
willemarcel Apr 14, 2021
b365c27
Bump @testing-library/user-event from 13.1.4 to 13.1.5 in /frontend
dependabot-preview[bot] Apr 23, 2021
1b67cd5
Bump @testing-library/react-hooks from 5.1.1 to 5.1.2 in /frontend
dependabot-preview[bot] Apr 23, 2021
e30a506
Bump humanize-duration from 3.25.1 to 3.25.2 in /frontend
dependabot-preview[bot] Apr 22, 2021
be4f70c
Improve "Question and Comments" with async and alert
willemarcel Apr 21, 2021
c62560b
Add icon property to Buttons
willemarcel Apr 21, 2021
f3d3a6f
Make use of Alert, new Button props and useAsync on Create Project page
willemarcel Apr 21, 2021
fdafd6b
Set initial value state to empty string
d-rita Apr 23, 2021
1d6fd1e
Show loading indicator when locking tasks to map or validate
willemarcel Apr 23, 2021
7c715ff
Add tests for set-task-sizes functions (#4523)
d-rita Apr 26, 2021
d36c65a
Make use of Alert component and useAsync on update project page
willemarcel Apr 23, 2021
47c98dc
Use icon property on buttons of SetTaskSizes component
willemarcel Apr 26, 2021
2c87f5b
Add tests for licences components (#4555)
d-rita Apr 26, 2021
1375c42
Fix bug in OSMCha filter id field of edit project page (#4556)
willemarcel Apr 27, 2021
12a50c5
Add query params to filter projects by last_update and created dates
willemarcel Apr 23, 2021
7610bd4
Show id of locked for validation tasks on the map when doing validati…
d-rita Apr 27, 2021
c22a68f
Update dependencies
willemarcel Apr 27, 2021
e65c44d
Enable Chinese translation + update translations
willemarcel Apr 27, 2021
182f57b
Update @sentry/react and formatjs libs
willemarcel Apr 27, 2021
ffd1373
Merge pull request #4562 from hotosm/develop
willemarcel Apr 27, 2021
5529282
CI: Add non-circle CI
tsmock May 6, 2021
cf4ce2a
frontend: Set the default changeset source to "Kaart Ground Survey 2021"
tsmock May 6, 2021
114e79f
migrations: RapiD and JOSM MapWithAI defaults
tsmock May 6, 2021
b04288b
migrations: Project files
tsmock May 6, 2021
0dc5d49
migrations: merge
tsmock May 6, 2021
a3f513c
Mapillary: backend copy and port
tsmock May 6, 2021
cbb00b2
Mapillary v4 implementation (#66)
andrewcp54 Jun 16, 2021
4aa08ab
Gitlab CI: Split out into separate stages
tsmock Jun 10, 2021
c4f11c3
Migrations: c24028c4e87d: drop unused imports
tsmock Jun 16, 2021
9a9a76f
Backend: Formatting
tsmock Jun 16, 2021
85a9fbd
backend/services/mapillary_service: Fix lint issue
tsmock Jun 16, 2021
5b6412d
CI: Use env variables for tasking-manager.env
tsmock Jun 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
405 changes: 214 additions & 191 deletions .circleci/config.yml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 1

update_configs:
- package_manager: "javascript"
directory: "/frontend"
update_schedule: "live"

- package_manager: "python"
directory: "/"
update_schedule: "live"
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.*
*.yml
**/*.pyc
**/node_modules
**/npm-debug.log
logs/
docs/
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[flake8]
max-line-length = 120
max-line-length = 119
15 changes: 15 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"Component: Frontend":
- frontend/**/*
"Component: Backend":
- backend/**/*
- tests/**/*
- migrations/**/*
- ./manage.py
- ./requirements.txt
"Component: Infrastructure":
- .circleci/*
- .github/**/*
- scripts/aws/**/*
- scripts/docker/**/*
- scripts/install/**/*
- docker-*.yml
20 changes: 20 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler

name: Labeler
on:
- pull_request_target

jobs:
label:

runs-on: ubuntu-latest

steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
21 changes: 11 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@
tasking-manager*.env

# Generated frontend #
client/node_modules/
client/assets/styles/css
client/app/taskingmanager.config.js
client/id_preset_categories.json
client/app/id_preset_categories.js
client/package-lock.json
client/yarn.lock
frontend/node_modules/
frontend/build/
frontend/public/static/
frontend/assets/styles/
frontend/package-lock.json
frontend/.env
frontend/.eslintcache
frontend/coverage/

# Ignore dist folder as this contains the minimized build for deploy
server/web/static/dist
server/web/static/dist/
backend/web/static/dist
backend/web/static/dist/

# Ignore local logs
logs/
*.log

# Ignore some translation stuff
.tx/tasking-manager.master/
.tx/

#python
venv/
Expand Down
169 changes: 169 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

default:
image: registry.gitlab.com/gokaart/tasking-manager/ci:latest
before_script:
- |
echo "Install requirements"
# Install NPM packages and build frontend
cd frontend
CI=true yarn
cd ..
# Install Python dependencies
python3 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
# Install python gdal -- it MUST match the version of gdal installed
pip install gdal==$(gdalinfo --version | awk '{print $2}' | awk -F, '{print $1}')
cache:
key: "cached-dependencies"
policy: pull
paths:
- .cache/npm
- .cache/pip
- frontend/node_modules
- env

image_updates:
image: docker:20.10.3
stage: build
services:
- docker:20.10.3-dind
before_script:
- docker info
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
tags:
- docker
script:
- docker pull ${CI_REGISTRY_IMAGE}/tasking-manager:frontend || true
- docker pull ${CI_REGISTRY_IMAGE}/tasking-manager:backend || true
- echo "TM_APP_BASE_URL=\"${TM_APP_BASE_URL}\"" > tasking-manager.env
- echo "TM_APP_API_URL=\"${TM_APP_API_URL}\"" >> tasking-manager.env
- echo "TM_APP_API_VERSION=\"${TM_APP_API_VERSION}\"" >> tasking-manager.env
- docker build --build-arg branch=${CI_COMMIT_REF_NAME} --cache-from ${CI_REGISTRY_IMAGE}/tasking-manager:frontend -t ${CI_REGISTRY_IMAGE}/tasking-manager:frontend-${CI_COMMIT_REF_NAME} --file scripts/docker/Dockerfile.frontend .
- docker build --build-arg branch=${CI_COMMIT_REF_NAME} --cache-from ${CI_REGISTRY_IMAGE}/tasking-manager:backend -t ${CI_REGISTRY_IMAGE}/tasking-manager:backend-${CI_COMMIT_REF_NAME} --file scripts/docker/Dockerfile.backend .
- |
if [[ ! -z ${CI_REGISTRY+x} ]]; then
docker push ${CI_REGISTRY_IMAGE}/tasking-manager:backend-${CI_COMMIT_REF_NAME}
docker push ${CI_REGISTRY_IMAGE}/tasking-manager:frontend-${CI_COMMIT_REF_NAME}
fi
- |
if [[ ${CI_COMMIT_REF_PROTECTED} ]]; then
docker pull ${CI_REGISTRY_IMAGE}/ci || true
docker build --cache-from ${CI_REGISTRY_IMAGE}/ci -t ${CI_REGISTRY_IMAGE}/ci scripts/docker/ci
docker push ${CI_REGISTRY_IMAGE}/ci:latest
docker tag ${CI_REGISTRY_IMAGE}/tasking-manager:backend-${CI_COMMIT_REF_NAME} ${CI_REGISTRY_IMAGE}/tasking-manager:backend
docker push ${CI_REGISTRY_IMAGE}/tasking-manager:backend
docker tag ${CI_REGISTRY_IMAGE}/tasking-manager:frontend-${CI_COMMIT_REF_NAME} ${CI_REGISTRY_IMAGE}/tasking-manager:frontend
docker push ${CI_REGISTRY_IMAGE}/tasking-manager:frontend
fi
interruptible: true



install requirements:
image: registry.gitlab.com/gokaart/tasking-manager/ci:latest
stage: build
cache:
key: "cached-dependencies"
policy: pull-push
paths:
- .cache/npm
- .cache/pip
- frontend/node_modules
- env
script:
- echo "Just a job to pre-cache dependencies"
interruptible: true

javascript tests:
image: registry.gitlab.com/gokaart/tasking-manager/ci:latest
stage: test
script:
- |
echo "Run JS Unit tests"
# JS Unit Tests
cd frontend
yarn add --dev jest-junit
CI=true yarn test --coverage --coverageReporters=html --coverageReporters=cobertura --reporters=default --reporters=jest-junit
CI=true GENERATE_SOURCEMAP=false yarn build
interruptible: true
needs: ["install requirements"]
artifacts:
paths:
- frontend/junit.xml
- frontend/coverage
reports:
junit:
- frontend/junit.xml
cobertura:
- frontend/coverage/cobertura-coverage.xml

python lint:
image: registry.gitlab.com/gokaart/tasking-manager/ci:latest
stage: test
script:
- |
mkdir tests/backend/lint
. env/bin/activate
black --check manage.py backend tests migrations
flake8 manage.py backend tests migrations
interruptible: true
needs: ["install requirements"]

python tests:
image: registry.gitlab.com/gokaart/tasking-manager/ci:latest
stage: test
services:
- name: registry.gitlab.com/gokaart/docker-images/postgis:latest
variables:
APP_BASE_URL: "http://127.0.0.1"
POSTGRES_DB: test_database
POSTGRES_USER: runner
POSTGRES_PASSWORD: "completely random password here!"
POSTGRES_ENDPOINT: test_database
script:
- source env/bin/activate
- echo "APP_BASE_URL=\"${APP_BASE_URL}\"" > backend/tasking-manager.env
- echo "POSTGRES_DB=\"${POSTGRES_DB}\"" >> backend/tasking-manager.env
- echo "POSTGRES_USER=\"${POSTGRES_USER}\"" >> backend/tasking-manager.env
- echo "POSTGRES_PASSWORD=\"${POSTGRES_PASSWORD}\"" >> backend/tasking-manager.env
- echo "POSTGRES_ENDPOINT=\"${POSTGRES_ENDPOINT}\"" >> backend/tasking-manager.env
- cat backend/tasking-manager.env
- |
echo "Run Python Tests"
# Run Python tests
python3 -m unittest discover tests/backend
mkdir -p tests/server/results
find ./tests/server -name "test*.py" -exec chmod -x {} \;
./env/bin/nosetests ./tests/server --with-xunit \
--xunit-file $CI_PROJECT_DIR/tests/server/results/unitresults.xml \
--with-coverage --cover-erase --cover-package=./server
./env/bin/coverage xml -o $CI_PROJECT_DIR/tests/server/results/coverage.xml
interruptible: true
needs: ["install requirements"]
artifacts:
paths:
- test/server/results/
reports:
junit:
- tests/server/results/unitresults.xml
cobertura:
- tests/server/results/coverage.xml

code navigation:
image: registry.gitlab.com/gokaart/tasking-manager/ci:latest
stage: deploy
script:
- |
echo "Building code navigation"
npm install @sourcegraph/lsif-tsc
npx lsif-tsc frontend/src/**/* --AllowJs --checkJs --out dump_frontend.lsif
interruptible: true
needs: ["install requirements"]
artifacts:
reports:
lsif:
- dump_frontend.lsif
58 changes: 26 additions & 32 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@
[main]
host = https://www.transifex.com

[tasking-manager.master]
source_file = client/locale/en.json
[tasking-manager.version-4]
source_file = frontend/src/locales/en.json
source_lang = en
trans.ar = client/locale/ar.json
trans.bn = client/locale/bn.json
trans.cs = client/locale/cs.json
trans.da = client/locale/da.json
trans.de = client/locale/de.json
trans.es = client/locale/es.json
trans.fa_IR = client/locale/fa_IR.json
trans.fi = client/locale/fi.json
trans.fr = client/locale/fr.json
trans.gl = client/locale/gl.json
trans.hu = client/locale/hu.json
trans.id = client/locale/id.json
trans.it = client/locale/it.json
trans.ja = client/locale/ja.json
trans.ko = client/locale/ko.json
trans.lt = client/locale/lt.json
trans.mg = client/locale/mg.json
trans.nb = client/locale/nb.json
trans.nl_NL = client/locale/nl_NL.json
trans.pl = client/locale/pl.json
trans.pt = client/locale/pt.json
trans.pt_BR = client/locale/pt_BR.json
trans.ru = client/locale/ru.json
trans.si = client/locale/si.json
trans.sl = client/locale/sl.json
trans.ta = client/locale/ta.json
trans.uk = client/locale/uk.json
trans.vi = client/locale/vi.json
trans.zh_TW = client/locale/zh_TW.json
trans.ar = frontend/src/locales/ar.json
trans.cs = frontend/src/locales/cs.json
trans.de = frontend/src/locales/de.json
trans.el = frontend/src/locales/el.json
trans.es = frontend/src/locales/es.json
trans.fa_IR = frontend/src/locales/fa_IR.json
trans.fr = frontend/src/locales/fr.json
trans.he = frontend/src/locales/he.json
trans.hu = frontend/src/locales/hu.json
trans.id = frontend/src/locales/id.json
trans.it = frontend/src/locales/it.json
trans.ja = frontend/src/locales/ja.json
trans.ko = frontend/src/locales/ko.json
trans.mg = frontend/src/locales/mg.json
trans.ml = frontend/src/locales/ml.json
trans.nl_NL = frontend/src/locales/nl_NL.json
trans.pt = frontend/src/locales/pt.json
trans.pt_BR = frontend/src/locales/pt_BR.json
trans.sv = frontend/src/locales/sv.json
trans.sw = frontend/src/locales/sw.json
trans.tl = frontend/src/locales/tl.json
trans.tr = frontend/src/locales/tr.json
trans.uk = frontend/src/locales/uk.json
trans.zh_TW = frontend/src/locales/zh_TW.json
type = KEYVALUEJSON

48 changes: 48 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM quay.io/hotosm/base-python-image as base
LABEL version=0.1
LABEL maintainer="HOT Sysadmin <[email protected]>"
LABEL description="Builds backend docker image"

WORKDIR /usr/src/app

FROM base as builder

# Setup backend build-time dependencies
RUN apk update && \
apk add \
postgresql-dev \
gcc \
g++ \
python3-dev \
musl-dev \
libffi-dev \
geos-dev \
proj-util \
proj-dev \
make

COPY requirements.txt .

RUN pip install \
--prefix=/install \
--no-cache-dir \
--no-warn-script-location \
-r requirements.txt

# Setup backend runtime dependencies
FROM base

RUN apk update && \
apk add \
postgresql-libs geos proj-util

COPY --from=builder /install /usr/local
COPY backend backend/
COPY migrations migrations/
COPY scripts/world scripts/world/
COPY scripts/database scripts/database/
COPY manage.py .

ENV TZ UTC # Fix timezone (do not change - see issue #3638)
EXPOSE 5000
CMD ["gunicorn", "-c", "python:backend.gunicorn", "manage:application"]
Loading