♻️(project) rename project from "publish" to "impress"

The repository was renamed to "impress" but the code was still
mentionning "publish".
This commit is contained in:
Samuel Paccoud - DINUM
2024-03-07 19:46:46 +01:00
committed by Samuel Paccoud
parent f581eb8abd
commit ab7d9933e0
42 changed files with 119 additions and 119 deletions

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
"""Permission handlers for the publish core app."""
"""Permission handlers for the impress core app."""
from django.core import exceptions
from rest_framework import permissions

View File

@@ -1,4 +1,4 @@
"""Client serializers for the publish core app."""
"""Client serializers for the impress core app."""
from django.db.models import Q
from django.utils.translation import gettext_lazy as _

View File

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

View File

@@ -33,7 +33,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'Template',
'verbose_name_plural': 'Templates',
'db_table': 'publish_template',
'db_table': 'impress_template',
'ordering': ('title',),
},
),
@@ -60,7 +60,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'user',
'verbose_name_plural': 'users',
'db_table': 'publish_user',
'db_table': 'impress_user',
},
managers=[
('objects', django.contrib.auth.models.UserManager()),
@@ -80,7 +80,7 @@ class Migration(migrations.Migration):
options={
'verbose_name': 'Template/user relation',
'verbose_name_plural': 'Template/user relations',
'db_table': 'publish_template_access',
'db_table': 'impress_template_access',
},
),
migrations.AddConstraint(

View File

@@ -1,5 +1,5 @@
"""
Declare and configure the models for the publish core application
Declare and configure the models for the impress core application
"""
import textwrap
import uuid
@@ -134,7 +134,7 @@ class User(AbstractBaseUser, BaseModel, auth_models.PermissionsMixin):
REQUIRED_FIELDS = []
class Meta:
db_table = "publish_user"
db_table = "impress_user"
verbose_name = _("user")
verbose_name_plural = _("users")
@@ -169,7 +169,7 @@ class Template(BaseModel):
)
class Meta:
db_table = "publish_template"
db_table = "impress_template"
ordering = ("title",)
verbose_name = _("Template")
verbose_name_plural = _("Templates")
@@ -252,7 +252,7 @@ class TemplateAccess(BaseModel):
)
class Meta:
db_table = "publish_template_access"
db_table = "impress_template_access"
verbose_name = _("Template/user relation")
verbose_name_plural = _("Template/user relations")
constraints = [

View File

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

View File

@@ -1,5 +1,5 @@
"""
Tests for Templates API endpoint in publish's core app: create
Tests for Templates API endpoint in impress's core app: create
"""
import pytest
from rest_framework.test import APIClient

View File

@@ -1,5 +1,5 @@
"""
Tests for Templates API endpoint in publish's core app: delete
Tests for Templates API endpoint in impress's core app: delete
"""
import random

View File

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

View File

@@ -1,5 +1,5 @@
"""
Tests for Templates API endpoint in publish's core app: list
Tests for Templates API endpoint in impress's core app: list
"""
from unittest import mock

View File

@@ -1,5 +1,5 @@
"""
Tests for Templates API endpoint in publish's core app: retrieve
Tests for Templates API endpoint in impress's core app: retrieve
"""
import pytest
from rest_framework.test import APIClient

View File

@@ -1,5 +1,5 @@
"""
Tests for Templates API endpoint in publish's core app: update
Tests for Templates API endpoint in impress's core app: update
"""
import random

View File

@@ -1,5 +1,5 @@
"""
Test template accesses API endpoints for users in publish's core app.
Test template accesses API endpoints for users in impress's core app.
"""
import random
from uuid import uuid4

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
"""
Django settings for publish project.
Django settings for impress project.
Generated by 'django-admin startproject' using Django 3.1.5.
@@ -72,8 +72,8 @@ class Base(Configuration):
SECRET_KEY = values.Value(None)
# Application definition
ROOT_URLCONF = "publish.urls"
WSGI_APPLICATION = "publish.wsgi.application"
ROOT_URLCONF = "impress.urls"
WSGI_APPLICATION = "impress.wsgi.application"
# Database
DATABASES = {
@@ -84,7 +84,7 @@ class Base(Configuration):
environ_prefix=None,
),
"NAME": values.Value(
"publish", 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),
"PASSWORD": values.Value(
@@ -186,7 +186,7 @@ class Base(Configuration):
# Django applications from the highest priority to the lowest
INSTALLED_APPS = [
# publish
# impress
"core",
"demo",
"drf_spectacular",
@@ -231,8 +231,8 @@ class Base(Configuration):
}
SPECTACULAR_SETTINGS = {
"TITLE": "publish API",
"DESCRIPTION": "This is the publish API schema.",
"TITLE": "Impress API",
"DESCRIPTION": "This is the impress API schema.",
"VERSION": "1.0.0",
"SERVE_INCLUDE_SCHEMA": False,
"ENABLE_DJANGO_DEPLOY_CHECK": values.BooleanValue(
@@ -415,7 +415,7 @@ class Development(Base):
CSRF_TRUSTED_ORIGINS = ["http://localhost:8072"]
DEBUG = True
SESSION_COOKIE_NAME = "publish_sessionid"
SESSION_COOKIE_NAME = "impress_sessionid"
USE_SWAGGER = True
@@ -437,7 +437,7 @@ class Test(Base):
},
},
"loggers": {
"publish": {
"impress": {
"handlers": ["console"],
"level": "DEBUG",
},
@@ -528,7 +528,7 @@ class Production(Base):
AWS_S3_ENDPOINT_URL = values.Value()
AWS_S3_ACCESS_KEY_ID = values.Value()
AWS_S3_SECRET_ACCESS_KEY = values.Value()
AWS_STORAGE_BUCKET_NAME = values.Value("tf-default-publish-media-storage")
AWS_STORAGE_BUCKET_NAME = values.Value("tf-default-impress-media-storage")
AWS_S3_REGION_NAME = values.Value()

View File

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

View File

@@ -1,5 +1,5 @@
"""
WSGI config for the publish project.
WSGI config for the impress project.
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
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "publish.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "impress.settings")
os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
application = get_wsgi_application()

View File

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

View File

@@ -1,12 +1,12 @@
#
# publish package
# impress package
#
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "publish"
name = "impress"
version = "0.1.0"
authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }]
classifiers = [
@@ -56,10 +56,10 @@ dependencies = [
]
[project.urls]
"Bug Tracker" = "https://github.com/numerique-gouv/publish/issues/new"
"Changelog" = "https://github.com/numerique-gouv/publish/blob/main/CHANGELOG.md"
"Homepage" = "https://github.com/numerique-gouv/publish"
"Repository" = "https://github.com/numerique-gouv/publish"
"Bug Tracker" = "https://github.com/numerique-gouv/impress/issues/new"
"Changelog" = "https://github.com/numerique-gouv/impress/blob/main/CHANGELOG.md"
"Homepage" = "https://github.com/numerique-gouv/impress"
"Repository" = "https://github.com/numerique-gouv/impress"
[project.optional-dependencies]
dev = [
@@ -119,8 +119,8 @@ select = [
]
[tool.ruff.lint.isort]
section-order = ["future","standard-library","django","third-party","publish","first-party","local-folder"]
sections = { publish=["core"], django=["django"] }
section-order = ["future","standard-library","django","third-party","impress","first-party","local-folder"]
sections = { impress=["core"], django=["django"] }
[tool.ruff.per-file-ignores]
"**/tests/*" = ["S", "SLF"]

View File

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

View File

@@ -4,7 +4,7 @@
<mj-wrapper css-class="wrapper" padding="20px 40px 40px 40px">
<mj-section>
<mj-column>
<mj-image src="{% base64_static 'publish/images/logo_publish.png' %}" width="200px" align="left" alt="{%trans 'Company logo' %}" />
<mj-image src="{% base64_static 'impress/images/logo_impress.png' %}" width="200px" align="left" alt="{%trans 'Company logo' %}" />
</mj-column>
</mj-section>
<mj-section mj-class="bg--blue-100" border-radius="6px 6px 0 0" padding="30px 50px 60px 50px">

View File

@@ -16,7 +16,7 @@
"volta": {
"node": "16.15.1"
},
"repository": "https://github.com/numerique-gouv/publish",
"repository": "https://github.com/numerique-gouv/impress",
"author": "DINUM",
"license": "MIT"
}

View File

@@ -1,14 +1,14 @@
{
"name": "publish-openapi-client-ts",
"name": "impress-openapi-client-ts",
"version": "1.1.0",
"private": true,
"description": "Tool to generate Typescript API client for the publish application.",
"description": "Tool to generate Typescript API client for the impress application.",
"scripts": {
"generate:api:client:local": "./scripts/openapi-typescript-codegen/generate_api_client_local.sh $1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/numerique-gouv/publish.git"
"url": "git+https://github.com/numerique-gouv/impress.git"
},
"author": {
"name": "DINUM",
@@ -16,9 +16,9 @@
},
"license": "MIT",
"bugs": {
"url": "https://github.com/numerique-gouv/publish/issues"
"url": "https://github.com/numerique-gouv/impress/issues"
},
"homepage": "https://github.com/numerique-gouv/publish#readme",
"homepage": "https://github.com/numerique-gouv/impress#readme",
"devDependencies": {
"openapi-typescript-codegen": "0.25.0"
}

View File

@@ -5,4 +5,4 @@
# OPTIONS:
# --output the path folder where types will be generated
openapi --input http://app-dev:8000/v1.0/swagger.json --output $1 --indent='2' --name ApiClientpublish --useOptions
openapi --input http://app-dev:8000/v1.0/swagger.json --output $1 --indent='2' --name ApiClientImpress --useOptions