🚚(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

@@ -18,7 +18,7 @@ A clear and concise description of what you expected to happen (or code).
3. And then the bug happens! 3. And then the bug happens!
**Environment** **Environment**
- Impress version: - Meet version:
- Platform: - Platform:
**Possible Solution** **Possible Solution**

View File

@@ -9,9 +9,9 @@ We primarily use GitHub as an issue tracker. If however you're encountering an i
--- ---
Please make sure you have read our [main Readme](https://github.com/numerique-gouv/impress). Please make sure you have read our [main Readme](https://github.com/numerique-gouv/meet).
Also make sure it was not already answered in [an open or close issue](https://github.com/numerique-gouv/impress/issues). Also make sure it was not already answered in [an open or close issue](https://github.com/numerique-gouv/meet/issues).
If your question was not covered, and you feel like it should be, fire away! We'd love to improve our docs! 👌 If your question was not covered, and you feel like it should be, fire away! We'd love to improve our docs! 👌

View File

@@ -18,7 +18,7 @@ jobs:
app-id: ${{ secrets.APP_ID }} app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }} private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ github.repository_owner }} owner: ${{ github.repository_owner }}
repositories: "impress,secrets" repositories: "meet,secrets"
- -
name: Checkout repository name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -29,7 +29,7 @@ jobs:
name: Load sops secrets name: Load sops secrets
uses: rouja/actions-sops@main uses: rouja/actions-sops@main
with: with:
secret-file: secrets/numerique-gouv/impress/secrets.enc.env secret-file: secrets/numerique-gouv/meet/secrets.enc.env
age-key: ${{ secrets.SOPS_PRIVATE }} age-key: ${{ secrets.SOPS_PRIVATE }}
- -
name: Call argocd github webhook name: Call argocd github webhook

View File

@@ -1,4 +1,4 @@
name: impress Workflow name: meet Workflow
on: on:
push: push:
@@ -21,7 +21,7 @@ jobs:
run: git log run: git log
- name: Enforce absence of print statements in code - name: Enforce absence of print statements in code
run: | run: |
! git diff origin/${{ github.event.pull_request.base.ref }}..HEAD -- . ':(exclude)**/impress.yml' | grep "print(" ! git diff origin/${{ github.event.pull_request.base.ref }}..HEAD -- . ':(exclude)**/meet.yml' | grep "print("
- name: Check absence of fixup commits - name: Check absence of fixup commits
run: | run: |
! git log | grep 'fixup!' ! git log | grep 'fixup!'
@@ -129,7 +129,7 @@ jobs:
postgres: postgres:
image: postgres:16 image: postgres:16
env: env:
POSTGRES_DB: impress POSTGRES_DB: meet
POSTGRES_USER: dinum POSTGRES_USER: dinum
POSTGRES_PASSWORD: pass POSTGRES_PASSWORD: pass
ports: ports:
@@ -139,11 +139,11 @@ jobs:
env: env:
DJANGO_CONFIGURATION: Test DJANGO_CONFIGURATION: Test
DJANGO_SETTINGS_MODULE: impress.settings DJANGO_SETTINGS_MODULE: meet.settings
DJANGO_SECRET_KEY: ThisIsAnExampleKeyForTestPurposeOnly DJANGO_SECRET_KEY: ThisIsAnExampleKeyForTestPurposeOnly
OIDC_OP_JWKS_ENDPOINT: /endpoint-for-test-purpose-only OIDC_OP_JWKS_ENDPOINT: /endpoint-for-test-purpose-only
DB_HOST: localhost DB_HOST: localhost
DB_NAME: impress DB_NAME: meet
DB_USER: dinum DB_USER: dinum
DB_PASSWORD: pass DB_PASSWORD: pass
DB_PORT: 5432 DB_PORT: 5432

View File

