From 88ebb64f162a5737ed435dfefebf36856b0f0f30 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Fri, 29 Mar 2024 17:16:52 +0100 Subject: [PATCH 1/4] Creating a docker image (with the upcoming new name --- .github/workflows/nens-meta.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nens-meta.yml b/.github/workflows/nens-meta.yml index cfcde43..84d2295 100644 --- a/.github/workflows/nens-meta.yml +++ b/.github/workflows/nens-meta.yml @@ -43,4 +43,10 @@ jobs: docker-compose run web coverage report --format markdown >> $GITHUB_STEP_SUMMARY docker-compose run web coverage report --fail-under 10 --format text -### Extra lines below are preserved ### + - name: Publish the Docker image + run: | + docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io + docker tag brostar-api_web ghcr.io/nens/brostar-api:main + docker push ghcr.io/nens/brostar-api:main + if: github.ref == 'refs/heads/main' + # Running this job only for main branch. From 333944797fb5280e041d94529c0b71ed0cf44bf4 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Fri, 29 Mar 2024 17:18:53 +0100 Subject: [PATCH 2/4] brostar -> brostar-api/brostar_api --- pyproject.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3ae6e39..57bd1c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = ["setuptools>=69"] [project] -name = "brostar" +name = "brostar-api" 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 = ["brostar", "api", "gmn", "gmw"] +packages = ["brostar_api", "api", "gmn", "gmw"] [tool.pytest.ini_options] -testpaths = ["brostar", "api", "gmn", "gmw"] +testpaths = ["brostar_api", "api", "gmn", "gmw"] log_level = "DEBUG" django_find_project = false -DJANGO_SETTINGS_MODULE = "brostar.settings" +DJANGO_SETTINGS_MODULE = "brostar_api.settings" [tool.coverage.run] -source = ["brostar", "api", "gmn", "gmw"] +source = ["brostar_api", "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 = ["brostar", "api", "gmn", "gmw"] +include = ["brostar_api", "api", "gmn", "gmw"] From ee8682348ab1e850ca1a646cf98562557e85ba23 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Fri, 29 Mar 2024 17:19:52 +0100 Subject: [PATCH 3/4] brostar -> brostar_api --- {brostar => brostar_api}/__init__.py | 0 {brostar => brostar_api}/asgi.py | 0 {brostar => brostar_api}/celery.py | 0 {brostar => brostar_api}/settings.py | 0 {brostar => brostar_api}/urls.py | 0 {brostar => brostar_api}/wsgi.py | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {brostar => brostar_api}/__init__.py (100%) rename {brostar => brostar_api}/asgi.py (100%) rename {brostar => brostar_api}/celery.py (100%) rename {brostar => brostar_api}/settings.py (100%) rename {brostar => brostar_api}/urls.py (100%) rename {brostar => brostar_api}/wsgi.py (100%) diff --git a/brostar/__init__.py b/brostar_api/__init__.py similarity index 100% rename from brostar/__init__.py rename to brostar_api/__init__.py diff --git a/brostar/asgi.py b/brostar_api/asgi.py similarity index 100% rename from brostar/asgi.py rename to brostar_api/asgi.py diff --git a/brostar/celery.py b/brostar_api/celery.py similarity index 100% rename from brostar/celery.py rename to brostar_api/celery.py diff --git a/brostar/settings.py b/brostar_api/settings.py similarity index 100% rename from brostar/settings.py rename to brostar_api/settings.py diff --git a/brostar/urls.py b/brostar_api/urls.py similarity index 100% rename from brostar/urls.py rename to brostar_api/urls.py diff --git a/brostar/wsgi.py b/brostar_api/wsgi.py similarity index 100% rename from brostar/wsgi.py rename to brostar_api/wsgi.py From fa481c7ae021b40981c1b2379ce212b5033490a6 Mon Sep 17 00:00:00 2001 From: Reinout van Rees Date: Fri, 29 Mar 2024 17:23:13 +0100 Subject: [PATCH 4/4] brostar -> brostar_api --- CHANGES.md | 2 +- README.md | 2 +- brostar_api/asgi.py | 2 +- brostar_api/celery.py | 2 +- brostar_api/settings.py | 4 ++-- brostar_api/wsgi.py | 2 +- manage.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8eafbab..b44433a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,4 @@ -# Changelog for BROStar +# Changelog for BROStar API ## 0.1 (unreleased) diff --git a/README.md b/README.md index af29b76..ed0aee2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# BROStar +# BROStar API ## Introduction diff --git a/brostar_api/asgi.py b/brostar_api/asgi.py index c2208f1..90dec6e 100644 --- a/brostar_api/asgi.py +++ b/brostar_api/asgi.py @@ -11,6 +11,6 @@ from django.core.asgi import get_asgi_application -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brostar.settings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brostar_api.settings") application = get_asgi_application() diff --git a/brostar_api/celery.py b/brostar_api/celery.py index b6838f2..982e532 100644 --- a/brostar_api/celery.py +++ b/brostar_api/celery.py @@ -1,6 +1,6 @@ from celery import Celery -app = Celery("brostar") +app = Celery("brostar_api") # Using a string here means the worker doesn't have to serialize # the configuration object to child processes. diff --git a/brostar_api/settings.py b/brostar_api/settings.py index e7026e0..3f19d15 100644 --- a/brostar_api/settings.py +++ b/brostar_api/settings.py @@ -73,7 +73,7 @@ ] -ROOT_URLCONF = "brostar.urls" +ROOT_URLCONF = "brostar_api.urls" TEMPLATES = [ { @@ -110,7 +110,7 @@ }, } -WSGI_APPLICATION = "brostar.wsgi.application" +WSGI_APPLICATION = "brostar_api.wsgi.application" CORS_ALLOWED_ORIGINS = [ "http://localhost:4200", diff --git a/brostar_api/wsgi.py b/brostar_api/wsgi.py index 32ec906..a7ea850 100644 --- a/brostar_api/wsgi.py +++ b/brostar_api/wsgi.py @@ -11,6 +11,6 @@ from django.core.wsgi import get_wsgi_application -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brostar.settings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brostar_api.settings") application = get_wsgi_application() diff --git a/manage.py b/manage.py index e3f899c..04e5c5d 100644 --- a/manage.py +++ b/manage.py @@ -6,7 +6,7 @@ def main(): """Run administrative tasks.""" - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brostar.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "brostar_api.settings") try: from django.core.management import execute_from_command_line