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

Release/7.15 - Changes Since rapidpro/v7.2.4 #415

Open
wants to merge 2,296 commits into
base: ccl-v7.2.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2296 commits
Select commit Hold shift + click to select a range
f15776d
Fix tests
teehamaral Dec 21, 2022
c719a2b
Fix channel tests
teehamaral Dec 21, 2022
e192011
Merge branch 'dev/6.0' into release/6.0
teehamaral Dec 21, 2022
a06dec8
Include mGage
teehamaral Dec 21, 2022
9fbaa44
Temp - Change migration
teehamaral Dec 21, 2022
bb7c1c9
Temp - Change migration
teehamaral Dec 21, 2022
0ed9f96
Remove migrate cmd from entrypoint
teehamaral Dec 21, 2022
a4fe947
Revert changes
teehamaral Dec 21, 2022
9ec9df1
Update org limits
teehamaral Dec 21, 2022
7e30320
Merge branch 'dev/6.0' into feature/links-validation
teehamaral Dec 22, 2022
51be16d
Update flow editor version
teehamaral Dec 22, 2022
fd27109
Merge pull request #338 from greatnonprofits-nfp/feature/links-valida…
teehamaral Dec 23, 2022
17c79c1
integrated dialogflow training script
musamusa Dec 23, 2022
53fa6e0
added language conversion
musamusa Dec 30, 2022
06bbd91
Merge branch 'dev/6.0' into feature/CD-181-integrate-chatbot-training…
musamusa Jan 2, 2023
82fadce
refactor code based on code review feedback
musamusa Jan 3, 2023
3ac1697
Changed delay for event cleaning and labels for triggers
ihor-palii Jan 4, 2023
38cc39a
Merge pull request #340 from greatnonprofits-nfp/feature/CD-181-integ…
teehamaral Jan 5, 2023
70201f6
Merge pull request #341 from greatnonprofits-nfp/fix/wrong-campaings-…
teehamaral Jan 5, 2023
2b47705
Update flow editor version
teehamaral Jan 6, 2023
e318c14
Fix org deletion + missing migration
teehamaral Jan 12, 2023
e37619d
Code reformat
teehamaral Jan 12, 2023
b044001
Fix ContactImportBatch deletion
teehamaral Jan 12, 2023
52656c0
Merge pull request #342 from greatnonprofits-nfp/fix/org-deletion
teehamaral Jan 13, 2023
df4e4db
Fixed issue with parallel flow update
ihor-palii Jan 26, 2023
f9224f3
Added changes to notify users about session expired.
ihor-palii Jan 27, 2023
34ff961
Migration fix + Updated pre-comit-config file.
ihor-palii Jan 27, 2023
cd63efb
refactor training logic to resume push on resource exhausted exception
musamusa Jan 30, 2023
c4d13e2
Fix for migration issue.
ihor-palii Jan 30, 2023
36bfbe7
added upload template and more frontend refactor
musamusa Jan 30, 2023
f88c4b2
code lint
musamusa Jan 30, 2023
a9c4031
Code reformatting
teehamaral Jan 30, 2023
d2df86b
Add blank space
teehamaral Jan 30, 2023
bd03e1c
Fix for migration issue.
ihor-palii Jan 30, 2023
35b5f52
Added select all button on msgs page
ihor-palii Jan 31, 2023
d23ba04
Merge branch 'fix/session-timeout' of https://github.com/greatnonprof…
teehamaral Jan 31, 2023
debc4f2
Update flow editor version
teehamaral Jan 31, 2023
047ca3b
Merge pull request #346 from greatnonprofits-nfp/feature/msg-select-all
teehamaral Jan 31, 2023
d577ae4
Merge pull request #344 from greatnonprofits-nfp/fix/session-timeout
teehamaral Jan 31, 2023
0c08018
swapped empty string for null
musamusa Jan 31, 2023
bbed6cf
minor fixes
musamusa Jan 31, 2023
a98c389
fixed content bug
musamusa Jan 31, 2023
f9a7f7f
toggle previous upload report
musamusa Jan 31, 2023
4cc0196
use none instead if empty string
musamusa Jan 31, 2023
3aeb0aa
Merge pull request #345 from greatnonprofits-nfp/feature/CD-181-integ…
teehamaral Feb 1, 2023
28b0c81
Merge branch 'dev/6.0' into feature/CD-181-integrate-chatbot-training…
teehamaral Feb 2, 2023
84e3186
Fixed "Select All" button
ihor-palii Feb 2, 2023
c2a6488
Merge pull request #347 from greatnonprofits-nfp/feature/msg-select-all
teehamaral Feb 2, 2023
6afa758
Remove unnecessary migrations
teehamaral Feb 2, 2023
a72b20c
Remove reCaptcha from login/forget password forms
teehamaral Feb 2, 2023
71bb5e9
Merge pull request #348 from greatnonprofits-nfp/feature/remove-captcha
teehamaral Feb 3, 2023
878cc58
Fix redirect issue
teehamaral Feb 4, 2023
a7580ab
Merge branch 'dev/6.0' into feature/CD-181-integrate-chatbot-training…
teehamaral Feb 4, 2023
6f622fb
Change training email template
teehamaral Feb 4, 2023
435d003
Code reformat
teehamaral Feb 4, 2023
750de43
Fix 'Select all' button on label change
ihor-palii Feb 6, 2023
07ee3e8
Merge pull request #350 from greatnonprofits-nfp/feature/msg-select-all
teehamaral Feb 6, 2023
a529411
Merge pull request #349 from greatnonprofits-nfp/feature/CD-181-integ…
teehamaral Feb 6, 2023
b72f167
Add email template on exporting trackable links
teehamaral Feb 6, 2023
6ac6425
Merge pull request #351 from greatnonprofits-nfp/fix/export-notification
teehamaral Feb 6, 2023
9806b03
Fix email notification user
teehamaral Feb 7, 2023
1479cf1
Code reformat
teehamaral Feb 7, 2023
918cab2
Make language iso code dynamic
teehamaral Feb 7, 2023
9058a06
Merge pull request #352 from greatnonprofits-nfp/feature/CD-181-integ…
teehamaral Feb 7, 2023
6404815
Added changes to display segments count on campaign event edit page
ihor-palii Feb 6, 2023
ea5b4a7
Finished segment counter include template
ihor-palii Feb 9, 2023
a187c33
Include ignore errors field
teehamaral Feb 13, 2023
7162e75
Merge pull request #354 from greatnonprofits-nfp/feature/CD-181-integ…
teehamaral Feb 13, 2023
be29062
Merge pull request #353 from greatnonprofits-nfp/feature/campaign-enc…
teehamaral Feb 13, 2023
7388e98
(Fix) duplicated fields
ihor-palii Feb 14, 2023
2c68352
Merge pull request #355 from greatnonprofits-nfp/feature/campaign-enc…
teehamaral Feb 14, 2023
13ab278
Changes to add encoding replacement to training bot page
ihor-palii Feb 15, 2023
386e39d
Message display
ihor-palii Feb 15, 2023
32d4ed3
Fix merging issue
ihor-palii Feb 16, 2023
23da845
Merge pull request #356 from greatnonprofits-nfp/feature/classifier-e…
teehamaral Feb 17, 2023
e0a34b0
Added wide range language support
ihor-palii Feb 22, 2023
6992259
Updated unittests
ihor-palii Feb 23, 2023
12f7fc9
Merge pull request #357 from greatnonprofits-nfp/feature/extend-lang-…
teehamaral Feb 24, 2023
60938a8
Fix issues on the text replacement
teehamaral Mar 7, 2023
9020a31
Merge pull request #359 from greatnonprofits-nfp/feature/classifier-e…
teehamaral Mar 7, 2023
979537f
Add flowtemplate permission to administrators
teehamaral Mar 15, 2023
9df5b78
Add alert msg when the language list does not match with the file header
teehamaral Mar 15, 2023
6bd2e87
Merge branch 'dev/6.0' into feature/classifier-encoding-replacement
teehamaral Mar 15, 2023
df1a2f7
Black reformat
teehamaral Mar 15, 2023
b0ab9d1
Merge branch 'nyaruka/7.2.4' into dev/7.0
ihor-palii Mar 30, 2023
46b06ed
Updated poetry.lock
ihor-palii Mar 30, 2023
e84ba2c
Fixed bad imports
ihor-palii Mar 30, 2023
8293575
Merged migrations
ihor-palii Apr 5, 2023
2665b8b
Updated floweditor version
ihor-palii Apr 7, 2023
eed9274
Removed duplicated readonly connection
ihor-palii Apr 7, 2023
88ecd11
Fix unittest
ihor-palii Apr 7, 2023
b2c19ab
Merge remote-tracking branch 'origin/dev/7.0' into dev/7.0
ihor-palii Apr 12, 2023
d9d4339
Fix unittest
ihor-palii Apr 12, 2023
b492a9f
Add mailroom_test.dump updated
teehamaral Apr 12, 2023
5660de4
Updated poetry.lock
ihor-palii Apr 13, 2023
30aa8e3
Merge branch 'dev/7.0' of github.com:greatnonprofits-nfp/rapidpro int…
ihor-palii Apr 13, 2023
01e269e
executed isort
ihor-palii Apr 13, 2023
6a0497c
Updated pre-commit script
ihor-palii Apr 13, 2023
26f74e3
Fixed failed test
ihor-palii Apr 13, 2023
741e85a
Add codecov token
teehamaral Apr 13, 2023
df960f8
Reverted message UUIDs feature
ihor-palii Apr 14, 2023
028abbe
feat: flow object on msgs API endpoint
teehamaral Apr 18, 2023
88ef575
fix: msg tests
teehamaral Apr 18, 2023
e16b8b6
fix: print button on flow editor
teehamaral Apr 18, 2023
f4de580
fix: tabs alignment
teehamaral Apr 18, 2023
b443f67
feat: make mgage as beta only
teehamaral Apr 18, 2023
ffa5099
Update flow editor version
teehamaral Apr 19, 2023
b4c9d35
feat: remove combine flows menu
teehamaral Apr 19, 2023
e3f9a2f
fix: remove beta_only from mgage
teehamaral Apr 21, 2023
b9ef8d5
fix: delete campaign event
teehamaral Apr 24, 2023
acafcd3
feat: add function to handle backfill msg flow
teehamaral Apr 25, 2023
6f25f6b
fix: change log level to warning
teehamaral Apr 25, 2023
1c1b98e
fix: code reformat
teehamaral Apr 25, 2023
48f1286
Merge pull request #368 from greatnonprofits-nfp/feat/backfill_msg_flow
teehamaral Apr 26, 2023
c53bc68
feat: add model for SMPP log
teehamaral May 4, 2023
e29f4ae
fix: migrations
teehamaral May 4, 2023
8cd86ec
fix: remove segments function
teehamaral May 4, 2023
210e109
fix: code reformat
teehamaral May 4, 2023
ae3fc61
Merge pull request #369 from greatnonprofits-nfp/feat/smpp-reporting
teehamaral May 9, 2023
97b28ca
Added WebChat option to store history
ihor-palii May 23, 2023
5b95aac
fix: poetry on ci
teehamaral May 23, 2023
b5c771c
feat: include run id log
teehamaral May 30, 2023
09ddb77
feat: make store history default as false
teehamaral May 31, 2023
9d1d503
fix: code reformat
teehamaral May 31, 2023
21dd60d
Merge pull request #370 from greatnonprofits-nfp/feature/webchat-history
teehamaral Jun 1, 2023
0a25727
feat: include store history on webchat simulator
teehamaral Jun 1, 2023
b3ff306
Merge branch 'feature/webchat-history' into dev/7.0
teehamaral Jun 1, 2023
7d41937
(WIP) Model and view chnages
ihor-palii Jun 7, 2023
8a42d3d
(WIP) Similarity checking added
ihor-palii Jun 9, 2023
c56038d
(WIP) Example and list of active tasks
ihor-palii Jun 13, 2023
596009a
feat: update mailroom dump file
teehamaral Jun 13, 2023
f2a9002
Added email notification on task complete
ihor-palii Jun 13, 2023
b6d38a6
Replaced equal comparison with jaro_similarity
ihor-palii Jun 13, 2023
159c7a1
Added requested changes
ihor-palii Jun 21, 2023
fc51021
Merge pull request #371 from greatnonprofits-nfp/feature/duplicate-check
teehamaral Jun 22, 2023
e31da65
Added width/height support for webchat
ihor-palii Jun 30, 2023
d9f2913
Merge branch 'dev/7.0' into feature/chatbot-size
ihor-palii Jun 30, 2023
31ce16c
Merge pull request #372 from greatnonprofits-nfp/feature/chatbot-size
teehamaral Jul 3, 2023
b154e94
chore: add px suffix
teehamaral Jul 3, 2023
ff1d967
Merge branch 'feature/chatbot-size' into dev/7.0
teehamaral Jul 3, 2023
998260f
Merge pull request #373 from greatnonprofits-nfp/feature/webchat-history
teehamaral Jul 4, 2023
be16ead
feat: make never as default on retry voice flow
teehamaral Jul 5, 2023
b44ee07
Merge pull request #374 from greatnonprofits-nfp/feat/default-never-r…
teehamaral Jul 6, 2023
7ca53e8
feat: validate minimum width/height
teehamaral Jul 7, 2023
3532735
Merge branch 'dev/7.0' into feature/chatbot-size
teehamaral Jul 7, 2023
61e6f84
Added group creation during congtact import
ihor-palii Jul 10, 2023
1ef5ddc
Skip loading twilio stats on home page
ihor-palii Jul 12, 2023
42427a5
Merge pull request #375 from greatnonprofits-nfp/feature/add-to-groups
teehamaral Jul 12, 2023
4afdf34
Removed combine flows feature as the link was removed previously
ihor-palii Jul 13, 2023
6e4607d
Fixed issue with flow launch without contact number
ihor-palii Jul 13, 2023
17b47ad
Fix language import
ihor-palii Jul 13, 2023
565940a
Merge pull request #376 from greatnonprofits-nfp/fix/bug-fixes
teehamaral Jul 13, 2023
851b270
Merge pull request #377 from greatnonprofits-nfp/dev/7.0
teehamaral Jul 18, 2023
1af823d
Added chages to display retry call logs
ihor-palii Jul 19, 2023
b9317bf
Added requested changes
ihor-palii Jul 25, 2023
1dd8bfa
Added changes to hide sensitive information for twilio channels
ihor-palii Jul 25, 2023
acee342
Fix failed tests
ihor-palii Jul 25, 2023
4c625ec
Merge pull request #378 from greatnonprofits-nfp/feature/retry-call-logs
teehamaral Jul 26, 2023
1625c96
Merge pull request #379 from greatnonprofits-nfp/feature/hide-sens-logs
teehamaral Jul 26, 2023
5ce7cf6
Merge pull request #380 from greatnonprofits-nfp/dev/7.0
teehamaral Aug 2, 2023
e5a8d0d
Added dockerfile to gitignore
ihor-palii Aug 7, 2023
58d0489
Updated flatpickr library
ihor-palii Aug 11, 2023
75f88ee
Merge pull request #381 from greatnonprofits-nfp/fix/triggers-schedule
teehamaral Aug 15, 2023
628965c
Fixed issue with password reentering
ihor-palii Aug 22, 2023
f740f87
Merge pull request #382 from greatnonprofits-nfp/feature/rework-signup
teehamaral Aug 22, 2023
fb44177
Merge branch 'dev/7.0' into release/7.4
teehamaral Aug 22, 2023
16db8af
Created fix for delete_org_task
ihor-palii Aug 25, 2023
f19789a
Fix unittests
ihor-palii Aug 29, 2023
0b1e9ba
Merge pull request #383 from greatnonprofits-nfp/fix/orgs-delete
teehamaral Aug 29, 2023
13e9dd5
update smartmin and parsepy repo url
teehamaral Sep 1, 2023
0b34626
update smartmin and parsepy repo url
teehamaral Sep 1, 2023
14a82fa
Created script to migrate s3 data
ihor-palii Sep 5, 2023
02e83c5
Added requested changes
ihor-palii Sep 6, 2023
9367cfd
Merge pull request #384 from communityconnectlabs/feature/s3-migratio…
teehamaral Sep 8, 2023
d4937c9
Fixed issue with celery
ihor-palii Sep 12, 2023
5184d8a
Merge pull request #385 from communityconnectlabs/feature/s3-migratio…
teehamaral Sep 12, 2023
c0c650a
Merge pull request #386 from communityconnectlabs/dev/7.0
teehamaral Sep 13, 2023
6a66538
Added extra BytesIO as temp storage before copying
ihor-palii Sep 14, 2023
1237f0e
Merge pull request #387 from communityconnectlabs/feature/s3-migratio…
teehamaral Sep 14, 2023
2af177d
Added files list pagination
ihor-palii Sep 19, 2023
9886197
Merge pull request #388 from communityconnectlabs/feature/s3-migratio…
teehamaral Sep 19, 2023
0b50dae
Added changes to configure combined webchat
ihor-palii Sep 27, 2023
3fb62d5
Added requested changes
ihor-palii Sep 27, 2023
9b09f7e
Merge pull request #389 from communityconnectlabs/feature/combined-ui
teehamaral Sep 28, 2023
a2dbf8c
feat: add nofollow tags
teehamaral Sep 29, 2023
a2e5b60
code reformat
teehamaral Sep 29, 2023
9c11872
Merge pull request #390 from communityconnectlabs/feat/nofollow-tags
teehamaral Sep 30, 2023
2374cd1
improve: add email alert when s3 migration gets finished
teehamaral Sep 30, 2023
12ad37a
feat: include ivr/sms channels mapping
teehamaral Oct 5, 2023
8d9a93e
feat: add nofollow tags
teehamaral Oct 10, 2023
a24d480
Merge pull request #391 from communityconnectlabs/feat/channel-mapping
teehamaral Oct 11, 2023
81fa17b
feat: add config to the org env
teehamaral Oct 18, 2023
bf244c8
Added changes to support widget config update
ihor-palii Oct 24, 2023
50efbf1
Merge pull request #392 from communityconnectlabs/feature/combined-ui
teehamaral Oct 24, 2023
c74ada7
fix: use term default instead of preferred
teehamaral Oct 27, 2023
cbe2821
fix: test tweak
teehamaral Nov 4, 2023
ab381d3
Merge pull request #393 from communityconnectlabs/feat/channel-mapping
teehamaral Nov 7, 2023
eb8b839
feat: add calendar automation setup
teehamaral Nov 14, 2023
1a9b1cd
fix: format
teehamaral Nov 14, 2023
e15d8cf
Fixed bug with schedule message formax
ihor-palii Nov 15, 2023
6d9dcdf
Merge pull request #394 from communityconnectlabs/fix/save-shedule-msg
teehamaral Nov 16, 2023
b68ff9b
Merge pull request #395 from communityconnectlabs/dev/7.0
teehamaral Nov 22, 2023
8f67da1
update flow editor version
teehamaral Nov 23, 2023
b99fd84
Merge branch 'feat/calendar-automation' into dev/7.0
teehamaral Nov 23, 2023
fded4c7
fix: metadata when the json field is empty
teehamaral Nov 24, 2023
2fe51aa
Merge branch 'feat/calendar-automation' into dev/7.0
teehamaral Nov 24, 2023
eabdf7b
update flow editor version
teehamaral Dec 11, 2023
3e59581
update floweditor
teehamaral Dec 14, 2023
3b8a99b
Fixed issue with session not being expired
ihor-palii Dec 19, 2023
93a27ab
black + flake8
ihor-palii Dec 19, 2023
c47eead
fix test
teehamaral Dec 19, 2023
834f44e
Merge pull request #398 from communityconnectlabs/dev/7.0
teehamaral Dec 20, 2023
c359ee1
fix failed test
ihor-palii Dec 20, 2023
17abbb4
Merge pull request #396 from communityconnectlabs/fix/session-timeout
teehamaral Dec 20, 2023
ebebbf7
fix: template phrase and remove stay button
teehamaral Jan 2, 2024
b5b7671
Merge pull request #399 from communityconnectlabs/fix/session-timeout
teehamaral Jan 2, 2024
4526a72
Merge pull request #400 from communityconnectlabs/dev/7.0
teehamaral Jan 17, 2024
c22ab27
feat: add shortener custom domain
teehamaral Jan 19, 2024
284c16f
fix: change domain validation logic
teehamaral Jan 23, 2024
19891b2
code reformat
teehamaral Jan 23, 2024
1cf2384
Merge pull request #401 from communityconnectlabs/feature/shorten-lin…
teehamaral Jan 23, 2024
eaac56b
feat: change descriptions
teehamaral Jan 30, 2024
0e30e2f
Merge branch 'feature/shorten-link-custom-domain' into dev/7.0
teehamaral Jan 30, 2024
af93ddb
Merge pull request #402 from communityconnectlabs/dev/7.0
teehamaral Jan 31, 2024
a8305ea
fix description
teehamaral Jan 31, 2024
0fb117f
Merge branch 'dev/7.0' into release/7.10
teehamaral Jan 31, 2024
1eaf014
rename iloko lang
teehamaral Feb 2, 2024
a0c9ad8
Merge pull request #403 from communityconnectlabs/dev/7.0
teehamaral Feb 2, 2024
aef4556
feat: ccl webchat on msgs, contacts and flows
teehamaral Feb 27, 2024
853703d
Merge pull request #404 from communityconnectlabs/feat/ccl-webchat
teehamaral Feb 27, 2024
a8cf2ef
feat: make webchat available in all pages except on login
teehamaral Mar 8, 2024
ebac7a4
Merge pull request #405 from communityconnectlabs/dev/7.0
teehamaral Mar 13, 2024
a1e50a9
feat: improve ux for large sends
teehamaral Apr 23, 2024
26bd32f
feat: disable primary button when there's an error
teehamaral Apr 30, 2024
7b05e78
fix: unable create button on error
teehamaral May 3, 2024
7b1fc4f
feat: add max limit to chunks size field
teehamaral May 6, 2024
020999c
Merge branch 'dev/7.0' into release/7.12
teehamaral May 7, 2024
28722c5
feat: add answered_by field on channels connections for ivr
teehamaral May 16, 2024
c158429
code reformat
teehamaral May 29, 2024
1cae5f7
Merge pull request #406 from communityconnectlabs/feat/vonage-machine…
teehamaral May 31, 2024
9f8a409
feat: add opt-out disable functionality
teehamaral May 31, 2024
64c8af2
Merge pull request #407 from communityconnectlabs/feat/soft-opt-out
teehamaral Jun 3, 2024
f502c8b
feat: add opt-out disable functionality
teehamaral May 31, 2024
8534667
Merge pull request #408 from communityconnectlabs/cherry-pick/soft-op…
teehamaral Jun 24, 2024
f3d4a91
feat: increase expiration flow editor session to 300s
teehamaral Jul 2, 2024
1a4b013
feat: add ivr filenames
teehamaral Jul 12, 2024
b5357cc
Merge pull request #409 from communityconnectlabs/dev/7.0
teehamaral Jul 16, 2024
99f4517
feat: update flow editor + make analyzer available only for customer …
teehamaral Jul 24, 2024
d8f935c
feat: update flow editor
teehamaral Aug 5, 2024
da6e6c3
fix: redirect trackable link with multiple query params
teehamaral Aug 6, 2024
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ignore_errors = True
precision = 0
show_missing = True
skip_covered = True
exclude_lines =
exclude_lines =
pragma: no cover
pragma: needs cover
pragma: can't cover
Expand Down
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
env
env_py3
node_modules
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,22 @@ jobs:
npm install
sudo npm install -g less
ln -s ${{ github.workspace }}/temba/settings.py.dev ${{ github.workspace }}/temba/settings.py
poetry run ./manage.py migrate
poetry run python manage.py migrate
# fetch and extract rp-indexer
wget https://github.com/nyaruka/rp-indexer/releases/download/v${{ env.rpindexer-version }}/rp-indexer_${{ env.rpindexer-version }}_linux_amd64.tar.gz
tar -xvf rp-indexer_${{ env.rpindexer-version }}_linux_amd64.tar.gz rp-indexer
# fetch, extract and start mailroom
wget https://github.com/nyaruka/mailroom/releases/download/v${{ env.mailroom-version }}/mailroom_${{ env.mailroom-version }}_linux_amd64.tar.gz
wget https://github.com/rapidpro/mailroom/releases/download/v${{ env.mailroom-version }}/mailroom_${{ env.mailroom-version }}_linux_amd64.tar.gz
tar -xvf mailroom_${{ env.mailroom-version }}_linux_amd64.tar.gz mailroom
./mailroom -db=postgres://temba:temba@localhost:5432/temba?sslmode=disable -redis=redis://localhost:6379/10 -log-level=info > mailroom.log &

