Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9b3a18f
Upgrade to Resonant v0.47
brianhelba Feb 19, 2026
e2c9ab6
Auto-fix Ruff errors
brianhelba Feb 19, 2026
0c54abc
Fix C408: Replace unnecessary `dict()` calls with dict literals
brianhelba Feb 19, 2026
f7d9bff
Fix UP031: Replace printf-style string formatting with .format()
brianhelba Feb 19, 2026
3af4d1f
Fix RSE102: Remove unnecessary parentheses on raised exceptions
brianhelba Feb 19, 2026
a0569d1
Fix C401: Replace unnecessary generator inside set() with set compreh…
brianhelba Feb 19, 2026
ac26ba6
Fix SIM118: Remove unnecessary .keys() call in dict iteration
brianhelba Feb 19, 2026
27279f5
Fix PERF102: Use .values() instead of .items() when key is unused
brianhelba Feb 19, 2026
5bbf23f
Fix SIM105: Replace try/except/pass with contextlib.suppress
brianhelba Feb 19, 2026
d30931f
Fix PLW0127/PLW0128: Remove duplicate self-assignment of variable
brianhelba Feb 19, 2026
012b514
Fix RUF059: Prefix unused unpacked variables with underscore
brianhelba Feb 19, 2026
f733d12
Fix SIM117: Combine nested with statements into single statement
brianhelba Feb 19, 2026
f5d2413
Fix RET504: Remove unnecessary assignment before return statement
brianhelba Feb 19, 2026
92c2460
Fix SIM108: Replace if/else block with ternary operator
brianhelba Feb 19, 2026
f2dd06f
Fix PLW0108: Replace unnecessary lambda with direct method reference
brianhelba Feb 19, 2026
dda7b75
Fix PLC0206: Use .items() instead of indexing into dict during iteration
brianhelba Feb 19, 2026
09d45bb
Fix B018: Suppress false positive for intentional attribute access in…
brianhelba Feb 19, 2026
7e3cbb7
Fix PERF401: Replace manual list appends with comprehensions and extend
brianhelba Feb 19, 2026
0b6487e
Fix TC001/TC002/TC003: Move typing-only imports into TYPE_CHECKING bl…
brianhelba Feb 19, 2026
37d029c
Fix PTH123: Replace builtin open() with Path.open()
brianhelba Feb 19, 2026
37a602e
Fix UP032: Replace .format() with f-string
brianhelba Feb 19, 2026
5962291
Fix PTH/PERF102: Replace os.path/os calls with pathlib equivalents
brianhelba Feb 19, 2026
55e23eb
Fix ICN001: Use conventional import aliases (numpy as np, pandas as pd)
brianhelba Feb 19, 2026
fbb5aad
Fix S113: Add timeout parameter to requests calls
brianhelba Feb 19, 2026
bb36183
Fix RET503: Add explicit return None at end of functions
brianhelba Feb 19, 2026
6b52a29
Fix DTZ003: Replace datetime.utcnow() with datetime.now(tz=timezone.utc)
brianhelba Feb 19, 2026
a529f7b
Fix TRY004: Use TypeError for invalid type check
brianhelba Feb 19, 2026
9ddca84
Fix RUF043: Escape regex metacharacters in pytest.raises match patterns
brianhelba Feb 19, 2026
3f6fa4b
Fix DJ012: Reorder model body to follow Django style guide
brianhelba Feb 19, 2026
cf239be
Fix DTZ005: Add tz=timezone.utc to datetime.now() calls
brianhelba Feb 19, 2026
502f337
Fix DJ008: Add __str__ methods to Django models
brianhelba Feb 19, 2026
e13ed3a
Fix E501: Break long line by extracting variable
brianhelba Feb 19, 2026
490bd7b
Fix DJ012: Move Meta class before __str__ in DatasetTag model
brianhelba Feb 19, 2026
0d48cba
Fix TRY002: Replace bare Exception with specific exception types
brianhelba Feb 19, 2026
2d4aad5
Fix INP001: Add missing __init__.py files
brianhelba Feb 19, 2026
0c508c5
Fix A002: builtin-argument-shadowing
brianhelba Feb 19, 2026
052ad66
Switch to double quotes
brianhelba Feb 20, 2026
d084174
Ignore blame of previous commit
brianhelba Feb 20, 2026
f135f1d
Ignore remaining Ruff rules that require larger refactoring
brianhelba Feb 19, 2026
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
2 changes: 1 addition & 1 deletion .copier-answers.resonant.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_commit: v0.45.0
_commit: v0.47.0
_src_path: gh:kitware-resonant/cookiecutter-resonant
core_app_name: core
include_example_code: false
Expand Down
21 changes: 14 additions & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,28 @@ insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[*.py]
indent_size = 4
max_line_length = 100
[*.{css,pcss}]
indent_size = 2

[*.html]
indent_size = 2

[*.css]
[*.ini]
indent_size = 4

[*.{js,ts,vue}]
indent_size = 2
max_line_length = 100

[{*.yml,*.yaml}]
[*.{json,jsonc,json5}]
indent_size = 2

[*.ini]
[*.py]
indent_size = 4
max_line_length = 100

[*.toml]
indent_size = 2

[*.sh]
[*.{yml,yaml}]
indent_size = 2
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Switch to double quotes
052ad665aceaf8ef10ffc3eba8111799517e2cae
2 changes: 2 additions & 0 deletions geoinsight/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This project module is imported for us when Django starts. To ensure that Celery app is always
# defined prior to any shared_task definitions (so those tasks will bind to the app), import
# the Celery module here for side effects.
from __future__ import annotations

