🚚(backend) rename Impress to Meet

I have updated all references of "Impress" to "Meet".
Migrations were manually updated and not regenerated. Never-mind,
they all will be squashed before the first release.

I have also searched for reference to "Magnify", and replaced them
by "Meet".

While updating the backend sources, I have also fixed other parts of
the project, namely:
- Compose file
- Github documentation and CI
- Makefile commands
This commit is contained in:
lebaudantoine
2024-07-01 18:10:40 +02:00
committed by antoine lebaud
parent 78e6f26383
commit 64efcc1623
42 changed files with 111 additions and 115 deletions

View File

@@ -1,4 +1,4 @@
"""Impress core API endpoints"""
"""Meet core API endpoints"""
from django.conf import settings
from django.core.exceptions import ValidationError

View File

@@ -1,4 +1,4 @@
"""Permission handlers for the impress core app."""
"""Permission handlers for the Meet core app."""
from rest_framework import permissions
from ..models import RoleChoices

View File

@@ -1,4 +1,4 @@
"""Client serializers for the impress core app."""
"""Client serializers for the Meet core app."""
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers

View File

@@ -1,11 +1,11 @@
"""Impress Core application"""
"""Meet Core application"""
# from django.apps import AppConfig
# from django.utils.translation import gettext_lazy as _
# class CoreConfig(AppConfig):
# """Configuration class for the impress core app."""
# """Configuration class for the Meet core app."""
# name = "core"
# app_label = "core"
# verbose_name = _("impress core application")
# verbose_name = _("meet core application")

View File

@@ -1,4 +1,4 @@
"""Authentication Backends for the Impress core app."""
"""Authentication Backends for the Meet core app."""
from django.core.exceptions import SuspiciousOperation
from django.utils.translation import gettext_lazy as _

View File

@@ -30,7 +30,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'Document',
'verbose_name_plural': 'Documents',
'db_table': 'impress_document',
'db_table': 'meet_document',
'ordering': ('title',),
},
),
@@ -49,7 +49,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'Template',
'verbose_name_plural': 'Templates',
'db_table': 'impress_template',
'db_table': 'meet_template',
'ordering': ('title',),
},
),
@@ -76,7 +76,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'user',
'verbose_name_plural': 'users',
'db_table': 'impress_user',
'db_table': 'meet_user',
},
managers=[
('objects', django.contrib.auth.models.UserManager()),
@@ -96,7 +96,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'Document/user relation',
'verbose_name_plural': 'Document/user relations',
'db_table': 'impress_document_access',
'db_table': 'meet_document_access',
'ordering': ('-created_at',),
},
),
@@ -114,7 +114,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'Document invitation',
'verbose_name_plural': 'Document invitations',
'db_table': 'impress_invitation',
'db_table': 'meet_invitation',
},
),
migrations.CreateModel(
@@ -131,7 +131,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'Template/user relation',
'verbose_name_plural': 'Template/user relations',
'db_table': 'impress_template_access',
'db_table': 'meet_template_access',
'ordering': ('-created_at',),
},
),

View File

@@ -24,7 +24,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'Resource',
'verbose_name_plural': 'Resources',
'db_table': 'impress_resource',
'db_table': 'meet_resource',
},
),
migrations.RemoveField(
@@ -62,12 +62,12 @@ class Migration(migrations.Migration):
('name', models.CharField(max_length=500)),
('resource', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.resource')),
('slug', models.SlugField(blank=True, max_length=100, null=True, unique=True)),
('configuration', models.JSONField(blank=True, default={}, help_text='Values for Magnify parameters to configure the room.', verbose_name='Magnify room configuration')),
('configuration', models.JSONField(blank=True, default={}, help_text='Values for Meet parameters to configure the room.', verbose_name='Meet room configuration')),
],
options={
'verbose_name': 'Room',
'verbose_name_plural': 'Rooms',
'db_table': 'impress_room',
'db_table': 'meet_room',
'ordering': ('name',),
},
bases=('core.resource',),
@@ -85,7 +85,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'Resource access',
'verbose_name_plural': 'Resource accesses',
'db_table': 'impress_resource_access',
'db_table': 'meet_resource_access',
},
),
migrations.AddField(

View File

@@ -1,5 +1,5 @@
"""
Declare and configure the models for the impress core application
Declare and configure the models for the Meet core application
"""
import uuid
from logging import getLogger
@@ -142,7 +142,7 @@ class User(AbstractBaseUser, BaseModel, auth_models.PermissionsMixin):
REQUIRED_FIELDS = []
class Meta:
db_table = "impress_user"
db_table = "meet_user"
verbose_name = _("user")
verbose_name_plural = _("users")
@@ -175,7 +175,7 @@ class Resource(BaseModel):
)
class Meta:
db_table = "impress_resource"
db_table = "meet_resource"
verbose_name = _("Resource")
verbose_name_plural = _("Resources")
@@ -229,7 +229,7 @@ class ResourceAccess(BaseModel):
)
class Meta:
db_table = "impress_resource_access"
db_table = "meet_resource_access"
verbose_name = _("Resource access")
verbose_name_plural = _("Resource accesses")
constraints = [
@@ -294,7 +294,7 @@ class Room(Resource):
)
class Meta:
db_table = "impress_room"
db_table = "meet_room"
ordering = ("name",)
verbose_name = _("Room")
verbose_name_plural = _("Rooms")