- name: Run pre-test checks
run: |
# test that everything is well formatted, no missing migrations etc
poetry run ./code_check.py --debug
poetry run python code_check.py --debug
# check we can collect and compress all static files
poetry run ./manage.py collectstatic --noinput --verbosity=0
poetry run ./manage.py compress --extension=".haml" --settings=temba.settings_compress
poetry run python manage.py collectstatic --noinput --verbosity=0
poetry run python manage.py compress --extension=".haml" --settings=temba.settings_compress

- name: Run tests
run: |
Expand All @@ -98,4 +98,5 @@ jobs:
if: success()
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
112 changes: 112 additions & 0 deletions .github/workflows/owasp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: OWASP ZAP Scanning
on:
push:
branches:
- 'feature/owasp-scanning'
- 'dev/*'
- 'release/*'
pull_request:
branches:
- 'dev/*'
- 'release/*'
jobs:
zap_scan:
name: Scan the WEB Application
runs-on: ubuntu-latest
env:
python_version: '3.9.x'
postgis_version: '3.1'
pg_version: '12'
redis_version: '5'
node_version: '10'
elastic_version: '7.10.1'
rpindexer_version: '6.4.0'
mailroom_version: '6.5.36'
DJANGO_SETTINGS_MODULE: temba.settings_ci
email_url: ${{secrets.MAIL_SERVER_ADDRESS}}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install PostgreSQL and PostGIS
uses: nyaruka/[email protected]
with:
postgresql version: ${{ env.pg_version }}
postgis version: ${{ env.postgis_version }}
postgresql db: temba
postgresql user: temba
postgresql password: temba
postgresql arguments: '--jit=off'