@@ -1,4 +1,4 @@
# Django impress # Django Meet
# ---- base image to inherit from ---- # ---- base image to inherit from ----
FROM python:3.10-slim-bullseye as base FROM python:3.10-slim-bullseye as base
@@ -36,7 +36,7 @@ RUN yarn install --frozen-lockfile && \
# ---- static link collector ---- # ---- static link collector ----
FROM base as link-collector FROM base as link-collector
ARG IMPRESS_STATIC_ROOT=/data/static ARG MEET_STATIC_ROOT=/data/static
# Install libpangocairo & rdfind # Install libpangocairo & rdfind
RUN apt-get update && \ RUN apt-get update && \
@@ -48,7 +48,7 @@ RUN apt-get update && \
# Copy installed python dependencies # Copy installed python dependencies
COPY --from=back-builder /install /usr/local COPY --from=back-builder /install /usr/local
# Copy impress application (see .dockerignore) # Copy Meet application (see .dockerignore)
COPY ./src/backend /app/ COPY ./src/backend /app/
WORKDIR /app WORKDIR /app
@@ -59,7 +59,7 @@ RUN DJANGO_CONFIGURATION=Build DJANGO_JWT_PRIVATE_SIGNING_KEY=Dummy \
# Replace duplicated file by a symlink to decrease the overall size of the # Replace duplicated file by a symlink to decrease the overall size of the
# final image # final image
RUN rdfind -makesymlinks true -followsymlinks true -makeresultsfile false ${IMPRESS_STATIC_ROOT} RUN rdfind -makesymlinks true -followsymlinks true -makeresultsfile false ${MEET_STATIC_ROOT}
# ---- Core application image ---- # ---- Core application image ----
FROM base as core FROM base as core
@@ -89,7 +89,7 @@ RUN chmod g=u /etc/passwd
# Copy installed python dependencies # Copy installed python dependencies
COPY --from=back-builder /install /usr/local COPY --from=back-builder /install /usr/local
# Copy impress application (see .dockerignore) # Copy Meet application (see .dockerignore)
COPY ./src/backend /app/ COPY ./src/backend /app/
WORKDIR /app WORKDIR /app
@@ -110,9 +110,9 @@ RUN apt-get update && \
apt-get install -y postgresql-client && \ apt-get install -y postgresql-client && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Uninstall impress and re-install it in editable mode along with development # Uninstall Meet and re-install it in editable mode along with development
# dependencies # dependencies
RUN pip uninstall -y impress RUN pip uninstall -y meet
RUN pip install -e .[dev] RUN pip install -e .[dev]
# Restore the un-privileged user running the application # Restore the un-privileged user running the application
@@ -130,21 +130,21 @@ CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
# ---- Production image ---- # ---- Production image ----
FROM core as backend-production FROM core as backend-production
ARG IMPRESS_STATIC_ROOT=/data/static ARG MEET_STATIC_ROOT=/data/static
# Gunicorn # Gunicorn
RUN mkdir -p /usr/local/etc/gunicorn RUN mkdir -p /usr/local/etc/gunicorn
COPY docker/files/usr/local/etc/gunicorn/impress.py /usr/local/etc/gunicorn/impress.py COPY docker/files/usr/local/etc/gunicorn/meet.py /usr/local/etc/gunicorn/meet.py
# Un-privileged user running the application # Un-privileged user running the application
ARG DOCKER_USER ARG DOCKER_USER
USER ${DOCKER_USER} USER ${DOCKER_USER}
# Copy statics # Copy statics
COPY --from=link-collector ${IMPRESS_STATIC_ROOT} ${IMPRESS_STATIC_ROOT} COPY --from=link-collector ${MEET_STATIC_ROOT} ${MEET_STATIC_ROOT}
# Copy impress mails # Copy Meet mails
COPY --from=mail-builder /mail/backend/core/templates/mail /app/core/templates/mail COPY --from=mail-builder /mail/backend/core/templates/mail /app/core/templates/mail
# The default command runs gunicorn WSGI server in impress's main module # The default command runs gunicorn WSGI server in Meet's main module
CMD ["gunicorn", "-c", "/usr/local/etc/gunicorn/impress.py", "impress.wsgi:application"] CMD ["gunicorn", "-c", "/usr/local/etc/gunicorn/meet.py", "meet.wsgi:application"]

View File

