From d7299580a54c912b9a85a1273e535572e5519ae7 Mon Sep 17 00:00:00 2001 From: hcwinsemius Date: Fri, 27 Sep 2024 09:52:26 +0200 Subject: [PATCH] 96 logo and trademark (#97) * update readme with logo / trademark #96 * updating models and interface theme #96 * altered color scheme, moved to `nodeorc=0.2.1` #96 * on the fly created files to gitignore #96 * chmod for docker changed back to 666 #96 * version bump and changelog #96 --- .gitignore | 5 +++ CHANGELOG.md | 34 +++++++++++++++++++ LiveORC/settings.py | 3 +- README.md | 17 +++++++++- ...meraconfig_version_alter_recipe_version.py | 23 +++++++++++++ api/models/camera_config.py | 2 +- api/models/recipe.py | 2 +- dev/DEVELOP.md | 12 +++++-- dev/requirements.txt | 2 +- .../admin_interface_theme_liveorc.json | 12 +++---- docker-compose.postgis.yml | 3 +- docker-compose.rabbitmq.yml | 3 +- docker-compose.s3.yml | 1 - docker-compose.spatialite.yml | 1 - requirements.txt | 26 +++++++------- 15 files changed, 114 insertions(+), 32 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 api/migrations/0003_alter_cameraconfig_version_alter_recipe_version.py diff --git a/.gitignore b/.gitignore index 6057b1a..751caab 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,11 @@ nginx/nginx.conf nginx/nginx-ssl.conf +# nginx related +.cronenv +re +sys + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6f521e4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,34 @@ +## [0.2.0] - 2024-09-27 +### Added +- Style and logos +### Changed +- Bump nodeorc version to 0.2.1 +### Deprecated +### Removed +### Fixed +- Improvements in README.md +### Security + + +## [0.1.1] - 2024-06-14 +### Added +- Tabular downloads +### Changed +- Bump nodeorc version +### Deprecated +### Removed +### Fixed +### Security +- Freeze of package versions +- Docker image so that a frozen version is used by end users + + +## [0.1.0] - 2024-05-31 +### Added +- First pre-release of LiveOpenRiverCam +### Changed +### Deprecated +### Removed +### Fixed +### Security + diff --git a/LiveORC/settings.py b/LiveORC/settings.py index a99c997..e9f42d0 100644 --- a/LiveORC/settings.py +++ b/LiveORC/settings.py @@ -16,7 +16,7 @@ import boto3 # See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ -VERSION = "0.1.1" +VERSION = "0.2.0" # Build paths inside the project like this: BASE_DIR / 'subdir'. # try to get BASE_DIR from env variable BASE_DIR = Path(__file__).resolve().parent.parent @@ -95,6 +95,7 @@ # Celery Configuration Options CELERY_BROKER_URL = f'amqp://{os.getenv("LORC_RABBITMQ_USER")}:{os.getenv("LORC_RABBITMQ_PASS")}@{os.getenv("LORC_RABBITMQ_HOST")}:5672/' CELERY_RESULT_BACKEND = f'rpc://{os.getenv("LORC_RABBITMQ_USER")}:{os.getenv("LORC_RABBITMQ_PASS")}@{os.getenv("LORC_RABBITMQ_HOST")}:5672/' +CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP = True CELERY_ACCEPT_CONTENT = ['json'] CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' diff --git a/README.md b/README.md index 79c6d03..7524f7b 100755 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +
+ +
+
+ ![Version](https://img.shields.io/github/v/release/localdevices/LiveORC) # LiveORC @@ -24,6 +30,7 @@ Web-based, professional and scalable velocimetry analysis for operational river * [Set up a field camera](#set-up-a-field-camera) * [REST API](#rest-api) * [Recipes](#recipes) +* [Trademark](#trademark) > [!IMPORTANT] > LiveORC is still in development. Features such as interactive selection of ground control points, assembling a camera @@ -120,7 +127,7 @@ is our recommended use. Please take the following into account before starting L socket. To allow the non-root user to connect to the socket, run the following to allow access: ```shell - sudo chmod 660 /var/run/docker.sock + sudo chmod 666 /var/run/docker.sock ``` This assumes the socket runs on `/var/run/docker.sock`. If the location is different, then alter the location. @@ -745,3 +752,11 @@ mask: wdw: 1 reduce_time: True ``` + +# License +LiveORC is licensed under the terms of the +[GNU Affero General Public License v3.0](https://github.com/localdevices/LiveORC/blob/main/LICENSE) + +# Trademark +See our [OpenRiverCam Trademark guidelines](https://github.com/localdevices/pyorc/blob/main/TRADEMARK.md) + diff --git a/api/migrations/0003_alter_cameraconfig_version_alter_recipe_version.py b/api/migrations/0003_alter_cameraconfig_version_alter_recipe_version.py new file mode 100644 index 0000000..368e8d0 --- /dev/null +++ b/api/migrations/0003_alter_cameraconfig_version_alter_recipe_version.py @@ -0,0 +1,23 @@ +# Generated by Django 5.0.6 on 2024-09-26 14:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0002_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='cameraconfig', + name='version', + field=models.CharField(blank=True, editable=False, max_length=15, verbose_name='pyORC version compatibility'), + ), + migrations.AlterField( + model_name='recipe', + name='version', + field=models.CharField(blank=True, editable=False, max_length=15), + ), + ] diff --git a/api/models/camera_config.py b/api/models/camera_config.py index e7c8ff1..f79c084 100644 --- a/api/models/camera_config.py +++ b/api/models/camera_config.py @@ -96,7 +96,7 @@ def __str__(self): start_date = models.DateTimeField("start validity date", auto_now_add=True) end_date = models.DateTimeField("end validity date", null=True) site = models.ForeignKey(Site, on_delete=models.CASCADE) - version = models.CharField("pyORC version compatibility", max_length=15, blank=True, default=pyorc.__version__, editable=False) + version = models.CharField("pyORC version compatibility", max_length=15, blank=True, editable=False) server = models.ForeignKey(Server, on_delete=models.SET_NULL, null=True, blank=True) recipe = models.ForeignKey(Recipe, on_delete=models.SET_NULL, null=True, blank=True) profile = models.ForeignKey(Profile, on_delete=models.SET_NULL, null=True, blank=True) diff --git a/api/models/recipe.py b/api/models/recipe.py index 1041f81..f672d6b 100644 --- a/api/models/recipe.py +++ b/api/models/recipe.py @@ -9,4 +9,4 @@ class Recipe(BaseInstituteModel): """ name = models.CharField(max_length=100, help_text="Recognizable unique name for your recipe") data = models.JSONField(help_text="JSON formatted recipe for processing videos. See https://localdevices.github.io/pyorc/user-guide/cli.html") - version = models.CharField(max_length=15, blank=True, default=pyorc.__version__, editable=False) + version = models.CharField(max_length=15, blank=True, editable=False) diff --git a/dev/DEVELOP.md b/dev/DEVELOP.md index 6ee6b6a..f14ed47 100644 --- a/dev/DEVELOP.md +++ b/dev/DEVELOP.md @@ -34,10 +34,10 @@ Before creating a new release, the following MUST be in place. - Bump version number (minor: fixes and bugs, medium: small changes in API, added features, major: large breaking changes or major new options and features) -- Updated CHANGELOG.md +- Update `CHANGELOG.md`. - ensure any new requirements are added to `dev/requirements.txt` without a version number (unless a specific version is required). -- freeze `requirements.txt` as instructed below +- freeze `requirements.txt` as instructed below. ## How to freeze packages @@ -49,6 +49,8 @@ python -m venv $HOME/venv/liveorc-dev source $HOME/venv/liveorc-dev/bin/activate pip install --upgrade pip pip install -r dev/requirements.txt +# run the tests, do not deploy before these are satisfactory +python manage.py test # freeze only packages directly imported into the project pip freeze -q -r dev/requirements.txt | sed '/freeze/,$ d' > requirements.txt deactivate @@ -56,4 +58,8 @@ deactivate rm -fr $HOME/venv/liveorc-dev ``` - +> [!NOTE] +> As shown above, ensure that all tests run satisfactorily. This requires an installation on python<3.12, tests fail with +> python=3.12 because the `assertEquals` changed name. It is recommended to also check if the tests of the installed +> version of pyopenrivercam are running without faults, by checking out the code of pyorc from +> https://github.com/localdevices/pyorc and running the tests with the installed liveorc environment. diff --git a/dev/requirements.txt b/dev/requirements.txt index bf80c68..98d14da 100644 --- a/dev/requirements.txt +++ b/dev/requirements.txt @@ -17,7 +17,7 @@ django-storages drf-nested-routers drf-spectacular fontawesomefree -nodeorc==0.1.7 +nodeorc==0.2.0 pytest-django psycopg2-binary shortuuid diff --git a/django-admin-interface/admin_interface_theme_liveorc.json b/django-admin-interface/admin_interface_theme_liveorc.json index 6c5acaf..9e36c86 100644 --- a/django-admin-interface/admin_interface_theme_liveorc.json +++ b/django-admin-interface/admin_interface_theme_liveorc.json @@ -6,14 +6,14 @@ "name": "LiveOpenRiverCam", "active": true, "title": "LiveOpenRiverCam", - "title_color": "#F5DD5D", + "title_color": "#F5F5F5", "title_visible": true, - "logo": "admin-interface/logo/Local-Devices-horizontal-website-2.png", + "logo": "admin-interface/logo/orc_logo.svg", "logo_color": "#FFFFFF", "logo_max_width": 200, - "logo_max_height": 50, + "logo_max_height": 100, "logo_visible": true, - "favicon": "admin-interface/favicon/localdevices_icon.png", + "favicon": "admin-interface/favicon/orc_favicon.svg", "env_name": "LiveOpenRiverCam", "env_color": "#C5D3E7", "env_visible_in_header": true, @@ -21,7 +21,7 @@ "language_chooser_active": true, "language_chooser_control": "default-select", "language_chooser_display": "code", - "css_header_background_color": "#386784", + "css_header_background_color": "#2C5A98", "css_header_text_color": "#2FD1FF", "css_header_link_color": "#FFFFFF", "css_header_link_hover_color": "#C9F0DD", @@ -33,7 +33,7 @@ "css_module_link_hover_color": "#95CAE7", "css_module_rounded_corners": true, "css_generic_link_color": "#0D2A3C", - "css_generic_link_hover_color": "#153A66", + "css_generic_link_hover_color": "#2C5A98", "css_generic_link_active_color": "#296BB8", "css_save_button_background_color": "#0C2B4B", "css_save_button_background_hover_color": "#0C2B3C", diff --git a/docker-compose.postgis.yml b/docker-compose.postgis.yml index e372753..3f1122d 100644 --- a/docker-compose.postgis.yml +++ b/docker-compose.postgis.yml @@ -1,4 +1,3 @@ -#version: '3' services: webapp: depends_on: @@ -11,7 +10,7 @@ services: - LORC_DB_PASS db: - image: postgis/postgis + image: postgis/postgis:16-3.4 container_name: db ports: - ${LORC_DB_PORT}:5432 diff --git a/docker-compose.rabbitmq.yml b/docker-compose.rabbitmq.yml index 14208d7..06cb683 100644 --- a/docker-compose.rabbitmq.yml +++ b/docker-compose.rabbitmq.yml @@ -7,7 +7,8 @@ services: - LORC_RABBITMQ_PASS - LORC_RABBITMQ_USER rabbitmq: - image: rabbitmq:management + # rabbitmq >=4 returns an error related to a celery dependency + image: rabbitmq:3.13.7 container_name: rabbitmq hostname: rabbitmq environment: diff --git a/docker-compose.s3.yml b/docker-compose.s3.yml index 9112fcc..590a8b2 100644 --- a/docker-compose.s3.yml +++ b/docker-compose.s3.yml @@ -1,4 +1,3 @@ -#version: '3' services: webapp: environment: diff --git a/docker-compose.spatialite.yml b/docker-compose.spatialite.yml index b1e8460..41f40ba 100644 --- a/docker-compose.spatialite.yml +++ b/docker-compose.spatialite.yml @@ -1,4 +1,3 @@ -#version: '3' services: webapp: volumes: diff --git a/requirements.txt b/requirements.txt index b7d33eb..72e01dc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,23 +1,23 @@ celery==5.4.0 -cryptography==42.0.8 -Django==5.0.6 -djangorestframework==3.15.1 +cryptography==43.0.1 +Django==5.1.1 +djangorestframework==3.15.2 djangorestframework-csv==3.0.2 djangorestframework-queryfields==1.1.0 djangorestframework-simplejwt==5.3.1 -django-admin-rangefilter==0.13.0 -django-admin-interface==0.28.6 -django-debug-toolbar==4.4.2 +django-admin-rangefilter==0.13.2 +django-admin-interface==0.28.9 +django-debug-toolbar==4.4.6 django-extensions==3.2.3 -django-filter==24.2 -django-import-export==4.0.8 +django-filter==24.3 +django-import-export==4.1.1 django-json-widget==2.0.1 -django-object-actions==4.2.0 -django-storages==1.14.3 +django-object-actions==4.3.0 +django-storages==1.14.4 drf-nested-routers==0.94.1 drf-spectacular==0.27.2 -fontawesomefree==6.5.1 -nodeorc==0.1.8 -pytest-django==4.8.0 +fontawesomefree==6.6.0 +nodeorc==0.2.1 +pytest-django==4.9.0 psycopg2-binary==2.9.9 shortuuid==1.0.13