- name: Install Linux packages
run: |
sudo apt update
sudo apt install -y --no-install-recommends libgdal-dev gettext

- name: Install Python
uses: actions/setup-python@v1
with:
python-version: ${{ env.python_version }}

- name: Install Redis
uses: zhulik/[email protected]
with:
redis version: ${{ env.redis_version }}

- name: Install ElasticSearch
uses: nyaruka/elasticsearch-action@master
with:
elastic version: ${{ env.elastic_version }}

- name: Install Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.node_version }}

- name: Initialize environment
run: |
python -m pip install -U pip poetry
poetry install
npm install
sudo npm install -g less
ln -s ${{ github.workspace }}/temba/settings.py.dev ${{ github.workspace }}/temba/settings.py
poetry run python manage.py migrate

- name: Run RP-Indexer
run: |
# fetch and extract rp-indexer
wget https://github.com/nyaruka/rp-indexer/releases/download/v${{ env.rpindexer_version }}/rp-indexer_${{ env.rpindexer_version }}_linux_amd64.tar.gz
tar -xvf rp-indexer_${{ env.rpindexer_version }}_linux_amd64.tar.gz rp-indexer

- name: Run Mailroom
run: |
# fetch, extract and start mailroom
wget https://github.com/rapidpro/mailroom/releases/download/v${{ env.mailroom_version }}/mailroom_${{ env.mailroom_version }}_linux_amd64.tar.gz
tar -xvf mailroom_${{ env.mailroom_version }}_linux_amd64.tar.gz mailroom
./mailroom -db=postgres://temba:temba@localhost:5432/temba?sslmode=disable -redis=redis://localhost:6379/10 -log-level=info > mailroom.log &

