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

CI Test #7

Open
wants to merge 302 commits into
base: dev/7.6.x
Choose a base branch
from
Open
Changes from 26 commits
Commits
Show all changes
302 commits
Select commit Hold shift + click to select a range
fd0dc58
fixes mis-declared translation for selectOntologyProperty, re #10666
whatisgalen Apr 17, 2024
430e791
includes fix from PR review, re #10666
whatisgalen Apr 17, 2024
c8b2fcf
returns deleted_count from graph.delete_instances(), renames var, re …
whatisgalen Apr 17, 2024
0e79799
merge #10738
chrabyrd Apr 18, 2024
2bfc60f
nit #10738
chrabyrd Apr 18, 2024
e900e12
deletes coverage.json #10738
chrabyrd Apr 18, 2024
bede125
Merge branch 'dev/7.6.x' of https://github.com/archesproject/arches i…
chrabyrd Apr 18, 2024
4e2c3b5
re-orgs into single query, assigns bar count to delete_count, rm incr…
whatisgalen Apr 18, 2024
edc63d4
rm unnecessary print statement; bar.update already prints, re #10781
whatisgalen Apr 18, 2024
f8aea9a
Merge branch 'dev/7.6.x' of https://github.com/archesproject/arches i…
chrabyrd Apr 18, 2024
cf42883
Merge f8aea9a03ca3055e553bde35e3190be9f6ac5605 into ea9b3d02ee4f632b6…
chrabyrd Apr 18, 2024
274420e
automatically update coverage.json
invalid-email-address Apr 18, 2024
195b210
nit #10738
chrabyrd Apr 18, 2024
a366e2f
Merge 195b2105dd7f700c2c46967c4b1a7f9c3342e415 into ea9b3d02ee4f632b6…
chrabyrd Apr 18, 2024
35315ca
automatically update coverage.json
invalid-email-address Apr 18, 2024
11b692d
Revert "rm unnecessary print statement; bar.update already prints, re…
whatisgalen Apr 18, 2024
37fee10
includes request in kwargs for graph.delete_instances, re #10781
whatisgalen Apr 18, 2024
c640753
leverages BulkDataDeletion module to delete and index graph resources…
whatisgalen Apr 18, 2024
8582c3a
passes request to graph.delete_instances, defines returned response, …
whatisgalen Apr 18, 2024
5461c9a
includes addtnl kwarg on result response in bulk delete_resources to …
whatisgalen Apr 18, 2024
292ab2d
passes returned response from bulk_deleter to graph view from graph.d…
whatisgalen Apr 18, 2024
2f1c486
changes graph.delete_instances(request) to pos arg, re #10781
whatisgalen Apr 18, 2024
6179141
puts bulk_deleter delete_resources user lookup in try/except for no u…
whatisgalen Apr 18, 2024
45b905a
changes request to userid kwarg, optional, re #10781
whatisgalen Apr 18, 2024
61691d7
adds check on PR approval to ensure feature branch is up-to-date with…
chrabyrd Apr 18, 2024
08e8c90
Merge 61691d7ad4a01f0520037913c2fde1a8acbbfda0 into ea9b3d02ee4f632b6…
chrabyrd Apr 18, 2024
aab25ba
automatically update coverage.json
invalid-email-address Apr 18, 2024
be4bcfb
fix for python3.11 f string compat issue, re #10781
whatisgalen Apr 18, 2024
81198ff
adds verbose kwarg and logic to bulk_deleter delete_resources(), re #…
whatisgalen Apr 19, 2024
29141f8
passes verbose kwarg from graph.delete_instances() to bulk_deleter.de…
whatisgalen Apr 19, 2024
be62675
rm redundant var, re #10781
whatisgalen Apr 19, 2024
0f9bc4d
reverts check for latest version of target branch -- opted to used st…
chrabyrd Apr 19, 2024
94933c1
Merge branch '10738-cbyrd-add-github-action-test-coverage-enforcement…
chrabyrd Apr 19, 2024
bf966df
Merge branch 'dev/7.6.x' of https://github.com/archesproject/arches i…
chrabyrd Apr 19, 2024
f3b3248
Merge bf966dfb0fda8a8f2eba517b7ebc2f7a110b8853 into ca5a4648e876b8337…
chrabyrd Apr 19, 2024
66216dc
automatically update coverage.json
invalid-email-address Apr 19, 2024
2680c57
Remove `django-libsass` dependency
jacobtylerwalls Apr 22, 2024
5c139d7
replace deleted_ct incrementor with .count query, re #10781
whatisgalen Apr 22, 2024
fdc9ef2
replace try except for userid=None with if else, re #10781
whatisgalen Apr 22, 2024
6ca9936
fixes gettext success msg for bulk_data.delete_resources, re #10781
whatisgalen Apr 22, 2024
e2acf97
moves import statement of bulkdeleter from method to file header, re …
whatisgalen Apr 22, 2024
170a2e0
adds line in changelog for 7.6.0 re #10781
whatisgalen Apr 22, 2024
5070f4a
Update prov edits using tile handlers, #10633
chiatt Apr 22, 2024
5923bf9
Refresh file and map widget when prov edits change, #10633
chiatt Apr 22, 2024
f3bab41
Let the database parse a list as a query parameter #9444
johnatawnclementawn Apr 23, 2024
6235287
Add #9444 fix to release notes
johnatawnclementawn Apr 23, 2024
7946946
Merge branch 'dev/7.6.x' of https://github.com/archesproject/arches i…
chrabyrd Apr 24, 2024
42653b7
Merge branch '10738-cbyrd-add-github-action-test-coverage-enforcement…
chrabyrd Apr 24, 2024
e594302
Merge 42653b7e3cdde38323d53e05ace0bc41bdd4d703 into 6c56c6521357733f4…
chrabyrd Apr 24, 2024
158feeb
automatically update coverage.json
invalid-email-address Apr 24, 2024
3431382
nit #10738
chrabyrd Apr 24, 2024
cd6762b
Merge branch '10738-cbyrd-add-github-action-test-coverage-enforcement…
chrabyrd Apr 24, 2024
0acb7bf
nit #10738
chrabyrd Apr 24, 2024
fcea678
removes coverage.json && adds /tests/ to coverage ignore list
chrabyrd Apr 24, 2024
4f673cc
Merge pull request #10832 from archesproject/cbyrd-remove-coverage.json
chrabyrd Apr 24, 2024
231e4ed
merge #10738
chrabyrd Apr 24, 2024
03911da
Allow for CLI purge of edit_log entries #9788
johnatawnclementawn Apr 25, 2024
65cc565
Return tiles holding only None from get_tile_data()
jacobtylerwalls Apr 25, 2024
6816d8a
Merge pull request #10739 from archesproject/10738-cbyrd-add-github-a…
apeters Apr 25, 2024
4b1d084
Revert "Add #9444 fix to release notes"
johnatawnclementawn Apr 26, 2024
48a25f4
Moving #9444 bug fix to 7.5.3 release notes
johnatawnclementawn Apr 26, 2024
343f42d
Remove changes to remove_resources method in anticipation of #10782
johnatawnclementawn Apr 26, 2024
30f7799
nit #9788
johnatawnclementawn Apr 26, 2024
163c901
nit #9788
johnatawnclementawn Apr 26, 2024
c146492
Merge pull request #10834 from archesproject/jtw/fix-tiles-holding-on…
aj-he Apr 27, 2024
16f941d
fixes merge conflict in release file for 7.6, re #10781
whatisgalen Apr 28, 2024
00399b8
reverts signature default val for userid in delete_instances() for no…
whatisgalen Apr 28, 2024
11f348c
all non-localized-string widget placeholder to be localized, re #9191
apeters Apr 23, 2024
1b9b0a5
Merge pull request #10813 from archesproject/10633_fix_provisional_edits
ryan86 Apr 29, 2024
8f88583
Revert "reverts signature default val for userid in delete_instances(…
whatisgalen Apr 29, 2024
8effe61
conforms to current pattern of user defaulting to empty dict, re #10781
whatisgalen Apr 29, 2024
d1ede61
passes in empty list for pos arg resourceids, re #10781
whatisgalen Apr 29, 2024
4e65fe5
changes dummy pos arg for resourceids to None, re #10781
whatisgalen Apr 29, 2024
49c8cd2
Fix display of search results footer when buttons get crowded, re Pro…
Apr 23, 2024
22d8289
Add row gap to account for spacing between rows when search footer bu…
Apr 29, 2024
cca046d
creates 3 basic tests for bulkdatadeletion, re #10781
whatisgalen Apr 30, 2024
71d2fea
includes commented command to run test locally, re #10781
whatisgalen Apr 30, 2024
b7e8b06
Merge branch 'dev/7.5.x' into 9444_thesaurus_delete_cascade
apeters Apr 30, 2024
309ab41
Merge pull request #10821 from archesproject/9444_thesaurus_delete_ca…
apeters Apr 30, 2024
ea5fade
Create Arches test runners #10842 (#10729)
chrabyrd Apr 30, 2024
dec775e
nit pr feedback #9788
johnatawnclementawn Apr 30, 2024
5356a83
turns bulkdata tests into module, re #10781
whatisgalen May 1, 2024
a866c0b
Add ability to clear edit log during removal of resources #9788
johnatawnclementawn May 1, 2024
dae5660
adds ability to clear edit log wholesale if removing all resources #9788
johnatawnclementawn May 1, 2024
93b3e0e
Merge branch 'dev/7.6.x' into 9788_add_edit_log_management_command
johnatawnclementawn May 1, 2024
0af7faf
adds gettext.config.js interpolation on updateproject command #10849 …
chrabyrd May 1, 2024
1a3afb8
Merge pull request #10810 from archesproject/jtw/remove-django-libsass
chrabyrd May 1, 2024
4be40d4
Capture graphid input during clear_edit_log
johnatawnclementawn May 1, 2024
a4975db
Merge pull request #10837 from archesproject/9788_add_edit_log_manage…
apeters May 1, 2024
f63b3f0
updates 7.6.0.md for upgrading Node.js #10853
chrabyrd May 1, 2024
28b4870
nit #10853
chrabyrd May 1, 2024
3d434cb
update dropdown to selectwoo to fix import of sparql import of concep…
apeters May 2, 2024
2cbbf2d
cleanup tests for bulk_delete, re #10781
whatisgalen May 2, 2024
3b27571
comments test that cannot work right now, re #10781 and #10858
whatisgalen May 2, 2024
4df4638
refactors bulk_deleter.delete_resources signature to make graphid, re…
whatisgalen May 2, 2024
1b3e6ac
returns unsuccessful delete message if neither graphid nor resourceid…
whatisgalen May 2, 2024
678e82c
refactors usage of delete_resources to conform to graphid, resourceid…
whatisgalen May 2, 2024
3f45e75
fix imports, re #10781
whatisgalen May 2, 2024
b208fe3
more test cleanup, re #10781
whatisgalen May 2, 2024
c2b876a
fixes mis-import, re #10781
whatisgalen May 2, 2024
4082bb0
fixes graph import issue in test, re #10781
whatisgalen May 2, 2024
3abd5ee
rm uneeded tearDown method, re #10781
whatisgalen May 2, 2024
011f9be
Measure coverage on untested files re #10738
jacobtylerwalls May 2, 2024
486fb04
Remove unused imports re #10781
jacobtylerwalls May 2, 2024
9a7f83c
Add breaking change notice re #10781
jacobtylerwalls May 2, 2024
affb771
merge #10757
chrabyrd May 2, 2024
cd8b869
additional PR feedback #10757
chrabyrd May 2, 2024
a787dbf
nit #10757
chrabyrd May 2, 2024
6eb5a60
Merge pull request #10854 from archesproject/10853-cbyrd-update-7.6.0…
chrabyrd May 2, 2024
023b865
nit #10757
chrabyrd May 2, 2024
5e9c41f
merge #10757
chrabyrd May 2, 2024
ddc4706
updates 7.6.0.md to provide instruction for CSS change #10757
chrabyrd May 2, 2024
bf0bc15
Merge pull request #10859 from archesproject/jtw/add-uncovered-files-…
chrabyrd May 2, 2024
4ff2541
Merge pull request #10758 from archesproject/10757-cbyrd-move-node_mo…
chrabyrd May 2, 2024
9bbdaf5
changes pos arg resourceids in bulk.index_resource_deletion to kwarg …
whatisgalen May 3, 2024
d1d1bf3
Merge branch '10781_show_deleted_instances_ct' of https://github.com/…
whatisgalen May 3, 2024
67e4c18
simplify control flow for bulk_delete.delete_resources, re #10781
whatisgalen May 3, 2024
3940c46
Merge pull request #10782 from archesproject/10781_show_deleted_insta…
jacobtylerwalls May 4, 2024
78e3d36
Merge branch 'dev/7.6.x' into 10666_rr_config_ux
whatisgalen May 5, 2024
cf57418
Add bugfix note #10856
johnatawnclementawn May 6, 2024
23a0408
Merge pull request #10857 from archesproject/10856_fix_sparql_import
johnatawnclementawn May 6, 2024
4acd125
[skip ci] Add changelogs to 7.5.2 (#10797)
jacobtylerwalls May 6, 2024
d6ef93a
merge #10774
chrabyrd May 7, 2024
608a89f
nit #10774
chrabyrd May 7, 2024
8a1c0f7
nit #10774
chrabyrd May 7, 2024
403ae07
minor update, re #10666
whatisgalen May 7, 2024
650eb41
nit #10774
chrabyrd May 7, 2024
3bfb5f9
nit #10774
chrabyrd May 7, 2024
c875d96
nit #10774
chrabyrd May 7, 2024
abf427c
nit #10774
chrabyrd May 7, 2024
6b4521b
nit #10774
chrabyrd May 7, 2024
7f7da71
nit #10774
chrabyrd May 7, 2024
805b08f
nit #10774
chrabyrd May 7, 2024
e32c2f3
nit #10774
chrabyrd May 7, 2024
e5737e8
Remove workaround in optimize_resource_iteration() that caused N+1 qu…
jacobtylerwalls May 7, 2024
e21b3e8
fixes spaceclick not working on rr-rel config btn, re #10666
whatisgalen May 8, 2024
fa90557
adds disabled color styling to config btn in rr-rel, re #10666
whatisgalen May 8, 2024
b1baef8
rm tabindex from non-interactive r-i resourceName, re #10666
whatisgalen May 8, 2024
baf74ac
nit #10774
chrabyrd May 8, 2024
9f76f9f
nit #10774
chrabyrd May 8, 2024
6b10bac
nit #10774
chrabyrd May 8, 2024
ac849ef
strips leading, trailing whitespace from concept labels in transform_…
whatisgalen May 3, 2024
c90fe20
Revert "strips leading, trailing whitespace from concept labels in tr…
whatisgalen May 4, 2024
64842b2
only calls strip on concept value for lookup in scope of lookup_label…
whatisgalen May 4, 2024
43122e2
Merge pull request #10667 from archesproject/10666_rr_config_ux
jacobtylerwalls May 8, 2024
f90561c
nit #10774
chrabyrd May 8, 2024
2d1eabf
nit #10774
chrabyrd May 8, 2024
d6567d3
nit #10774
chrabyrd May 8, 2024
59cf220
nit #10774
chrabyrd May 8, 2024
7997dbd
nit #10774
chrabyrd May 8, 2024
8d85b06
nit #10774
chrabyrd May 8, 2024
165c9ab
nit #10774
chrabyrd May 8, 2024
6a3d129
nit #10774
chrabyrd May 8, 2024
e546b90
nit #10774
chrabyrd May 8, 2024
7d3e89c
nit #10774
chrabyrd May 8, 2024
87a6dcb
nit #10774
chrabyrd May 8, 2024
225c7ef
nit #10774
chrabyrd May 8, 2024
fa57864
nit #10774
chrabyrd May 8, 2024
1d0d232
Merge branch 'dev/7.6.x' of https://github.com/archesproject/arches i…
chrabyrd May 8, 2024
7f522ab
updates updateproject.py #10774
chrabyrd May 8, 2024
2898fa1
nit #10774
chrabyrd May 8, 2024
3250bb7
updates 7.6.0.md #10774
chrabyrd May 8, 2024
484a99e
nit #10774
chrabyrd May 8, 2024
dcd01e9
remove unused i18n folders, re #10888
apeters May 8, 2024
a7eba0f
nit #10774
chrabyrd May 9, 2024
d3c02f1
Revert "imports named Celery filesize threshold setting in etl module…
whatisgalen May 9, 2024
e4ef633
Revert "creates new setting for celery threshold of file size re #10381"
whatisgalen May 9, 2024
fa797dc
leverages ETL module config for celery byte size limit, re #10381
whatisgalen May 9, 2024
bcdbdbe
Fix whatisthis command
jacobtylerwalls May 13, 2024
dcd07ae
fix json import to maintain provided sortorder
jkemper-pca May 3, 2024
ccf42cc
correct cast for sortorder to int()
jkemper-pca May 6, 2024
47f032f
Add changelog
jacobtylerwalls May 13, 2024
fc16daf
Move the i18n/ url outside of the i18n_patterns function as per the D…
jkemper-pca May 13, 2024
ffaea74
Add changelog re #10874
jacobtylerwalls May 14, 2024
c1d69d1
Add space between icon and text in graph Manage list for items that u…
SDScandrettKint May 14, 2024
e9567e2
Remove dupe changelog
jacobtylerwalls May 14, 2024
94de7e7
Revert baseUrl change in tsconfig.json
jacobtylerwalls May 14, 2024
65a5aed
Remake yarn.lock with vitest and eslint 9
jacobtylerwalls May 14, 2024
faa3266
Merge pull request #10776 from archesproject/cbyrd-10774-add-vue-comp…
jacobtylerwalls May 14, 2024
fca355c
Unsilence type declarations from typed third-party modules #10925
jacobtylerwalls May 15, 2024
49a000b
Merge branch 'dev/7.5.x' into 62-to-75
jacobtylerwalls May 15, 2024
2751015
Merge pull request #10919 from archesproject/62-to-75
chiatt May 16, 2024
6ad79db
Change precision of incoming geoms to reduce size in order to conform…
May 1, 2024
a7c95b0
Make reduce geometry precision function recursive, add tests #10855
May 14, 2024
1606349
Reposnd to comments on PR
May 14, 2024
b6d3ed4
Set lower bound to precision reduction to 5
May 14, 2024
a92c787
Respond to comments on PR
May 15, 2024
24c8481
nit
May 15, 2024
d65a30e
Add named error to geoutils/datatypes
May 15, 2024
aa155a1
nit
chiatt May 16, 2024
8d0ec6b
Check if all geoms are valid
chiatt May 16, 2024
7d1858b
nit
chiatt May 16, 2024
19e74ab
Merge branch 'dev/7.6.x' into 75-to-76
jacobtylerwalls May 16, 2024
7b35592
Handle missing ontology in JSON-LD api response (#10661)
jacobtylerwalls May 16, 2024
c7151d1
Merge pull request #10939 from archesproject/75-to-76
chiatt May 16, 2024
80951ad
Allow zoom constraints on node map source, #10929
chiatt May 15, 2024
01e639b
Update comment
jacobtylerwalls May 16, 2024
ea2d412
Test get_map_source datatype method, #10929
chiatt May 16, 2024
6a03afb
Update release notes, re #10929
chiatt May 16, 2024
5bd9d97
Merge pull request #10943 from archesproject/10929_min_max_zoom
njkim May 16, 2024
cd33f0c
Merge pull request #10926 from archesproject/jtw/unsilence-types
chrabyrd May 16, 2024
37efabb
Remove ref to postgres user #10944
chiatt May 17, 2024
ca73717
Merge pull request #10945 from archesproject/10944_remove_pg_user
aarongundel May 17, 2024
cf63396
changes default byteSizeLimit to 500, re #10381
whatisgalen May 18, 2024
7556f51
Merge pull request #10903 from archesproject/10381_celery_file_size_t…
njkim May 18, 2024
ce4d1a3
fixes clone graph issue #10839
chrabyrd May 20, 2024
345ea6b
Adjust APITests setup to work on both v7.6 and v8
jacobtylerwalls May 20, 2024
467e62b
adds tests #10839
chrabyrd May 20, 2024
9232fe7
nit #10839
chrabyrd May 20, 2024
5e32b9d
nit #10839
chrabyrd May 20, 2024
1e1ff24
Merge pull request #10951 from archesproject/jtw/liberalize-test-setup
chrabyrd May 20, 2024
ad4fc98
Merge branch 'dev/7.6.x' of https://github.com/archesproject/arches i…
chrabyrd May 21, 2024
86742bd
nit #10839
chrabyrd May 21, 2024
5be4ce8
Reenable type-checking in vue templates
jacobtylerwalls May 21, 2024
2df342d
Merge pull request #10952 from archesproject/10839-cbyrd-fix-clone-gr…
chrabyrd May 21, 2024
5ad38ac
removes postcss.config.js #10902 (#10953)
chrabyrd May 21, 2024
985dd7f
Fix issue, add test
jacobtylerwalls May 22, 2024
7cf6554
Merge pull request #10955 from archesproject/jtw/reenable-type-checki…
chrabyrd May 22, 2024
64fc18d
Merge pull request #10915 from archesproject/jtw/fix-whatisthis
SDScandrettKint May 23, 2024
fe098c8
hardens webpack when finding settings.py #10970
chrabyrd May 23, 2024
c5552f1
nit #10970
chrabyrd May 23, 2024
cf51e36
creates url for get_i18n_data, replace hardcoded in create-vue-app, r…
whatisgalen May 24, 2024
34f546d
Merge pull request #10971 from archesproject/10970-cbyrd-harden-webpa…
aarongundel May 24, 2024
e80ee6a
Merge pull request #10976 from archesproject/10974_force_script_vue_i18n
chrabyrd May 28, 2024
b8dc093
Fix for boolean datatype validation (#10937)
whatisgalen May 29, 2024
908e949
centralize permissions imports
philtweir Jun 24, 2023
ee569f8
resolve circular imports
philtweir Jun 24, 2023
8fbe465
initial attempt to centralize permissions
philtweir Jun 24, 2023
2a1ddde
make permissions framework settable
philtweir Jun 24, 2023
c1e8aa6
tidy missing methods
philtweir Jun 27, 2023
27232cd
minor permission framework bugfixes
philtweir Sep 23, 2023
e1220ae
correct signature for process_new_user
philtweir Oct 2, 2023
b0791b3
add signals for user/group
philtweir Apr 24, 2024
ea5ec94
implement dummy hooks for standard model for user/group/permission up…
philtweir Dec 7, 2023
4d604ff
move additional permission checks into PermissionFramework
philtweir Apr 24, 2024
1483e0d
enable users to see the usual nodes
philtweir Dec 19, 2023
189137d
restore user_can_read_graph
philtweir Jan 23, 2024
ad1c5de
use ExtensionType for permissions frameworks
philtweir May 1, 2024
94ab9a5
fix: tidy up default-deny
philtweir May 6, 2024
aefaa04
fix: mostly adding types to ArchesStandardPermissionFramework
philtweir May 6, 2024
2e22944
feat: add set-required (TBC) - this would allow both future-core and …
philtweir May 6, 2024
fb707e6
fix: move logic from arches.app.utils.permission_backend to where it …
philtweir May 6, 2024
43183ef
fix: move group_required logic to PermissionFramework, as otherwise u…
philtweir May 6, 2024
bd11f78
tests: add tests for permissions frameworks
philtweir May 6, 2024
0f6a8b7
fix: == to is in False comparison
philtweir May 6, 2024
3025687
use nodegroup pks rather than full object when permission-checking, i…
philtweir Apr 25, 2024
db9c7fe
time_wheel to use string nodegroups
philtweir May 6, 2024
fccf567
fix: remove dauthz references
philtweir May 30, 2024
f020aca
feat: add get_createable_resource_models to allow get_createable_reso…
philtweir May 30, 2024
8fa8cbe
fix: get_nodegroups_by_perm now returns IDs, so filter tiles by nodeg…
philtweir Jun 8, 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
34 changes: 34 additions & 0 deletions .github/workflows/check-base-branch-before-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check Base Branch Before Merge

on:
pull_request_review:
types: [submitted]

jobs:
check-base-branch-before-merge:
if: github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest

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

- name: Check base branch
run: |
git fetch origin --prune

CURRENT_BRANCH=${{ github.event.pull_request.head.ref }}
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"

COMMON_ANCESTOR=$(git merge-base origin/$CURRENT_BRANCH origin/$TARGET_BRANCH)
COMMITS_BEHIND=$(git rev-list --count origin/$TARGET_BRANCH ^$COMMON_ANCESTOR)

if [ "$COMMITS_BEHIND" -eq 0 ]; then
echo "Your branch is up-to-date with the target branch."
elif [ "$COMMITS_BEHIND" -eq 1 ]; then
echo "Your branch is 1 commit behind the target branch."
exit 1
else
echo "Your branch is $COMMITS_BEHIND commits behind the target branch."
exit 1
fi
104 changes: 98 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -6,14 +6,43 @@ on:
workflow_dispatch:

jobs:
check-base-branch:
runs-on: ubuntu-latest

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

- name: Check base branch
run: |
git fetch origin --prune

CURRENT_BRANCH=${{ github.event.pull_request.head.ref }}
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"

COMMON_ANCESTOR=$(git merge-base origin/$CURRENT_BRANCH origin/$TARGET_BRANCH)
COMMITS_BEHIND=$(git rev-list --count origin/$TARGET_BRANCH ^$COMMON_ANCESTOR)

if [ "$COMMITS_BEHIND" -eq 0 ]; then
echo "Your branch is up-to-date with the target branch."
elif [ "$COMMITS_BEHIND" -eq 1 ]; then
echo "Your branch is 1 commit behind the target branch."
exit 1
else
echo "Your branch is $COMMITS_BEHIND commits behind the target branch."
exit 1
fi

build:
runs-on: ubuntu-latest
needs: [check-base-branch]

services:
postgres:
image: postgis/postgis:13-3.0
env:
POSTGRES_PASSWORD: postgis
POSTGRES_DB: arches
POSTGRES_DB: ${{ github.event.repository.name }}
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
@@ -25,6 +54,7 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
@@ -41,11 +71,10 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install .
pip install -r arches/install/requirements.txt
pip install -r arches/install/requirements_dev.txt
pip install -r ${{ github.event.repository.name }}/install/requirements.txt
pip install -r ${{ github.event.repository.name }}/install/requirements_dev.txt
echo Python packages installed


- uses: ankane/setup-elasticsearch@v1
with:
elasticsearch-version: 8
@@ -61,10 +90,73 @@ jobs:
run: |
python manage.py makemigrations --check

- name: Run Arches unit tests
- name: Run unit tests
run: |
python -W default::DeprecationWarning -m coverage run manage.py test tests --settings="tests.test_settings"

- name: Generate report coverage
run: |
coverage json

- name: Upload coverage report as artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.json
overwrite: true

check-coverage:
runs-on: ubuntu-latest
needs: [check-base-branch, build]

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # Use the latest available version
check-latest: true

- name: Download coverage report artifact
uses: actions/download-artifact@v4
with:
name: coverage-report
path: .

- name: Report coverage
run: |
coverage report
cat coverage.json

- name: Retrieve baseline coverage
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}

if ! git show ${{ github.event.pull_request.base.ref }}:coverage.json > /dev/null; then
echo "Error: coverage.json does not exist in the branch."
exit 1
fi

baseline_coverage=$(git show ${{ github.event.pull_request.base.ref }}:coverage.json | grep -o '"totals": {[^}]*' | grep -o '"percent_covered": [0-9.]*' | awk -F ': ' '{print $2}')
echo "$baseline_coverage" > .coverage_baseline

- name: Compare coverage with baseline
if: github.event_name == 'pull_request'
run: |
current_coverage=$(cat coverage.json | grep -o '"totals": {[^}]*' | grep -o '"percent_covered": [0-9.]*' | awk -F ': ' '{print $2}')
baseline_coverage=$(cat .coverage_baseline)

# Compare current coverage with baseline coverage using floating-point comparison
if awk -v current="$current_coverage" -v baseline="$baseline_coverage" 'BEGIN { exit (current < baseline) ? 0 : 1 }'; then
echo "Coverage decreased from $baseline_coverage% to $current_coverage%"
exit 1
else
echo "$baseline_coverage% == $current_coverage%, Coverage didn't decrease. Committing new coverage.json."

git config user.name github-actions
git config user.email [email protected]

git add -f coverage.json
git commit -m "automatically update coverage.json"
git push -f origin HEAD:${{ github.head_ref }}
fi
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -43,4 +43,4 @@ pip-wheel-metadata
*.code-workspace
webpack-stats.json
.DS_STORE
CACHE
CACHE
2 changes: 1 addition & 1 deletion coverage.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions releases/7.6.0.md
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ Arches 7.6.0 Release Notes
- 10710 Workflow history API: return 400 (instead of 401) for attempts to update completed workflows
- 9768 Filter out tiles created during resource creation from activity stream API
- 9769 Ensure resource creation edit log timestamps precede resource update timestamps
- 10738 Adds Github action for comparing test coverage between branches and rejecting branches that lower test coverage
- 10699 Allow overriding search_results view
- 10726 Upgrade openpyxl package to 3.1.2 and fixes ETL modules
- 9191 Adds unlocalized string datatype