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

Harvester arcgis #8229

Merged
merged 162 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
f654111
Merge pull request #626 from geosolutions-it/merge_from_upsteram
giohappy Jan 20, 2021
0df9357
Merge branch 'master' of https://github.com/GeoNode/geonode
allyoucanmap Feb 1, 2021
2a11ead
Bump urllib3 from 1.26.2 to 1.26.3 (#6908)
dependabot[bot] Feb 2, 2021
040772e
[Fixes #6880] Circle CI upload tests fail irregulary (#6881)
t-book Feb 2, 2021
65c6267
[Fixes #6914] Remove "add to basket" tool for documents and maps (#6915)
Feb 2, 2021
158511a
Added malnajdi as contributor
t-book Feb 2, 2021
e9efc3d
[Fixes #6910] meaningful filename for document download (#6911)
gannebamm Feb 2, 2021
91f1a4e
- CircleCI Upload Tests: trying to reduce more the risk of infinite …
afabiani Feb 2, 2021
5e77b39
[Fixes #6916] gsimporter.api.NotFound caused by missing trailing slas…
malnajdi Feb 3, 2021
ec6d728
Bump django-cors-headers from 3.6.0 to 3.7.0 (#6901)
dependabot[bot] Feb 3, 2021
c5432b5
Bump amqp from 5.0.3 to 5.0.5 (#6905)
dependabot[bot] Feb 3, 2021
28424ca
Bump pip from 21.0 to 21.0.1 (#6900)
dependabot[bot] Feb 3, 2021
be313d5
Bump coverage from 5.3.1 to 5.4 (#6903)
dependabot[bot] Feb 3, 2021
f073274
Bump pytest from 6.2.1 to 6.2.2 (#6907)
dependabot[bot] Feb 3, 2021
9a3913e
Bump djangorestframework-gis from 0.16 to 0.17 (#6902)
dependabot[bot] Feb 3, 2021
ae6f6c1
- Algin setup.cfg to requirements.txt
afabiani Feb 3, 2021
0dad216
[Fixes #6922][REST API v2] Expose the curated thumbnail URL if it has…
Feb 3, 2021
30910b2
[Fixes #6918] Removal of QGIS support (#6919)
Feb 3, 2021
dbb4ac0
Merge branch 'master' of https://github.com/GeoNode/geonode
Feb 4, 2021
0bcf2fb
allow Basic authenticated requests in LOCKDOWN mode
bieganowski Feb 5, 2021
af22a3c
fix to avoid circular import
bieganowski Feb 5, 2021
c7ede4f
flake8 check fix
bieganowski Feb 5, 2021
b557f6d
added tests
bieganowski Feb 5, 2021
0a82a14
Merge pull request #652 from geosolutions-it/feature#650_basic_auth_m…
Feb 5, 2021
11f40ba
Merge pull request #678 from geosolutions-it/upstream_master
Feb 23, 2021
482080a
Merge remote-tracking branch 'upstream/master'
giohappy Mar 1, 2021
2f70532
Merge remote-tracking branch 'upstream/master'
giohappy Mar 2, 2021
de43e90
Merge branch 'master' of https://github.com/geosolutions-it/geonode
Mar 4, 2021
40408a3
Merge remote-tracking branch 'origin/master' into geosolutions-master
giohappy Mar 9, 2021
4ce20ab
Merge branch 'master' of https://github.com/GeoNode/geonode into geos…
afabiani Mar 12, 2021
2fd3272
[Fixes #6880] Circle CI upload tests fail irregulary (#6881)
t-book Feb 2, 2021
4539658
[Fixes #6914] Remove "add to basket" tool for documents and maps (#6915)
Feb 2, 2021
ba85f23
Added malnajdi as contributor
t-book Feb 2, 2021
e47daa6
Bump pip from 21.0 to 21.0.1 (#6900)
dependabot[bot] Feb 3, 2021
1346aeb
- Algin setup.cfg to requirements.txt
afabiani Feb 3, 2021
8ed0f4d
[Fixes #6922][REST API v2] Expose the curated thumbnail URL if it has…
Feb 3, 2021
65c7605
[Fixes #6918] Removal of QGIS support (#6919)
Feb 3, 2021
9af1c3b
allow Basic authenticated requests in LOCKDOWN mode
bieganowski Feb 5, 2021
97ed2c5
fix to avoid circular import
bieganowski Feb 5, 2021
ee282a2
- Align to upstream master branch
afabiani Mar 12, 2021
706ea43
Merge remote-tracking branch 'upstream/master'
giohappy Apr 22, 2021
711a619
Merge remote-tracking branch 'origin/master' into geosolutions-master
giohappy Apr 30, 2021
354764e
Merge remote-tracking branch 'origin/master' into geosolutions-master
giohappy May 11, 2021
e18bc6f
Merge branch 'master' of github.com:geosolutions-it/geonode
Jun 23, 2021
e5cf581
Merge branch 'master' of github.com:GeoNode/geonode
Jul 21, 2021
06d2930
Merge branch 'master' of github.com:GeoNode/geonode
Jul 22, 2021
3db74fc
Merge branch 'master' of github.com:GeoNode/geonode
Jul 28, 2021
5a65e39
Merge branch 'master' of github.com:GeoNode/geonode
Jul 28, 2021
dd6073e
Merge branch 'master' of github.com:GeoNode/geonode
Jul 29, 2021
0e4c038
Merge branch 'master' of github.com:GeoNode/geonode
Sep 7, 2021
a12c12b
Merge branch 'master' of github.com:GeoNode/geonode
Sep 28, 2021
43edc47
Merge branch 'master' of github.com:GeoNode/geonode
Sep 29, 2021
bd8de19
Merge branch 'master' of github.com:GeoNode/geonode
Sep 30, 2021
ea6eaf7
Merge branch 'master' of github.com:GeoNode/geonode
Oct 1, 2021
1836fe4
Merge branch 'master' of github.com:ricardogsilva/geonode
Oct 8, 2021
0b8cbac
Merge branch 'master' of github.com:GeoNode/geonode
Oct 19, 2021
94b1901
Merge remote-tracking branch 'origin/master'
Oct 19, 2021
19c5f98
[Fixes #7945] Ingest harvested layer data to geonode
meomancer Aug 13, 2021
95e75fd
Improve harvesting session and the admin
Sep 17, 2021
f71277b
fix migration files conflict
Sep 21, 2021
202b1f8
Initial work for implementing stoppable harvesting sessions
Sep 24, 2021
8ccaab9
Implement aborting of harvesting celery tasks
Sep 27, 2021
461f16d
fix tests
Sep 29, 2021
8b91ea2
fix conflicts
Sep 30, 2021
bd2f7d0
Add a couple more tests
Sep 30, 2021
cb528ff
Uncomment `settings.py` line that designates the GeoNode test runner …
Sep 30, 2021
c34a799
Add harvesting scheduler task
Sep 30, 2021
0473a25
Improving support for the harvesting scheduler task
Sep 30, 2021
85732d0
Continue implementation of the harvesting scheduler task
Sep 30, 2021
a864ab9
Remove the dependency on `django-celery-beat`, as the harvesting does…
Sep 30, 2021
07f3c34
Revert "Remove the dependency on `django-celery-beat`, as the harvest…
Sep 30, 2021
db56c53
Remove reference to the django-celery-beat app in the harvesting mode…
Sep 30, 2021
5f74069
Implement different strategy for the harvesting scheduler
Oct 1, 2021
a26af38
Add harvesting scheduler task
Sep 30, 2021
bdfb676
Improving support for the harvesting scheduler task
Sep 30, 2021
285ad01
Continue implementation of the harvesting scheduler task
Sep 30, 2021
a833b86
Remove the dependency on `django-celery-beat`, as the harvesting does…
Sep 30, 2021
265950a
[Fixes #7945] Ingest harvested layer data to geonode
meomancer Aug 13, 2021
771a143
Improve harvesting session and the admin
Sep 17, 2021
e2479cc
fix migration files conflict
Sep 21, 2021
3bc9b31
Implement aborting of harvesting celery tasks
Sep 27, 2021
f837408
fix tests
Sep 29, 2021
e1c5235
fix conflicts
Sep 30, 2021
5e45e52
Uncomment `settings.py` line that designates the GeoNode test runner …
Sep 30, 2021
77b89dc
Add harvesting scheduler task
Sep 30, 2021
c3e83d6
Improving support for the harvesting scheduler task
Sep 30, 2021
b3c776f
Revert "Remove the dependency on `django-celery-beat`, as the harvest…
Sep 30, 2021
e89b3f2
Remove reference to the django-celery-beat app in the harvesting mode…
Sep 30, 2021
25ec6fc
Implement different strategy for the harvesting scheduler
Oct 1, 2021
c5314a2
Improving support for the harvesting scheduler task
Sep 30, 2021
ed31c0d
Continue implementation of the harvesting scheduler task
Sep 30, 2021
2e82c60
Begin implementation of a harvester for current GeoNode version
Oct 4, 2021
a10279c
Continue implementation of a modern harvester for remote GeoNode depl…
Oct 8, 2021
474a0e9
Rebase and fix migration conflicts
Oct 8, 2021
ab84340
Fix invalid tiemporal computation after creating a new harvester
Oct 8, 2021
56b63cd
fixing pagination (wip)
Oct 8, 2021
0312b9f
Fix bugs with remote harvested layers
Oct 10, 2021
c186cde
Try out both geonode harvester worker classes and iron out inconsiste…
Oct 10, 2021
5277ea4
Remove commented line
Oct 10, 2021
c2c0a1e
Fix tests
Oct 11, 2021
fc47c3d
Harvester API serializer no longer tries to update harvestable resour…
Oct 11, 2021
a9e112a
Made GeonodeUnifiedHarvesterWorker the default harvester for geonode …
Oct 11, 2021
6d47621
Fix bits that were incorrectly merged when rebasing
Oct 19, 2021
eeb1f61
fix flake8 errors
Oct 20, 2021
1aaa1e2
[Fixes #7945] Ingest harvested layer data to geonode
meomancer Aug 13, 2021
0f1f4f1
Improve harvesting session and the admin
Sep 17, 2021
6395427
fix migration files conflict
Sep 21, 2021
75230b3
Initial work for implementing stoppable harvesting sessions
Sep 24, 2021
8a32ee6
Implement aborting of harvesting celery tasks
Sep 27, 2021
6ddc322
fix tests
Sep 29, 2021
36e2b2f
fix conflicts
Sep 30, 2021
4de775c
Remove accidental duplication of code that crept in during conflict r…
Sep 30, 2021
e589e9b
Add a couple more tests
Sep 30, 2021
c299ec1
Uncomment `settings.py` line that designates the GeoNode test runner …
Sep 30, 2021
0cef662
Add harvesting scheduler task
Sep 30, 2021
ae4e4b7
Improving support for the harvesting scheduler task
Sep 30, 2021
773571e
Continue implementation of the harvesting scheduler task
Sep 30, 2021
f506400
Remove the dependency on `django-celery-beat`, as the harvesting does…
Sep 30, 2021
2804b51
Revert "Remove the dependency on `django-celery-beat`, as the harvest…
Sep 30, 2021
eb2ac45
Remove reference to the django-celery-beat app in the harvesting mode…
Sep 30, 2021
8741db8
Implement different strategy for the harvesting scheduler
Oct 1, 2021
ecb6b03
Add harvesting scheduler task
Sep 30, 2021
ad125e8
Continue implementation of the harvesting scheduler task
Sep 30, 2021
5a79200
Improve harvesting session and the admin
Sep 17, 2021
0fd8d33
Initial work for implementing stoppable harvesting sessions
Sep 24, 2021
0e76f5b
Implement aborting of harvesting celery tasks
Sep 27, 2021
75d3e4e
fix tests
Sep 29, 2021
749bd3e
Update signature of get_resource method in WMS harvester worker
Sep 30, 2021
da79b8e
Add harvesting scheduler task
Sep 30, 2021
c871d2f
Improving support for the harvesting scheduler task
Sep 30, 2021
db947e3
Continue implementation of the harvesting scheduler task
Sep 30, 2021
c15a825
Revert "Remove the dependency on `django-celery-beat`, as the harvest…
Sep 30, 2021
e88def3
Remove reference to the django-celery-beat app in the harvesting mode…
Sep 30, 2021
a125240
Implement different strategy for the harvesting scheduler
Oct 1, 2021
e219032
Improving support for the harvesting scheduler task
Sep 30, 2021
72dc8d1
fix migration conflicts
Oct 8, 2021
15ceeaf
Begin implementation of ArcGIS-related harvester
Oct 11, 2021
918bc9d
Continue implementation of ArcGIS-related harvester
Oct 11, 2021
46b11fb
Continue implementation of arcgis harvester
Oct 12, 2021
4e0abb5
Continue implementation of arcgis harvester
Oct 13, 2021
7e8a5ee
HAndling harvesting of MapServer layers
Oct 14, 2021
69b3051
Move gxp enumerations from the services package to the layers one
Oct 19, 2021
58b7a24
Modify `dataset_detail()` view in order to configure gxp layer for la…
Oct 19, 2021
09053bf
Conclude implementation of ArcGIS harvester
Oct 19, 2021
38f3ba8
Add some tests
Oct 21, 2021
bf1b2cd
Update code
Oct 21, 2021
a7a2a6f
Implement resource_name_filter for ESRI harvester
Oct 21, 2021
ba00d50
Merge branch 'master' into harvester-geonode-current
Oct 22, 2021
1312144
Minor changes to keep compatibility with Remote Services
Oct 22, 2021
ccaf78b
Merge branch 'master' into harvester-geonode-current
Oct 22, 2021
3379137
Merge branch 'master' into harvester-arcgis
Oct 22, 2021
07cd2c4
Merge branch 'harvester-geonode-current' of https://github.com/ricard…
Oct 22, 2021
20395b0
[ArcGIS Harvester] Make sure we can parse also nested services (e.g.:…
Oct 22, 2021
87dd267
[Remote Services] Re-enable ArcGIS Remote Services
Oct 22, 2021
a0f0807
Merge branch 'master' of https://github.com/GeoNode/geonode into harv…
Oct 25, 2021
af22d2e
Merge branch 'master' into harvester-arcgis
ricardogsilva Oct 25, 2021
36d1e97
Improve WMS harvester based on recent develpments
Oct 25, 2021
2fdf00e
Merge branch 'harvester-arcgis' of https://github.com/ricardogsilva/g…
Oct 25, 2021
b54ea9e
- Better management of the "ll_bbox" and "thumbnail" at the "Resourc…
Oct 25, 2021
3419519
Remove `name` from the default geonode parameters generated by the ba…
Oct 25, 2021
789244b
Merge remote-tracking branch 'origin/harvester-arcgis' into harvester…
Oct 25, 2021
714dacd
[CircleCI] Fix test cases
Oct 25, 2021
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
5 changes: 4 additions & 1 deletion geonode/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
from geonode.utils import (
bbox_to_wkt,
find_by_attr,
bbox_to_projection,
is_monochromatic_image)
from geonode.groups.models import GroupProfile
from geonode.security.utils import get_visible_resources, get_geoapp_subtypes
Expand Down Expand Up @@ -1426,7 +1427,9 @@ def set_bbox_polygon(self, bbox, srid):
match = re.match(r'^(EPSG:)?(?P<srid>\d{4,6})$', str(srid))
bbox_polygon.srid = int(match.group('srid')) if match else 4326
try:
self.ll_bbox_polygon = bbox_polygon.transform(4326, clone=True)
# self.ll_bbox_polygon = bbox_polygon.transform(4326, clone=True)
self.ll_bbox_polygon = Polygon.from_bbox(
bbox_to_projection(list(bbox_polygon.extent) + [srid])[:-1])
except Exception as e:
logger.error(e)
self.ll_bbox_polygon = bbox_polygon
Expand Down
3 changes: 0 additions & 3 deletions geonode/harvesting/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,13 @@ class HarvestableResourceAdmin(admin.ModelAdmin):
"last_harvested",
"unique_identifier",
"title",
"abstract",
"show_link_to_harvester",
"should_be_harvested",
"remote_resource_type",
)
readonly_fields = (
"unique_identifier",
"title",
"abstract",
"harvester",
"last_updated",
"last_refreshed",
Expand All @@ -360,7 +358,6 @@ class HarvestableResourceAdmin(admin.ModelAdmin):
)
search_fields = (
"title",
"abstract",
)
list_editable = (
"should_be_harvested",
Expand Down
8 changes: 1 addition & 7 deletions geonode/harvesting/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,7 @@ def create(self, validated_data):
f"Either omit it or provide a "
f"value of {models.Harvester.STATUS_READY!r}"
)
harvester = super().create(validated_data)
available = harvester.update_availability()
if available:
harvester.status = harvester.STATUS_UPDATING_HARVESTABLE_RESOURCES
harvester.save()
tasks.update_harvestable_resources.apply_async(args=(harvester.pk,))
return harvester
return super().create(validated_data)

def update(self, instance: models.Harvester, validated_data):
"""Update harvester and perform any required business logic as a side-effect.
Expand Down
34 changes: 0 additions & 34 deletions geonode/harvesting/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,10 @@
from django.apps import AppConfig
from django.conf import settings
from django.conf.urls import url, include
from django.db.models.signals import post_migrate

from . import config


def run_setup_hooks(sender, **kwargs):
from django.utils import timezone

# Initialize periodic tasks
if 'django_celery_beat' in settings.INSTALLED_APPS and \
getattr(settings, 'CELERY_BEAT_SCHEDULER', None) == 'django_celery_beat.schedulers:DatabaseScheduler':
from django_celery_beat.models import (
IntervalSchedule,
PeriodicTask,
)

secs = config.get_setting("HARVESTER_SCHEDULER_FREQUENCY_MINUTES") * 60
check_intervals = IntervalSchedule.objects.filter(every=secs, period="seconds")
if not check_intervals.exists():
check_interval, _ = IntervalSchedule.objects.get_or_create(
every=secs,
period="seconds"
)
else:
check_interval = check_intervals.first()

PeriodicTask.objects.update_or_create(
name="harvesting-scheduler",
defaults=dict(
task="geonode.harvesting.tasks.harvesting_scheduler",
interval=check_interval,
args='',
start_time=timezone.now()
)
)


class HarvestingAppConfig(AppConfig):

name = "geonode.harvesting"
Expand All @@ -67,7 +34,6 @@ def ready(self):
urlpatterns += [
url(r'^api/v2/', include('geonode.harvesting.api.urls'))
]
post_migrate.connect(run_setup_hooks, sender=self)
settings.CELERY_BEAT_SCHEDULE['harvesting-scheduler'] = {
"task": "geonode.harvesting.tasks.harvesting_scheduler",
"schedule": config.get_setting("HARVESTER_SCHEDULER_FREQUENCY_MINUTES") * 60,
Expand Down
4 changes: 2 additions & 2 deletions geonode/harvesting/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@


_DEFAULT_HARVESTERS: typing.Final = [
"geonode.harvesting.harvesters.geonodeharvester.GeonodeLegacyHarvester",
"geonode.harvesting.harvesters.geonodeharvester.GeonodeUnifiedHarvesterWorker",
"geonode.harvesting.harvesters.wms.OgcWmsHarvester",
# "geonode.harvesting.harvesters.geonode.GeonodeCswHarvester",
"geonode.harvesting.harvesters.arcgis.ArcgisHarvesterWorker",
]


Expand Down
Loading