- name: Run RapidPro
run: |
poetry run python manage.py runserver > rapidpro.log &

- name: ZAP Scan
uses: zaproxy/[email protected]
with:
target: 'http://127.0.0.1:8000'
rules_file_name: '.zap/rules.tsv'
cmd_options: '-a'
allow_issue_writing: false

- name: Send mail
if: ${{ env.email_url }}
uses: dawidd6/action-send-mail@v3
with:
server_address: ${{secrets.MAIL_SERVER_ADDRESS}}
server_port: ${{secrets.MAIL_SERVER_PORT}}
username: ${{secrets.MAIL_USERNAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: Github OWASP Scanning Action job result
from: ${{secrets.MAIL_DEFAULT_FROM}}
to: ${{secrets.MAIL_SEND_OWASP_RESULT_TO}}
body: Scanning job of ${{github.repository}} completed successfully!
attachments: report_html.html
16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ config/gen
config/settings.py
coverage-report
celerybeat-schedule.db
celerybeat-schedule
db
node_modules
parser.out
Expand Down Expand Up @@ -125,4 +126,17 @@ ansible/site.retry
.vscode/

# autoenv
.direnv/
.direnv/

# CCL Custom
env_py3/
rp-indexer/
media/cache/
media/flow_pdf/
media/duplicates_check/
temba/settings_test.py
docker.settings.aptible-prod
docker.settings.aptible-stage
docker.settings.prod
Dockerfile
.env
7 changes: 7 additions & 0 deletions .platform/nginx/conf.d/proxy.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
client_max_body_size 200M;
client_header_timeout 300;
client_body_timeout 300;
send_timeout 300;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.11.5
hooks:
- id: isort
files: 'temba'

- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.9
args: ['--line-length=119', '--target-version=py36']
files: 'temba'

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
args: ['--max-line-length=119', '--ignore=E501,F405,T003,E203,W503']
files: 'temba'
Empty file added .travis.yml
Empty file.
2 changes: 2 additions & 0 deletions .zap/rules.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
10011 IGNORE (Cookie Without Secure Flag)
10015 IGNORE (Incomplete or No Cache-control and Pragma HTTP Header Set)
12 changes: 12 additions & 0 deletions Dockerrun.aws.json.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "DOCKER_IMAGE_NAME",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "8000"
}
]
}
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# RapidPro

