From 63ef581e37a683bb4eaff24f00565593f801fd6d Mon Sep 17 00:00:00 2001 From: Florian Knappers <73856313+JJFlorian@users.noreply.github.com> Date: Fri, 22 Mar 2024 11:36:00 +0100 Subject: [PATCH] renamed project to brostar --- .nens.toml | 4 ++-- CHANGES.md | 2 +- README.md | 6 +++--- api/bro_upload/utils.py | 2 +- {bro_hub => brostar}/__init__.py | 0 {bro_hub => brostar}/asgi.py | 4 ++-- {bro_hub => brostar}/celery.py | 2 +- {bro_hub => brostar}/settings.py | 10 +++++----- {bro_hub => brostar}/urls.py | 4 ++-- {bro_hub => brostar}/wsgi.py | 4 ++-- docker-compose.yml | 10 +++++----- manage.py | 2 +- pyproject.toml | 12 ++++++------ 13 files changed, 31 insertions(+), 31 deletions(-) rename {bro_hub => brostar}/__init__.py (100%) rename {bro_hub => brostar}/asgi.py (75%) rename {bro_hub => brostar}/celery.py (95%) rename {bro_hub => brostar}/settings.py (96%) rename {bro_hub => brostar}/urls.py (96%) rename {bro_hub => brostar}/wsgi.py (75%) diff --git a/.nens.toml b/.nens.toml index d21ba5f..f5460b8 100644 --- a/.nens.toml +++ b/.nens.toml @@ -2,7 +2,7 @@ is_python_project = true uses_ansible = false meta_version = "0.5.dev0" -project_name = "bro-hub" -package_name = "bro_hub" +project_name = "brostar" +package_name = "brostar" extra_package_names = ["api", "gmn", "gmw"] minimum_coverage = "10" diff --git a/CHANGES.md b/CHANGES.md index c828a3e..8eafbab 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,4 @@ -# Changelog for broHUB +# Changelog for BROStar ## 0.1 (unreleased) diff --git a/README.md b/README.md index 7d5d918..47778fb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# BRO-Hub +# BROStar ## Introductie -BRO-hub is een allomvattend product voor het datamanagement rondom de BRO. Het bestaat uit een API om zowel data uit de BRO te importeren als data naar de BRO op te sturen. De geimporteerde data wordt opgeslagen in een database en is via de API op te vragen. +BROStar is een allomvattend product voor het datamanagement rondom de BRO. Het bestaat uit een API om zowel data uit de BRO te importeren als data naar de BRO op te sturen. De geimporteerde data wordt opgeslagen in een database en is via de API op te vragen. De backend is een Django applicatie, en de frontend (voorlopig) een Streamlit dashboard. @@ -35,7 +35,7 @@ Some instructions: Do the regular migrate, createsuperuser stuff. -TODO: start celery automatically (`celery -A bro_hub worker -l INFO -P solo`) +TODO: start celery automatically (`celery -A brostar worker -l INFO -P solo`) 7) Maak een organisatie, vul de KvK in diff --git a/api/bro_upload/utils.py b/api/bro_upload/utils.py index f077a35..2bcbbd8 100644 --- a/api/bro_upload/utils.py +++ b/api/bro_upload/utils.py @@ -66,7 +66,7 @@ def add_xml_to_upload( headers={"Content-Type": "application/xml"}, auth=(bro_username, bro_password), data=xml_file, - params={"filename": "BROHub request"}, + params={"filename": "BROStar request"}, ) r.raise_for_status() return r.headers["Location"] diff --git a/bro_hub/__init__.py b/brostar/__init__.py similarity index 100% rename from bro_hub/__init__.py rename to brostar/__init__.py diff --git a/bro_hub/asgi.py b/brostar/asgi.py similarity index 75% rename from bro_hub/asgi.py rename to brostar/asgi.py index 64541c9..c2208f1 100644 --- a/bro_hub/asgi.py +++ b/brostar/asgi.py @@ -1,5 +1,5 @@ """ -ASGI config for bro_hub project. +ASGI config for brostar project. It exposes the ASGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ from django.core.asgi import get_asgi_application -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bro_hub.settings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brostar.settings") application = get_asgi_application() diff --git a/bro_hub/celery.py b/brostar/celery.py similarity index 95% rename from bro_hub/celery.py rename to brostar/celery.py index aa3e856..b6838f2 100644 --- a/bro_hub/celery.py +++ b/brostar/celery.py @@ -1,6 +1,6 @@ from celery import Celery -app = Celery("bro_hub") +app = Celery("brostar") # Using a string here means the worker doesn't have to serialize # the configuration object to child processes. diff --git a/bro_hub/settings.py b/brostar/settings.py similarity index 96% rename from bro_hub/settings.py rename to brostar/settings.py index 4cd244f..03f796b 100644 --- a/bro_hub/settings.py +++ b/brostar/settings.py @@ -58,7 +58,7 @@ "corsheaders.middleware.CorsMiddleware", ] -ROOT_URLCONF = "bro_hub.urls" +ROOT_URLCONF = "brostar.urls" TEMPLATES = [ { @@ -95,7 +95,7 @@ }, } -WSGI_APPLICATION = "bro_hub.wsgi.application" +WSGI_APPLICATION = "brostar.wsgi.application" CORS_ALLOWED_ORIGINS = [ "http://localhost:4200", @@ -106,9 +106,9 @@ DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", - "NAME": "bro_hub", - "USER": "bro_hub", - "PASSWORD": "bro_hub", + "NAME": "brostar", + "USER": "brostar", + "PASSWORD": "brostar", "HOST": "db", } } diff --git a/bro_hub/urls.py b/brostar/urls.py similarity index 96% rename from bro_hub/urls.py rename to brostar/urls.py index 3b3ac14..2401390 100644 --- a/bro_hub/urls.py +++ b/brostar/urls.py @@ -1,5 +1,5 @@ """ -URL configuration for bro_hub project. +URL configuration for brostar project. The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/5.0/topics/http/urls/ @@ -29,7 +29,7 @@ schema_view = get_schema_view( openapi.Info( - title="BROHub API", + title="BROStar API", default_version="v1", description="Simplify the data management of the BRO", terms_of_service="", diff --git a/bro_hub/wsgi.py b/brostar/wsgi.py similarity index 75% rename from bro_hub/wsgi.py rename to brostar/wsgi.py index 8863b08..32ec906 100644 --- a/bro_hub/wsgi.py +++ b/brostar/wsgi.py @@ -1,5 +1,5 @@ """ -WSGI config for bro_hub project. +WSGI config for brostar project. It exposes the WSGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ from django.core.wsgi import get_wsgi_application -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bro_hub.settings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brostar.settings") application = get_wsgi_application() diff --git a/docker-compose.yml b/docker-compose.yml index 0a14ee7..95f1399 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,9 @@ services: db: image: postgis/postgis:14-3.4 environment: - POSTGRES_USER: 'bro_hub' - POSTGRES_PASSWORD: 'bro_hub' - POSTGRES_DB: 'bro_hub' + POSTGRES_USER: 'brostar' + POSTGRES_PASSWORD: 'brostar' + POSTGRES_DB: 'brostar' volumes: - pgdata:/var/lib/postgresql/data restart: unless-stopped @@ -19,10 +19,10 @@ services: celery: environment: - - DJANGO_SETTINGS_MODULE=bro_hub.settings + - DJANGO_SETTINGS_MODULE=brostar.settings - FIELD_ENCRYPTION_KEY="DUMMY-NEEDS-PROD-SETTING-Xgb1GczqZe909UMNc4= build: . - command: celery -A bro_hub worker --loglevel=INFO + command: celery -A brostar worker --loglevel=INFO volumes: - .:/code links: diff --git a/manage.py b/manage.py index cf7949a..e3f899c 100644 --- a/manage.py +++ b/manage.py @@ -6,7 +6,7 @@ def main(): """Run administrative tasks.""" - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bro_hub.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brostar.settings") try: from django.core.management import execute_from_command_line diff --git a/pyproject.toml b/pyproject.toml index d97c48b..3ae6e39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["setuptools>=69"] [project] -name = "bro-hub" +name = "brostar" requires-python = ">=3.11" dependencies = [] description = "Simplify data management for BRO" @@ -16,16 +16,16 @@ version = "0.1.dev0" test = ["pytest"] # pytest added by nens-meta [tool.setuptools] -packages = ["bro_hub", "api", "gmn", "gmw"] +packages = ["brostar", "api", "gmn", "gmw"] [tool.pytest.ini_options] -testpaths = ["bro_hub", "api", "gmn", "gmw"] +testpaths = ["brostar", "api", "gmn", "gmw"] log_level = "DEBUG" django_find_project = false -DJANGO_SETTINGS_MODULE = "bro_hub.settings" +DJANGO_SETTINGS_MODULE = "brostar.settings" [tool.coverage.run] -source = ["bro_hub", "api", "gmn", "gmw"] +source = ["brostar", "api", "gmn", "gmw"] [tool.coverage.report] show_missing = true @@ -41,4 +41,4 @@ select = ["E4", "E7", "E9", "F", "I", "UP", "C901"] release = false [tool.pyright] -include = ["bro_hub", "api", "gmn", "gmw"] +include = ["brostar", "api", "gmn", "gmw"]