Skip to content

Commit

Permalink
Merge pull request #285 from ropable/master
Browse files Browse the repository at this point in the history
Migrate from MapProxy to use WMTS, additional exception handling for Tracplus devices, remove ResourceView model
  • Loading branch information
ropable authored Sep 3, 2024
2 parents 95ecf54 + 1e82061 commit e33c266
Show file tree
Hide file tree
Showing 12 changed files with 362 additions and 243 deletions.
4 changes: 2 additions & 2 deletions kustomize/overlays/prod/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ spec:
secretKeyRef:
name: resourcetracking-env-prod
key: TRACPLUS_URL
- name: MAPPROXY_URL
- name: GEOSERVER_URL
valueFrom:
secretKeyRef:
name: resourcetracking-env-prod
key: MAPPROXY_URL
key: GEOSERVER_URL
- name: SENTRY_DSN
valueFrom:
secretKeyRef:
Expand Down
2 changes: 1 addition & 1 deletion kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ patches:
- path: geoserver_service_patch.yaml
images:
- name: ghcr.io/dbca-wa/resource_tracking
newTag: 1.4.13
newTag: 1.4.14
4 changes: 2 additions & 2 deletions kustomize/overlays/uat/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ spec:
secretKeyRef:
name: resourcetracking-env-uat
key: TRACPLUS_URL
- name: MAPPROXY_URL
- name: GEOSERVER_URL
valueFrom:
secretKeyRef:
name: resourcetracking-env-uat
key: MAPPROXY_URL
key: GEOSERVER_URL
- name: SENTRY_DSN
valueFrom:
secretKeyRef:
Expand Down
54 changes: 29 additions & 25 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "resource_tracking"
version = "1.4.13"
version = "1.4.14"
description = "DBCA internal corporate application to download and serve data from remote tracking devices."
authors = ["DBCA OIM <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -13,17 +13,17 @@ psycopg = {version = "3.2.1", extras = ["binary", "pool"]}
dbca-utils = "2.0.2"
python-dotenv = "1.0.1"
dj-database-url = "2.2.0"
gunicorn = "22.0.0"
gunicorn = "23.0.0"
django-extensions = "3.2.3"
django-tastypie = "0.14.7"
django-geojson = "4.1.0"
unicodecsv = "0.14.1"
whitenoise = {version = "6.7.0", extras = ["brotli"]}
azure-storage-blob = "12.22.0"
sentry-sdk = {version = "2.12.0", extras = ["django"]}
sentry-sdk = {version = "2.13.0", extras = ["django"]}

[tool.poetry.group.dev.dependencies]
ipython = "^8.26.0"
ipython = "^8.27.0"
ipdb = "^0.13.13"
pre-commit = "^3.8.0"
mixer = "^7.2.2"
Expand Down
17 changes: 9 additions & 8 deletions resource_tracking/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# Add scary warning on device edit page for prod
PROD_SCARY_WARNING = env("PROD_SCARY_WARNING", False)
DEVICE_HTTP_CACHE_TIMEOUT = env("DEVICE_HTTP_CACHE_TIMEOUT", 60)
MAPPROXY_URL = env('MAPPROXY_URL', '')
GEOSERVER_URL = env("GEOSERVER_URL", "")
INSTALLED_APPS = [
"whitenoise.runserver_nostatic",
"django.contrib.admin",
Expand Down Expand Up @@ -98,13 +98,10 @@
DATABASES = {
# Defined in the DATABASE_URL env variable.
"default": dj_database_url.config(),
"fleetcare": dj_database_url.parse(env("FLEETCARE_DATABASE_URL", "sqlite:////tmp/db"))
}

# Project authentication settings
AUTHENTICATION_BACKENDS = (
"django.contrib.auth.backends.ModelBackend",
)
AUTHENTICATION_BACKENDS = ("django.contrib.auth.backends.ModelBackend",)

# Internationalization
LANGUAGE_CODE = "en-us"
Expand Down Expand Up @@ -145,7 +142,7 @@
"handlers": ["console"],
"level": "INFO",
},
}
},
}

# Tastypie settings
Expand Down Expand Up @@ -173,8 +170,12 @@ def sentry_excluded_exceptions(event, hint):
# Sentry settings
SENTRY_DSN = env("SENTRY_DSN", None)
SENTRY_SAMPLE_RATE = env("SENTRY_SAMPLE_RATE", 1.0) # Error sampling rate
SENTRY_TRANSACTION_SAMPLE_RATE = env("SENTRY_TRANSACTION_SAMPLE_RATE", 0.0) # Transaction sampling
SENTRY_PROFILES_SAMPLE_RATE = env("SENTRY_PROFILES_SAMPLE_RATE", 0.0) # Proportion of sampled transactions to profile.
SENTRY_TRANSACTION_SAMPLE_RATE = env(
"SENTRY_TRANSACTION_SAMPLE_RATE", 0.0
) # Transaction sampling
SENTRY_PROFILES_SAMPLE_RATE = env(
"SENTRY_PROFILES_SAMPLE_RATE", 0.0
) # Proportion of sampled transactions to profile.
SENTRY_ENVIRONMENT = env("SENTRY_ENVIRONMENT", None)
if SENTRY_DSN and SENTRY_ENVIRONMENT:
import sentry_sdk
Expand Down
Loading

0 comments on commit e33c266

Please sign in to comment.