@@ -159,14 +159,14 @@ test-back-parallel: ## run all back-end tests in parallel
bin/pytest -n auto $${args:-${1}} bin/pytest -n auto $${args:-${1}}
.PHONY: test-back-parallel .PHONY: test-back-parallel
makemigrations: ## run django makemigrations for the impress project. makemigrations: ## run django makemigrations for the Meet project.
@echo "$(BOLD)Running makemigrations$(RESET)" @echo "$(BOLD)Running makemigrations$(RESET)"
@$(COMPOSE) up -d postgresql @$(COMPOSE) up -d postgresql
@$(WAIT_DB) @$(WAIT_DB)
@$(MANAGE) makemigrations @$(MANAGE) makemigrations
.PHONY: makemigrations .PHONY: makemigrations
migrate: ## run django migrations for the impress project. migrate: ## run django migrations for the Meet project.
@echo "$(BOLD)Running migrations$(RESET)" @echo "$(BOLD)Running migrations$(RESET)"
@$(COMPOSE) up -d postgresql @$(COMPOSE) up -d postgresql
@$(WAIT_DB) @$(WAIT_DB)
@@ -290,7 +290,7 @@ clean: ## restore repository state as it was freshly cloned
.PHONY: clean .PHONY: clean
help: help:
@echo "$(BOLD)impress Makefile" @echo "$(BOLD)Meet Makefile"
@echo "Please use 'make $(BOLD)target$(RESET)' where $(BOLD)target$(RESET) is one of:" @echo "Please use 'make $(BOLD)target$(RESET)' where $(BOLD)target$(RESET) is one of:"
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "$(GREEN)%-30s$(RESET) %s\n", $$1, $$2}' @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "$(GREEN)%-30s$(RESET) %s\n", $$1, $$2}'
.PHONY: help .PHONY: help

View File

@@ -7,7 +7,7 @@ UNSET_USER=0
TERRAFORM_DIRECTORY="./env.d/terraform" TERRAFORM_DIRECTORY="./env.d/terraform"
COMPOSE_FILE="${REPO_DIR}/docker-compose.yml" COMPOSE_FILE="${REPO_DIR}/docker-compose.yml"
COMPOSE_PROJECT="impress" COMPOSE_PROJECT="meet"
# _set_user: set (or unset) default user id used to run docker commands # _set_user: set (or unset) default user id used to run docker commands

View File

@@ -7,6 +7,6 @@ _dc_run \
app-dev \ app-dev \
python manage.py spectacular \ python manage.py spectacular \
--api-version 'v1.0' \ --api-version 'v1.0' \
--urlconf 'impress.api_urls' \ --urlconf 'meet.api_urls' \
--format openapi-json \ --format openapi-json \
--file /app/core/tests/swagger/swagger.json --file /app/core/tests/swagger/swagger.json

View File