[![Build Status](https://github.com/rapidpro/rapidpro/workflows/CI/badge.svg)](https://github.com/rapidpro/rapidpro/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/rapidpro/rapidpro/branch/main/graph/badge.svg)](https://codecov.io/gh/rapidpro/rapidpro)
[![Build Status](https://github.com/greatnonprofits-nfp/rapidpro/workflows/CI/badge.svg)](https://github.com/rapidpro/rapidpro/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/greatnonprofits-nfp/rapidpro/branch/main/graph/badge.svg)](https://codecov.io/gh/greatnonprofits-nfp/rapidpro)

RapidPro is a hosted service for visually building interactive messaging applications.
To learn more, please visit the project site at http://rapidpro.github.io/rapidpro.
Expand Down Expand Up @@ -47,7 +47,12 @@ version of these dependencies you need to run with it.
## Updating FlowEditor version

```
% npm install @nyaruka/flow-editor@whatever-version --save
% npm install @greatnonprofits-nfp/flow-editor@whatever-version --save
```

## Installing pre-commit to lint and format the code
```bash
pre-commit install
```

### Get Involved
Expand Down
2 changes: 1 addition & 1 deletion code_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def status(line):

if not args.skip_flake:
status("Running flake8")
cmd("flake8")
cmd("flake8 temba --ignore=E501,F405,T003,E203,W503,F541,E741")

# if any code changes were made, exit with error
if cmd("git diff temba locale"):
Expand Down
48 changes: 48 additions & 0 deletions docker/Dockerfile.app
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM greatnonprofits/ccl-base:v4

RUN wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem \
-O /usr/local/share/ca-certificates/rds.crt
RUN update-ca-certificates

RUN wget https://ccl-prod.s3.us-west-1.amazonaws.com/phantomjs-2.1.1-linux-x86_64.tar.bz2
RUN tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/
RUN ln -sf /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin

RUN mkdir /rapidpro
WORKDIR /rapidpro

COPY ./pyproject.toml /rapidpro/pyproject.toml
COPY ./poetry.lock /rapidpro/poetry.lock

RUN pip3 install --upgrade pip setuptools
RUN pip3 install -U poetry

RUN poetry export --without-hashes --output pip-freeze.txt

RUN pip3 install -r pip-freeze.txt

COPY . /rapidpro
COPY docker/docker.settings /rapidpro/temba/settings.py

RUN npm install

RUN python3.9 manage.py collectstatic --noinput

RUN echo "daemon off;" >> /etc/nginx/nginx.conf

RUN rm -f /etc/nginx/sites-enabled/default
RUN ln -sf /rapidpro/docker/nginx.conf /etc/nginx/sites-enabled/

RUN rm -f /rapidpro/temba/settings.pyc

COPY docker/entrypoint.sh /
RUN chmod +x /entrypoint.sh

RUN ln -s /usr/bin/python3.9 /usr/bin/python
RUN rm -rf /tmp/* /var/tmp/*[~]$

EXPOSE 8000

ENTRYPOINT ["/entrypoint.sh"]

CMD ["app"]
41 changes: 41 additions & 0 deletions docker/Dockerfile.celery
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM greatnonprofits/ccl-base:v4

RUN wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem \
-O /usr/local/share/ca-certificates/rds.crt
RUN update-ca-certificates

RUN wget https://ccl-prod.s3.us-west-1.amazonaws.com/phantomjs-2.1.1-linux-x86_64.tar.bz2
RUN tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/
RUN ln -sf /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin

RUN mkdir /rapidpro
WORKDIR /rapidpro

COPY ./pyproject.toml /rapidpro/pyproject.toml
COPY ./poetry.lock /rapidpro/poetry.lock

RUN pip3 install --upgrade pip setuptools
RUN pip3 install -U poetry

RUN poetry export --without-hashes --output pip-freeze.txt

RUN pip3 install -r pip-freeze.txt

COPY . /rapidpro
COPY docker/docker.settings /rapidpro/temba/settings.py

RUN npm install

RUN rm -f /rapidpro/temba/settings.pyc

COPY docker/entrypoint.sh /
RUN chmod +x /entrypoint.sh

RUN ln -s /usr/bin/python3.9 /usr/bin/python
RUN rm -rf /tmp/* /var/tmp/*[~]$

EXPOSE 8000

ENTRYPOINT ["/entrypoint.sh"]

CMD ["celery"]
24 changes: 24 additions & 0 deletions docker/clear-compressor-cache.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import redis

from django.conf import settings
from django.core.cache import cache

settings.configure()

key_prefix = cache.make_key('django_compressor')

redis_host = os.environ.get("REDIS_HOST", "localhost")
redis_port = int(os.environ.get("REDIS_PORT", 6379))
redis_password = os.environ.get("REDIS_PW", None)
redis_db = int(os.environ.get("REDIS_DB", 10))

if redis_password is None:
redis = redis.Redis(host=redis_host, port=redis_port, db=redis_db)
else:
redis = redis.Redis(host=redis_host, port=redis_port, db=redis_db, password=redis_password)

keys = redis.keys('%s.*' % (key_prefix,))
for key in keys:
redis.delete(key)
print('Cleared Django Compressor key: %s' % (key,))
Loading
Loading