Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion geonode/api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
from django.contrib.contenttypes.models import ContentType
from geonode.upload.models import UploadSizeLimit


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/assets/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from rest_framework import serializers
from geonode.assets.utils import is_asset_deletable


logger = logging.getLogger(__name__)


Expand Down
4 changes: 1 addition & 3 deletions geonode/base/api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2075,10 +2075,8 @@ def test_set_resource_thumbnail(self):
self.assertEqual(response.json(), "The url must be of an image with format (png, jpeg or jpg)")

# using Base64 data as an ASCII byte string
data["file"] = (
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABHNCSVQICAgI\
data["file"] = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABHNCSVQICAgI\
fAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AAAANSURBVAiZYzAxMfkPAALYAZzx61+bAAAAAElFTkSuQmCC"
)
with patch("geonode.base.models.is_monochromatic_image") as _mck:
_mck.return_value = False
response = self.client.put(url, data=data, format="json")
Expand Down
1 change: 0 additions & 1 deletion geonode/base/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@
from geonode.assets.handlers import asset_handler_registry
from geonode.utils import get_supported_datasets_file_types


logger = logging.getLogger(__name__)


Expand Down
2 changes: 1 addition & 1 deletion geonode/base/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def create_auth_token(user, client=settings.OAUTH2_DEFAULT_BACKEND_CLIENT_NAME):
try:
Application = get_application_model()
app = Application.objects.get(name=client)
(access_token, created) = AccessToken.objects.get_or_create(
access_token, created = AccessToken.objects.get_or_create(
user=user, application=app, expires=expires, token=generate_token()
)
return access_token
Expand Down
8 changes: 3 additions & 5 deletions geonode/base/bbox_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def translate_polygons(
ref.: https://towardsdatascience.com/around-the-world-in-80-lines-crossing-the-antimeridian-with-python-and-shapely-c87c9b6e1513
"""
for polygon in [geometry_collection]:
(minx, _, maxx, _) = polygon.bounds
minx, _, maxx, _ = polygon.bounds
if minx < -180:
geo_polygon = affinity.translate(polygon, xoff=360)
elif maxx > 180:
Expand Down Expand Up @@ -210,10 +210,8 @@ def split_polygon(

n_splits = len(split_meridians)
if n_splits > 1:
raise NotImplementedError(
"""Splitting a Polygon by multiple meridians (MultiLineString)
not supported by Shapely"""
)
raise NotImplementedError("""Splitting a Polygon by multiple meridians (MultiLineString)
not supported by Shapely""")
elif n_splits == 1:
split_lon = next(iter(split_meridians))
meridian = [[split_lon, -90.0], [split_lon, 90.0]]
Expand Down
1 change: 0 additions & 1 deletion geonode/base/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
LinkedResourcesAutocomplete,
)


urlpatterns = [
re_path(
r"^autocomplete_response/$",
Expand Down
3 changes: 1 addition & 2 deletions geonode/base/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
#
#########################################################################

"""Utilities for managing GeoNode base models
"""
"""Utilities for managing GeoNode base models"""

# Standard Modules
import re
Expand Down
2 changes: 1 addition & 1 deletion geonode/catalogue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"""
Tools for managing a Catalogue Service for the Web (CSW)
"""

import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from importlib import import_module


DEFAULT_CATALOGUE_ALIAS = "default"

# GeoNode uses this if the CATALOGUE setting is empty (None).
Expand Down
1 change: 0 additions & 1 deletion geonode/catalogue/metadataxsl/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from geonode.layers.models import Dataset
from geonode.documents.models import Document


ISO_XSL_NAME = "ISO with XSL"

settings.DOWNLOAD_FORMATS_METADATA.append(ISO_XSL_NAME)
Expand Down
1 change: 0 additions & 1 deletion geonode/catalogue/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from geonode.catalogue import get_catalogue
from geonode.base.models import Link, ResourceBase


LOGGER = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@
#########################################################################
from pkgutil import extend_path


__path__ = extend_path(__path__, __name__) # noqa
1 change: 0 additions & 1 deletion geonode/documents/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

import logging


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/documents/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from geonode.resource.manager import BaseResourceManager
from geonode.documents.models import Document


logger = logging.getLogger(__name__)


Expand Down
2 changes: 1 addition & 1 deletion geonode/documents/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
when you run "manage.py test".

"""

import os
import io
import json
Expand Down Expand Up @@ -60,7 +61,6 @@
from .forms import DocumentCreateForm
from geonode.security.registry import permissions_registry


TEST_GIF = os.path.join(os.path.dirname(__file__), "tests/data/img.gif")


Expand Down
3 changes: 1 addition & 2 deletions geonode/documents/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
#
#########################################################################

"""Utilities for managing GeoNode documents
"""
"""Utilities for managing GeoNode documents"""

# Standard Modules
import os
Expand Down
1 change: 0 additions & 1 deletion geonode/facets/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

from django.apps import AppConfig


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/geoapps/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

import logging


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/geoapps/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
from geonode.utils import resolve_object
from geonode.security.registry import permissions_registry


logger = logging.getLogger("geonode.geoapps.views")

_PERMISSION_MSG_GENERIC = _("You do not have permissions for this app.")
Expand Down
1 change: 0 additions & 1 deletion geonode/geoserver/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from geonode.notifications_helper import NotificationsAppConfigBase
from django.apps import AppConfig


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/geoserver/createlayer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from geonode.resource.registry import resource_manager_registry, dataset_manager
from geonode.geoserver.helpers import gs_catalog, ogc_server_settings, create_geoserver_db_featurestore


logger = logging.getLogger(__name__)

BBOX = [-180, -90, 180, 90]
Expand Down
1 change: 0 additions & 1 deletion geonode/geoserver/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
from geonode.utils import get_dataset_workspace
from geonode.security.registry import permissions_registry


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/geoserver/tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
from geonode.geoserver.ows import _wcs_link, _wfs_link, _wms_link
from unittest.mock import patch, Mock


logger = logging.getLogger(__name__)


Expand Down
7 changes: 2 additions & 5 deletions geonode/groups/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

from guardian.shortcuts import get_objects_for_group


logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -310,10 +309,8 @@ def group_pre_delete(instance, sender, **kwargs):

"""Make sure that the anonymous group is not deleted"""
if instance.name == "anonymous":
raise Exception(
"Deletion of the anonymous group is\
not permitted as will break the geonode permissions system"
)
raise Exception("Deletion of the anonymous group is\
not permitted as will break the geonode permissions system")
permissions_registry.delete_resource_permissions_cache(instance=instance)


Expand Down
1 change: 0 additions & 1 deletion geonode/harvesting/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

from django.conf import settings


_DEFAULT_HARVESTERS: typing.Final = [
"geonode.harvesting.harvesters.wms.OgcWmsHarvester",
"geonode.harvesting.harvesters.geonodeharvester.GeonodeUnifiedHarvesterWorker",
Expand Down
1 change: 1 addition & 0 deletions geonode/harvesting/harvesters/arcgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#########################################################################

"""Harvesters for ArcGIS based remote servers."""

import re
import abc
import enum
Expand Down
4 changes: 2 additions & 2 deletions geonode/harvesting/harvesters/wms.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def wms_call(self, kind="GetCapabilities", override_version=None, additional_par
"request": kind,
}
)
(wms_url, _service, _version, _request) = self._get_cleaned_url_params(self.remote_url)
wms_url, _service, _version, _request = self._get_cleaned_url_params(self.remote_url)
if _service:
params["service"] = _service
if override_version or _version:
Expand Down Expand Up @@ -448,7 +448,7 @@ def _layer_element_to_json(self, layer_element: etree.Element) -> dict:
except (IndexError, KeyError):
legend_url = ""
params = {}
(wms_url, _service, _version, _request) = self._get_cleaned_url_params(self.remote_url)
wms_url, _service, _version, _request = self._get_cleaned_url_params(self.remote_url)
if _service:
params["service"] = _service
if _version:
Expand Down
1 change: 0 additions & 1 deletion geonode/harvesting/tests/test_api_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from .. import models
from ..api import serializers


_REQUEST_FACTORY = APIRequestFactory()


Expand Down
1 change: 0 additions & 1 deletion geonode/harvesting/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from django.utils import timezone
from geonode.harvesting.models import HarvestableResource, Harvester


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/indexing/api/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from geonode.indexing.models import ResourceIndex
from geonode.metadata.multilang.utils import get_2letters_languages, get_pg_language, get_default_language


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/indexing/tests/test_invoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

from geonode.tests.base import GeoNodeBaseTestSupport


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/indexing/tests/test_tsindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from geonode.indexing.manager import TSVectorIndexManager
from geonode.tests.base import GeoNodeBaseTestSupport


logger = logging.getLogger(__name__)


Expand Down
5 changes: 2 additions & 3 deletions geonode/layers/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#
#########################################################################

"""Utilities for managing GeoNode resource metadata
"""
"""Utilities for managing GeoNode resource metadata"""

# Standard Modules
import logging
import datetime
Expand All @@ -34,7 +34,6 @@

from geonode import GeoNodeException


LOGGER = logging.getLogger(__name__)


Expand Down
1 change: 1 addition & 0 deletions geonode/layers/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#########################################################################

"""celery tasks for geonode.layers."""

from geonode.celery_app import app
from celery.utils.log import get_task_logger

Expand Down
3 changes: 1 addition & 2 deletions geonode/layers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
#
#########################################################################

"""Utilities for managing GeoNode layers
"""
"""Utilities for managing GeoNode layers"""

# Standard Modules
import copy
Expand Down
6 changes: 2 additions & 4 deletions geonode/layers/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@

logger = logging.getLogger("geonode.layers.views")

METADATA_UPLOADED_PRESERVE_ERROR = _(
"Note: this dataset's orginal metadata was \
populated and preserved by importing a metadata XML file. This metadata cannot be edited."
)
METADATA_UPLOADED_PRESERVE_ERROR = _("Note: this dataset's orginal metadata was \
populated and preserved by importing a metadata XML file. This metadata cannot be edited.")

_PERMISSION_MSG_DELETE = _("You are not permitted to delete this dataset")
_PERMISSION_MSG_GENERIC = _("You do not have permissions for this dataset.")
Expand Down
1 change: 0 additions & 1 deletion geonode/management_commands_http/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

from geonode.management_commands_http.views import ManagementCommandJobViewSet


router = routers.DefaultRouter()
router.register("jobs", ManagementCommandJobViewSet, basename="job")
1 change: 0 additions & 1 deletion geonode/management_commands_http/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from geonode.management_commands_http.views import ManagementCommandView
from geonode.management_commands_http.routers import router


urlpatterns = [
re_path(r"management/commands/$", ManagementCommandView.as_view()),
re_path(r"management/commands/(?P<cmd_name>\w+)/$", ManagementCommandView.as_view()),
Expand Down
1 change: 0 additions & 1 deletion geonode/metadata/handlers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from geonode.metadata.settings import JSONSCHEMA_BASE
from geonode.base.enumerations import ALL_LANGUAGES, UPDATE_FREQUENCIES


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion geonode/metadata/handlers/thesaurus.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from geonode.base.models import Thesaurus, ThesaurusKeyword, ThesaurusKeywordLabel
from geonode.metadata.handlers.abstract import MetadataHandler


logger = logging.getLogger(__name__)


Expand Down
Loading
Loading