from .celery import app as _celery_app # noqa: F401

# Do not import anything else from this file, to avoid interfering with the startup order of the
Expand Down
14 changes: 8 additions & 6 deletions geoinsight/asgi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from django.core.asgi import get_asgi_application
Expand All @@ -7,19 +9,19 @@

application = ProtocolTypeRouter(
{
'http': get_asgi_application(),
'websocket': AuthMiddlewareStack(
"http": get_asgi_application(),
"websocket": AuthMiddlewareStack(
URLRouter(
[
path(
'ws/analytics/project/<int:project_id>/results/',
"ws/analytics/project/<int:project_id>/results/",
AnalyticsConsumer.as_asgi(),
name='analytics-ws',
name="analytics-ws",
),
path(
'ws/conversion/',
"ws/conversion/",
ConversionConsumer.as_asgi(),
name='conversion-ws',
name="conversion-ws",
),
]
)
Expand Down
4 changes: 3 additions & 1 deletion geoinsight/celery.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from __future__ import annotations

from celery import Celery

# Using a string config_source means the worker doesn't have to serialize
# the configuration object to child processes.
app = Celery(config_source='django.conf:settings', namespace='CELERY')
app = Celery(config_source="django.conf:settings", namespace="CELERY")

# Load task modules from all registered Django app configs.
app.autodiscover_tasks()
54 changes: 28 additions & 26 deletions geoinsight/core/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from django.contrib import admin

from geoinsight.core.models import (
Expand Down Expand Up @@ -28,113 +30,113 @@

@admin.register(Basemap)
class BasemapAdmin(admin.ModelAdmin):
list_display = ['id', 'name']
list_display = ["id", "name"]


@admin.register(Project)
class ProjectAdmin(admin.ModelAdmin):
list_display = ['id', 'name']
list_display = ["id", "name"]


@admin.register(Dataset)
class DatasetAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'category']
list_display = ["id", "name", "category"]


@admin.register(FileItem)
class FileItemAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'dataset', 'chart']
list_display = ["id", "name", "dataset", "chart"]


@admin.register(Chart)
class ChartAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'editable']
list_display = ["id", "name", "editable"]


@admin.register(Layer)
class LayerAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'dataset']
list_display = ["id", "name", "dataset"]


@admin.register(LayerFrame)
class LayerFrameAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'index', 'layer']
list_display = ["id", "name", "index", "layer"]


@admin.register(LayerStyle)
class LayerStyleAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'layer']
list_display = ["id", "name", "layer"]


@admin.register(Colormap)
class ColormapAdmin(admin.ModelAdmin):
list_display = ['id', 'name']
list_display = ["id", "name"]


@admin.register(ColorConfig)
class ColorConfigAdmin(admin.ModelAdmin):
list_display = ['id', 'style', 'name']
list_display = ["id", "style", "name"]


@admin.register(ColormapConfig)
class ColormapConfigAdmin(admin.ModelAdmin):
list_display = ['id', 'colormap', 'color_by']
list_display = ["id", "colormap", "color_by"]


@admin.register(SizeConfig)
class SizeConfigAdmin(admin.ModelAdmin):
list_display = ['id', 'style', 'name']
list_display = ["id", "style", "name"]


@admin.register(SizeRangeConfig)
class SizeRangeConfigAdmin(admin.ModelAdmin):
list_display = ['id', 'minimum', 'maximum', 'size_by']
list_display = ["id", "minimum", "maximum", "size_by"]


@admin.register(FilterConfig)
class FilterConfigAdmin(admin.ModelAdmin):
list_display = ['id', 'style', 'filter_by']
list_display = ["id", "style", "filter_by"]


@admin.register(RasterData)
class RasterDataAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'source_file']
list_display = ["id", "name", "source_file"]


@admin.register(VectorData)
class VectorDataAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'source_file']
list_display = ["id", "name", "source_file"]


@admin.register(VectorFeature)
class VectorFeatureAdmin(admin.ModelAdmin):
list_display = ['id', 'dataset']
list_select_related = ['vector_data__dataset']
list_display = ["id", "dataset"]
list_select_related = ["vector_data__dataset"]


@admin.register(Region)
class RegionAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'dataset']
list_display = ["id", "name", "dataset"]


@admin.register(Network)
class NetworkAdmin(admin.ModelAdmin):
list_display = ['id', 'category', 'dataset']
list_select_related = ['vector_data__dataset']
list_display = ["id", "category", "dataset"]
list_select_related = ["vector_data__dataset"]


@admin.register(NetworkEdge)
class NetworkEdgeAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'network', 'dataset']
list_select_related = ['network__vector_data__dataset']
list_display = ["id", "name", "network", "dataset"]
list_select_related = ["network__vector_data__dataset"]


@admin.register(NetworkNode)
class NetworkNodeAdmin(admin.ModelAdmin):
list_display = ['id', 'name', 'network', 'dataset']
list_select_related = ['network__vector_data__dataset']
list_display = ["id", "name", "network", "dataset"]
list_select_related = ["network__vector_data__dataset"]


@admin.register(TaskResult)
class TaskResultAdmin(admin.ModelAdmin):
list_display = ['id', 'task_type', 'inputs']
list_display = ["id", "task_type", "inputs"]
6 changes: 4 additions & 2 deletions geoinsight/core/apps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from __future__ import annotations

from django.apps import AppConfig


class CoreConfig(AppConfig):
name = 'geoinsight.core'
verbose_name = 'GeoInsight: Core'
name = "geoinsight.core"
verbose_name = "GeoInsight: Core"
Empty file.
Empty file.
Loading