View File

@@ -64,7 +64,7 @@ def test_authentication_getter_new_user_with_email(monkeypatch):
"""
klass = OIDCAuthenticationBackend()
email = "impress@example.com"
email = "meet@example.com"
def get_userinfo_mocked(*args):
return {"sub": "123", "email": email, "first_name": "John", "last_name": "Doe"}

View File

@@ -1,4 +1,4 @@
"""Fixtures for tests in the impress core application"""
"""Fixtures for tests in the Meet core application"""
from unittest import mock
import pytest

View File

@@ -1,5 +1,5 @@
"""
Test rooms API endpoints in the impress core app: create.
Test rooms API endpoints in the Meet core app: create.
"""
import pytest
from rest_framework.test import APIClient

View File

@@ -1,5 +1,5 @@
"""
Test rooms API endpoints in the impress core app: delete.
Test rooms API endpoints in the Meet core app: delete.
"""
import pytest
from rest_framework.test import APIClient

View File

@@ -1,5 +1,5 @@
"""
Test rooms API endpoints in the impress core app: list.
Test rooms API endpoints in the Meet core app: list.
"""
from unittest import mock

View File

@@ -1,5 +1,5 @@
"""
Test rooms API endpoints in the impress core app: retrieve.
Test rooms API endpoints in the Meet core app: retrieve.
"""
import random
from unittest import mock

View File

@@ -1,5 +1,5 @@
"""
Test rooms API endpoints in the impress core app: update.
Test rooms API endpoints in the Meet core app: update.
"""
import random

View File

@@ -1,5 +1,5 @@
"""
Test resource accesses API endpoints in the impress core app.
Test resource accesses API endpoints in the Meet core app.
"""
import random
from unittest import mock

View File

@@ -1,5 +1,5 @@
"""
Test users API endpoints in the impress core app.
Test users API endpoints in the Meet core app.
"""
import pytest
from rest_framework.test import APIClient

View File

@@ -14,40 +14,38 @@ def test_models_resource_accesses_user_str_member_room():
"""The str representation should consist in the room and usernames."""
room = RoomFactory(name="my room")
access = UserResourceAccessFactory(
resource=room, user__email="john.doe@impress.com", role="member"
resource=room, user__email="john.doe@meet.com", role="member"
)
assert str(access) == "Member role for john.doe@impress.com on my room"
assert str(access) == "Member role for john.doe@meet.com on my room"
def test_models_resource_accesses_user_str_member_resource():
"""The str representation should consist in the resource id and username."""
access = UserResourceAccessFactory(
user__email="john.doe@impress.com", role="member"
)
access = UserResourceAccessFactory(user__email="john.doe@meet.com", role="member")
assert (
str(access)
== f"Member role for john.doe@impress.com on resource {access.resource_id!s}"
== f"Member role for john.doe@meet.com on resource {access.resource_id!s}"
)
def test_models_resource_accesses_user_str_admin():
"""The str representation for an admin user should include the role."""
access = UserResourceAccessFactory(
user__email="john.doe@impress.com", role="administrator"
user__email="john.doe@meet.com", role="administrator"
)
assert (
str(access)
== f"Administrator role for john.doe@impress.com on resource {access.resource_id!s}"
== f"Administrator role for john.doe@meet.com on resource {access.resource_id!s}"
)
def test_models_resource_accesses_user_str_owner():
"""The str representation for an admin user should include the role."""
access = UserResourceAccessFactory(user__email="john.doe@impress.com", role="owner")
access = UserResourceAccessFactory(user__email="john.doe@meet.com", role="owner")
assert (
str(access)
== f"Owner role for john.doe@impress.com on resource {access.resource_id!s}"
== f"Owner role for john.doe@meet.com on resource {access.resource_id!s}"
)