@@ -17,7 +17,7 @@ preserve_hierarchy: true
files: [ files: [
{ {
source : "/backend/locale/django.pot", source : "/backend/locale/django.pot",
dest: "/backend-impress.pot", dest: "/backend-meet.pot",
translation : "/backend/locale/%locale_with_underscore%/LC_MESSAGES/django.po" translation : "/backend/locale/%locale_with_underscore%/LC_MESSAGES/django.po"
}, },
{ {

View File

@@ -23,7 +23,7 @@ services:
args: args:
DOCKER_USER: ${DOCKER_USER:-1000} DOCKER_USER: ${DOCKER_USER:-1000}
user: ${DOCKER_USER:-1000} user: ${DOCKER_USER:-1000}
image: impress:backend-development image: meet:backend-development
environment: environment:
- PYLINTHOME=/app/.pylint.d - PYLINTHOME=/app/.pylint.d
- DJANGO_CONFIGURATION=Development - DJANGO_CONFIGURATION=Development
@@ -44,8 +44,8 @@ services:
celery-dev: celery-dev:
user: ${DOCKER_USER:-1000} user: ${DOCKER_USER:-1000}
image: impress:backend-development image: meet:backend-development
command: ["celery", "-A", "impress.celery_app", "worker", "-l", "DEBUG"] command: ["celery", "-A", "meet.celery_app", "worker", "-l", "DEBUG"]
environment: environment:
- DJANGO_CONFIGURATION=Development - DJANGO_CONFIGURATION=Development
env_file: env_file:
@@ -64,7 +64,7 @@ services:
args: args:
DOCKER_USER: ${DOCKER_USER:-1000} DOCKER_USER: ${DOCKER_USER:-1000}
user: ${DOCKER_USER:-1000} user: ${DOCKER_USER:-1000}
image: impress:backend-production image: meet:backend-production
environment: environment:
- DJANGO_CONFIGURATION=Demo - DJANGO_CONFIGURATION=Demo
env_file: env_file:
@@ -77,8 +77,8 @@ services:
celery: celery:
user: ${DOCKER_USER:-1000} user: ${DOCKER_USER:-1000}
image: impress:backend-production image: meet:backend-production
command: ["celery", "-A", "impress.celery_app", "worker", "-l", "INFO"] command: ["celery", "-A", "meet.celery_app", "worker", "-l", "INFO"]
environment: environment:
- DJANGO_CONFIGURATION=Demo - DJANGO_CONFIGURATION=Demo
env_file: env_file:

View File

@@ -1,25 +1,25 @@
# Django # Django
DJANGO_ALLOWED_HOSTS=* DJANGO_ALLOWED_HOSTS=*
DJANGO_SECRET_KEY=ThisIsAnExampleKeyForDevPurposeOnly DJANGO_SECRET_KEY=ThisIsAnExampleKeyForDevPurposeOnly
DJANGO_SETTINGS_MODULE=impress.settings DJANGO_SETTINGS_MODULE=meet.settings
DJANGO_SUPERUSER_PASSWORD=admin DJANGO_SUPERUSER_PASSWORD=admin
# Python # Python
PYTHONPATH=/app PYTHONPATH=/app
# impress settings # Meet settings
# Mail # Mail
DJANGO_EMAIL_HOST="mailcatcher" DJANGO_EMAIL_HOST="mailcatcher"
DJANGO_EMAIL_PORT=1025 DJANGO_EMAIL_PORT=1025
# Backend url # Backend url
IMPRESS_BASE_URL="http://localhost:8072" MEET_BASE_URL="http://localhost:8072"
# Media # Media
STORAGES_STATICFILES_BACKEND=django.contrib.staticfiles.storage.StaticFilesStorage STORAGES_STATICFILES_BACKEND=django.contrib.staticfiles.storage.StaticFilesStorage
AWS_S3_ENDPOINT_URL=http://minio:9000 AWS_S3_ENDPOINT_URL=http://minio:9000
AWS_S3_ACCESS_KEY_ID=impress AWS_S3_ACCESS_KEY_ID=meet
AWS_S3_SECRET_ACCESS_KEY=password AWS_S3_SECRET_ACCESS_KEY=password
# OIDC # OIDC

View File

@@ -1,11 +1,11 @@
# Postgresql db container configuration # Postgresql db container configuration
POSTGRES_DB=impress POSTGRES_DB=meet
POSTGRES_USER=dinum POSTGRES_USER=dinum
POSTGRES_PASSWORD=pass POSTGRES_PASSWORD=pass
# App database configuration # App database configuration
DB_HOST=postgresql DB_HOST=postgresql
DB_NAME=impress DB_NAME=meet
DB_USER=dinum DB_USER=dinum
DB_PASSWORD=pass DB_PASSWORD=pass
DB_PORT=5432 DB_PORT=5432

View File

@@ -1,3 +1,3 @@
include LICENSE include LICENSE
include README.md include README.md
recursive-include src/backend/impress *.html *.png *.gif *.css *.ico *.jpg *.jpeg *.po *.mo *.eot *.svg *.ttf *.woff *.woff2 recursive-include src/backend/meet *.html *.png *.gif *.css *.ico *.jpg *.jpeg *.po *.mo *.eot *.svg *.ttf *.woff *.woff2

View File

@@ -1,4 +1,4 @@
"""Impress core API endpoints""" """Meet core API endpoints"""
from django.conf import settings from django.conf import settings
from django.core.exceptions import ValidationError 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 rest_framework import permissions
from ..models import RoleChoices 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 django.utils.translation import gettext_lazy as _
from rest_framework import serializers from rest_framework import serializers

View File

@@ -1,11 +1,11 @@
"""Impress Core application""" """Meet Core application"""
# from django.apps import AppConfig # from django.apps import AppConfig
# from django.utils.translation import gettext_lazy as _ # from django.utils.translation import gettext_lazy as _
# class CoreConfig(AppConfig): # class CoreConfig(AppConfig):
# """Configuration class for the impress core app.""" # """Configuration class for the Meet core app."""
# name = "core" # name = "core"
# app_label = "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.core.exceptions import SuspiciousOperation
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _

View File

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

View File

@@ -24,7 +24,7 @@ class Migration(migrations.Migration):
options={ options={
'verbose_name': 'Resource', 'verbose_name': 'Resource',
'verbose_name_plural': 'Resources', 'verbose_name_plural': 'Resources',
'db_table': 'impress_resource', 'db_table': 'meet_resource',
}, },
), ),
migrations.RemoveField( migrations.RemoveField(
@@ -62,12 +62,12 @@ class Migration(migrations.Migration):
('name', models.CharField(max_length=500)), ('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')), ('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)), ('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={ options={
'verbose_name': 'Room', 'verbose_name': 'Room',
'verbose_name_plural': 'Rooms', 'verbose_name_plural': 'Rooms',
'db_table': 'impress_room', 'db_table': 'meet_room',
'ordering': ('name',), 'ordering': ('name',),
}, },
bases=('core.resource',), bases=('core.resource',),
@@ -85,7 +85,7 @@ class Migration(migrations.Migration):
options={ options={
'verbose_name': 'Resource access', 'verbose_name': 'Resource access',
'verbose_name_plural': 'Resource accesses', 'verbose_name_plural': 'Resource accesses',
'db_table': 'impress_resource_access', 'db_table': 'meet_resource_access',
}, },
), ),
migrations.AddField( 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 import uuid
from logging import getLogger from logging import getLogger
@@ -142,7 +142,7 @@ class User(AbstractBaseUser, BaseModel, auth_models.PermissionsMixin):
REQUIRED_FIELDS = [] REQUIRED_FIELDS = []
class Meta: class Meta:
db_table = "impress_user" db_table = "meet_user"
verbose_name = _("user") verbose_name = _("user")
verbose_name_plural = _("users") verbose_name_plural = _("users")
@@ -175,7 +175,7 @@ class Resource(BaseModel):
) )
class Meta: class Meta:
db_table = "impress_resource" db_table = "meet_resource"
verbose_name = _("Resource") verbose_name = _("Resource")
verbose_name_plural = _("Resources") verbose_name_plural = _("Resources")
@@ -229,7 +229,7 @@ class ResourceAccess(BaseModel):
) )
class Meta: class Meta:
db_table = "impress_resource_access" db_table = "meet_resource_access"
verbose_name = _("Resource access") verbose_name = _("Resource access")
verbose_name_plural = _("Resource accesses") verbose_name_plural = _("Resource accesses")
constraints = [ constraints = [
@@ -294,7 +294,7 @@ class Room(Resource):
) )
class Meta: class Meta:
db_table = "impress_room" db_table = "meet_room"
ordering = ("name",) ordering = ("name",)
verbose_name = _("Room") verbose_name = _("Room")
verbose_name_plural = _("Rooms") verbose_name_plural = _("Rooms")

View File

@@ -64,7 +64,7 @@ def test_authentication_getter_new_user_with_email(monkeypatch):
""" """
klass = OIDCAuthenticationBackend() klass = OIDCAuthenticationBackend()
email = "impress@example.com" email = "meet@example.com"
def get_userinfo_mocked(*args): def get_userinfo_mocked(*args):
return {"sub": "123", "email": email, "first_name": "John", "last_name": "Doe"} 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 from unittest import mock
import pytest 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 import pytest
from rest_framework.test import APIClient 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 import pytest
from rest_framework.test import APIClient 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 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 import random
from unittest import mock 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 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 import random
from unittest import mock 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 import pytest
from rest_framework.test import APIClient 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.""" """The str representation should consist in the room and usernames."""
room = RoomFactory(name="my room") room = RoomFactory(name="my room")
access = UserResourceAccessFactory( 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(): def test_models_resource_accesses_user_str_member_resource():
"""The str representation should consist in the resource id and username.""" """The str representation should consist in the resource id and username."""
access = UserResourceAccessFactory( access = UserResourceAccessFactory(user__email="john.doe@meet.com", role="member")
user__email="john.doe@impress.com", role="member"
)
assert ( assert (
str(access) 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(): def test_models_resource_accesses_user_str_admin():
"""The str representation for an admin user should include the role.""" """The str representation for an admin user should include the role."""
access = UserResourceAccessFactory( access = UserResourceAccessFactory(
user__email="john.doe@impress.com", role="administrator" user__email="john.doe@meet.com", role="administrator"
) )
assert ( assert (
str(access) 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(): def test_models_resource_accesses_user_str_owner():
"""The str representation for an admin user should include the role.""" """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 ( assert (
str(access) 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}"
) )

View File

@@ -18,7 +18,7 @@ from demo import defaults
fake = Faker() fake = Faker()
logger = logging.getLogger("impress.commands.demo.create_demo") logger = logging.getLogger("meet.commands.demo.create_demo")
def random_true_with_probability(probability): def random_true_with_probability(probability):

View File

@@ -199,10 +199,10 @@ msgstr ""
msgid "Either user or team must be set, not both." msgid "Either user or team must be set, not both."
msgstr "" msgstr ""
#: impress/settings.py:134 #: meet/settings.py:134
msgid "English" msgid "English"
msgstr "" msgstr ""
#: impress/settings.py:135 #: meet/settings.py:135
msgid "French" msgid "French"
msgstr "" msgstr ""

View File

@@ -199,10 +199,10 @@ msgstr ""
msgid "Either user or team must be set, not both." msgid "Either user or team must be set, not both."
msgstr "" msgstr ""
#: impress/settings.py:134 #: meet/settings.py:134
msgid "English" msgid "English"
msgstr "" msgstr ""
#: impress/settings.py:135 #: meet/settings.py:135
msgid "French" msgid "French"
msgstr "" msgstr ""

View File

@@ -1,12 +1,12 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
impress's sandbox management script. meet's sandbox management script.
""" """
import os import os
import sys import sys
if __name__ == "__main__": if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "impress.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meet.settings")
os.environ.setdefault("DJANGO_CONFIGURATION", "Development") os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
from configurations.management import execute_from_command_line from configurations.management import execute_from_command_line

View File

@@ -1,16 +1,16 @@
"""Impress celery configuration file.""" """Meet celery configuration file."""
import os import os
from celery import Celery from celery import Celery
from configurations.importer import install from configurations.importer import install
# Set the default Django settings module for the 'celery' program. # Set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "impress.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meet.settings")
os.environ.setdefault("DJANGO_CONFIGURATION", "Development") os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
install(check_options=True) install(check_options=True)
app = Celery("impress") app = Celery("meet")
# Using a string here means the worker doesn't have to serialize # Using a string here means the worker doesn't have to serialize
# the configuration object to child processes. # the configuration object to child processes.

View File

@@ -1,5 +1,5 @@
""" """
Django settings for impress project. Django settings for Meet project.
Generated by 'django-admin startproject' using Django 3.1.5. Generated by 'django-admin startproject' using Django 3.1.5.
@@ -72,8 +72,8 @@ class Base(Configuration):
SECRET_KEY = values.Value(None) SECRET_KEY = values.Value(None)
# Application definition # Application definition
ROOT_URLCONF = "impress.urls" ROOT_URLCONF = "meet.urls"
WSGI_APPLICATION = "impress.wsgi.application" WSGI_APPLICATION = "meet.wsgi.application"
# Database # Database
DATABASES = { DATABASES = {
@@ -83,9 +83,7 @@ class Base(Configuration):
environ_name="DB_ENGINE", environ_name="DB_ENGINE",
environ_prefix=None, environ_prefix=None,
), ),
"NAME": values.Value( "NAME": values.Value("meet", environ_name="DB_NAME", environ_prefix=None),
"impress", environ_name="DB_NAME", environ_prefix=None
),
"USER": values.Value("dinum", environ_name="DB_USER", environ_prefix=None), "USER": values.Value("dinum", environ_name="DB_USER", environ_prefix=None),
"PASSWORD": values.Value( "PASSWORD": values.Value(
"pass", environ_name="DB_PASSWORD", environ_prefix=None "pass", environ_name="DB_PASSWORD", environ_prefix=None
@@ -132,7 +130,7 @@ class Base(Configuration):
environ_name="AWS_S3_REGION_NAME", environ_prefix=None environ_name="AWS_S3_REGION_NAME", environ_prefix=None
) )
AWS_STORAGE_BUCKET_NAME = values.Value( AWS_STORAGE_BUCKET_NAME = values.Value(
"impress-media-storage", "meet-media-storage",
environ_name="AWS_STORAGE_BUCKET_NAME", environ_name="AWS_STORAGE_BUCKET_NAME",
environ_prefix=None, environ_prefix=None,
) )
@@ -211,7 +209,7 @@ class Base(Configuration):
# Django applications from the highest priority to the lowest # Django applications from the highest priority to the lowest
INSTALLED_APPS = [ INSTALLED_APPS = [
# impress # Meet
"core", "core",
"demo", "demo",
"drf_spectacular", "drf_spectacular",
@@ -256,8 +254,8 @@ class Base(Configuration):
} }
SPECTACULAR_SETTINGS = { SPECTACULAR_SETTINGS = {
"TITLE": "Impress API", "TITLE": "Meet API",
"DESCRIPTION": "This is the impress API schema.", "DESCRIPTION": "This is the Meet API schema.",
"VERSION": "1.0.0", "VERSION": "1.0.0",
"SERVE_INCLUDE_SCHEMA": False, "SERVE_INCLUDE_SCHEMA": False,
"ENABLE_DJANGO_DEPLOY_CHECK": values.BooleanValue( "ENABLE_DJANGO_DEPLOY_CHECK": values.BooleanValue(
@@ -376,10 +374,10 @@ class Base(Configuration):
), ),
} }
DEFAULT_ROOM_IS_PUBLIC = values.BooleanValue( DEFAULT_ROOM_IS_PUBLIC = values.BooleanValue(
True, environ_name="MAGNIFY_DEFAULT_ROOM_IS_PUBLIC", environ_prefix=None True, environ_name="DEFAULT_ROOM_IS_PUBLIC", environ_prefix=None
) )
ALLOW_UNREGISTERED_ROOMS = values.BooleanValue( ALLOW_UNREGISTERED_ROOMS = values.BooleanValue(
True, environ_name="MAGNIFY_ALLOW_UNREGISTERED_ROOMS", environ_prefix=None True, environ_name="ALLOW_UNREGISTERED_ROOMS", environ_prefix=None
) )
# pylint: disable=invalid-name # pylint: disable=invalid-name
@@ -465,7 +463,7 @@ class Development(Base):
CSRF_TRUSTED_ORIGINS = ["http://localhost:8072", "http://localhost:3000"] CSRF_TRUSTED_ORIGINS = ["http://localhost:8072", "http://localhost:3000"]
DEBUG = True DEBUG = True
SESSION_COOKIE_NAME = "impress_sessionid" SESSION_COOKIE_NAME = "meet_sessionid"
USE_SWAGGER = True USE_SWAGGER = True
@@ -487,7 +485,7 @@ class Test(Base):
}, },
}, },
"loggers": { "loggers": {
"impress": { "meet": {
"handlers": ["console"], "handlers": ["console"],
"level": "DEBUG", "level": "DEBUG",
}, },

View File

@@ -1,4 +1,4 @@
"""URL configuration for the impress project""" """URL configuration for the Meet project"""
from django.conf import settings from django.conf import settings
from django.conf.urls.static import static from django.conf.urls.static import static

View File

@@ -1,5 +1,5 @@
""" """
WSGI config for the impress project. WSGI config for the Meet project.
It exposes the WSGI callable as a module-level variable named ``application``. It exposes the WSGI callable as a module-level variable named ``application``.
@@ -11,7 +11,7 @@ import os
from configurations.wsgi import get_wsgi_application from configurations.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "impress.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meet.settings")
os.environ.setdefault("DJANGO_CONFIGURATION", "Development") os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
application = get_wsgi_application() application = get_wsgi_application()

View File

@@ -1,12 +1,12 @@
# #
# impress package # Meet package
# #
[build-system] [build-system]
requires = ["setuptools"] requires = ["setuptools"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project] [project]
name = "impress" name = "meet"
version = "0.1.0" version = "0.1.0"
authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }] authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }]
classifiers = [ classifiers = [
@@ -123,8 +123,8 @@ select = [
] ]
[tool.ruff.lint.isort] [tool.ruff.lint.isort]
section-order = ["future","standard-library","django","third-party","impress","first-party","local-folder"] section-order = ["future","standard-library","django","third-party","meet","first-party","local-folder"]
sections = { impress=["core"], django=["django"] } sections = { meet=["core"], django=["django"] }
[tool.ruff.per-file-ignores] [tool.ruff.per-file-ignores]
"**/tests/*" = ["S", "SLF"] "**/tests/*" = ["S", "SLF"]

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
"""Setup file for the impress module. All configuration stands in the setup.cfg file.""" """Setup file for the meet module. All configuration stands in the setup.cfg file."""
# coding: utf-8 # coding: utf-8
from setuptools import setup from setuptools import setup