♻️(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:
committed by
Samuel Paccoud
parent
f581eb8abd
commit
ab7d9933e0
2
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
@@ -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**
|
||||||
- publish version:
|
- Impress version:
|
||||||
- Platform:
|
- Platform:
|
||||||
|
|
||||||
**Possible Solution**
|
**Possible Solution**
|
||||||
|
|||||||
4
.github/ISSUE_TEMPLATE/Support_question.md
vendored
4
.github/ISSUE_TEMPLATE/Support_question.md
vendored
@@ -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/publish).
|
Please make sure you have read our [main Readme](https://github.com/numerique-gouv/impress).
|
||||||
|
|
||||||
Also make sure it was not already answered in [an open or close issue](https://github.com/numerique-gouv/publish/issues).
|
Also make sure it was not already answered in [an open or close issue](https://github.com/numerique-gouv/impress/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! 👌
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: publish Workflow
|
name: impress Workflow
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -23,7 +23,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)**/publish.yml' | grep "print("
|
! git diff origin/${{ github.event.pull_request.base.ref }}..HEAD -- . ':(exclude)**/impress.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!'
|
||||||
@@ -79,13 +79,13 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Generate a version.json file describing app release
|
- name: Generate a version.json file describing app release
|
||||||
run: |
|
run: |
|
||||||
printf '{"commit":"${{ github.sha }}","version":"${{ github.ref }}","source":"https://github.com/${{ github.repository_owner }}/${{ github.repository }}","build":"${{ github.run_id }}"}\n' > src/backend/publish/version.json
|
printf '{"commit":"${{ github.sha }}","version":"${{ github.ref }}","source":"https://github.com/${{ github.repository_owner }}/${{ github.repository }}","build":"${{ github.run_id }}"}\n' > src/backend/impress/version.json
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
- name: Build production image
|
- name: Build production image
|
||||||
run: docker build -t publish:${{ github.sha }} --target production .
|
run: docker build -t impress:${{ github.sha }} --target production .
|
||||||
- name: Check built image availability
|
- name: Check built image availability
|
||||||
run: docker images "publish:${{ github.sha }}*"
|
run: docker images "impress:${{ github.sha }}*"
|
||||||
|
|
||||||
lint-back:
|
lint-back:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -102,11 +102,11 @@ jobs:
|
|||||||
- name: Install development dependencies
|
- name: Install development dependencies
|
||||||
run: pip install --user .[dev]
|
run: pip install --user .[dev]
|
||||||
- name: Check code formatting with ruff
|
- name: Check code formatting with ruff
|
||||||
run: ~/.local/bin/ruff format publish --diff
|
run: ~/.local/bin/ruff format impress --diff
|
||||||
- name: Lint code with ruff
|
- name: Lint code with ruff
|
||||||
run: ~/.local/bin/ruff check publish
|
run: ~/.local/bin/ruff check impress
|
||||||
- name: Lint code with pylint
|
- name: Lint code with pylint
|
||||||
run: ~/.local/bin/pylint publish
|
run: ~/.local/bin/pylint impress
|
||||||
|
|
||||||
test-back:
|
test-back:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -118,7 +118,7 @@ jobs:
|
|||||||
postgres:
|
postgres:
|
||||||
image: postgres:16
|
image: postgres:16
|
||||||
env:
|
env:
|
||||||
POSTGRES_DB: publish
|
POSTGRES_DB: impress
|
||||||
POSTGRES_USER: dinum
|
POSTGRES_USER: dinum
|
||||||
POSTGRES_PASSWORD: pass
|
POSTGRES_PASSWORD: pass
|
||||||
ports:
|
ports:
|
||||||
@@ -128,11 +128,11 @@ jobs:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
DJANGO_CONFIGURATION: Test
|
DJANGO_CONFIGURATION: Test
|
||||||
DJANGO_SETTINGS_MODULE: publish.settings
|
DJANGO_SETTINGS_MODULE: impress.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: publish
|
DB_NAME: impress
|
||||||
DB_USER: dinum
|
DB_USER: dinum
|
||||||
DB_PASSWORD: pass
|
DB_PASSWORD: pass
|
||||||
DB_PORT: 5432
|
DB_PORT: 5432
|
||||||
@@ -196,13 +196,13 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Generate a version.json file describing app release
|
- name: Generate a version.json file describing app release
|
||||||
run: |
|
run: |
|
||||||
printf '{"commit":"${{ github.sha }}","version":"${{ github.ref }}","source":"https://github.com/${{ github.repository_owner }}/${{ github.repository }}","build":"${{ github.run_id }}"}\n' > src/backend/publish/version.json
|
printf '{"commit":"${{ github.sha }}","version":"${{ github.ref }}","source":"https://github.com/${{ github.repository_owner }}/${{ github.repository }}","build":"${{ github.run_id }}"}\n' > src/backend/impress/version.json
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
- name: Build production image
|
- name: Build production image
|
||||||
run: docker build -t publish:${{ github.sha }} --target production .
|
run: docker build -t impress:${{ github.sha }} --target production .
|
||||||
- name: Check built images availability
|
- name: Check built images availability
|
||||||
run: docker images "publish:${{ github.sha }}*"
|
run: docker images "impress:${{ github.sha }}*"
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USER }}" --password-stdin
|
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USER }}" --password-stdin
|
||||||
- name: Tag images
|
- name: Tag images
|
||||||
@@ -210,17 +210,17 @@ jobs:
|
|||||||
DOCKER_TAG=$([[ -z "${{ github.event.ref }}" ]] && echo "${{ github.event.ref }}" || echo "${{ github.event.ref }}" | sed 's/^v//')
|
DOCKER_TAG=$([[ -z "${{ github.event.ref }}" ]] && echo "${{ github.event.ref }}" || echo "${{ github.event.ref }}" | sed 's/^v//')
|
||||||
RELEASE_TYPE=$([[ -z "${{ github.event.ref }}" ]] && echo "branch" || echo "tag ")
|
RELEASE_TYPE=$([[ -z "${{ github.event.ref }}" ]] && echo "branch" || echo "tag ")
|
||||||
echo "DOCKER_TAG: ${DOCKER_TAG} (Git ${RELEASE_TYPE}${{ github.event.ref }})"
|
echo "DOCKER_TAG: ${DOCKER_TAG} (Git ${RELEASE_TYPE}${{ github.event.ref }})"
|
||||||
docker tag publish:${{ github.sha }} numerique-gouv/publish:${DOCKER_TAG}
|
docker tag impress:${{ github.sha }} numerique-gouv/impress:${DOCKER_TAG}
|
||||||
if [[ -n "${{ github.event.ref }}" ]]; then
|
if [[ -n "${{ github.event.ref }}" ]]; then
|
||||||
docker tag publish:${{ github.sha }} numerique-gouv/publish:latest
|
docker tag impress:${{ github.sha }} numerique-gouv/impress:latest
|
||||||
fi
|
fi
|
||||||
docker images | grep -E "^numerique-gouv/publish\s*(${DOCKER_TAG}.*|latest|main)"
|
docker images | grep -E "^numerique-gouv/impress\s*(${DOCKER_TAG}.*|latest|main)"
|
||||||
- name: Publish images
|
- name: impress images
|
||||||
run: |
|
run: |
|
||||||
DOCKER_TAG=$([[ -z "${{ github.event.ref }}" ]] && echo "${{ github.event.ref }}" || echo "${{ github.event.ref }}" | sed 's/^v//')
|
DOCKER_TAG=$([[ -z "${{ github.event.ref }}" ]] && echo "${{ github.event.ref }}" || echo "${{ github.event.ref }}" | sed 's/^v//')
|
||||||
RELEASE_TYPE=$([[ -z "${{ github.event.ref }}" ]] && echo "branch" || echo "tag ")
|
RELEASE_TYPE=$([[ -z "${{ github.event.ref }}" ]] && echo "branch" || echo "tag ")
|
||||||
echo "DOCKER_TAG: ${DOCKER_TAG} (Git ${RELEASE_TYPE}${{ github.event.ref }})"
|
echo "DOCKER_TAG: ${DOCKER_TAG} (Git ${RELEASE_TYPE}${{ github.event.ref }})"
|
||||||
docker push numerique-gouv/publish:${DOCKER_TAG}
|
docker push numerique-gouv/impress:${DOCKER_TAG}
|
||||||
if [[ -n "${{ github.event.ref }}" ]]; then
|
if [[ -n "${{ github.event.ref }}" ]]; then
|
||||||
docker push numerique-gouv/publish:latest
|
docker push numerique-gouv/impress:latest
|
||||||
fi
|
fi
|
||||||
26
Dockerfile
26
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
# Django publish
|
# Django impress
|
||||||
|
|
||||||
# ---- base image to inherit from ----
|
# ---- base image to inherit from ----
|
||||||
FROM python:3.10-slim-bookworm as base
|
FROM python:3.10-slim-bookworm as base
|
||||||
@@ -38,7 +38,7 @@ RUN yarn install --frozen-lockfile && \
|
|||||||
|
|
||||||
# ---- static link collector ----
|
# ---- static link collector ----
|
||||||
FROM base as link-collector
|
FROM base as link-collector
|
||||||
ARG publish_STATIC_ROOT=/data/static
|
ARG IMPRESS_STATIC_ROOT=/data/static
|
||||||
|
|
||||||
# Install rdfind
|
# Install rdfind
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
@@ -49,7 +49,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 publish application (see .dockerignore)
|
# Copy impress application (see .dockerignore)
|
||||||
COPY ./src/backend /app/
|
COPY ./src/backend /app/
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -60,7 +60,7 @@ RUN DJANGO_CONFIGURATION=Build \
|
|||||||
|
|
||||||
# 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 ${publish_STATIC_ROOT}
|
RUN rdfind -makesymlinks true -followsymlinks true -makeresultsfile false ${IMPRESS_STATIC_ROOT}
|
||||||
|
|
||||||
# ---- Core application image ----
|
# ---- Core application image ----
|
||||||
FROM base as core
|
FROM base as core
|
||||||
@@ -78,7 +78,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 publish application (see .dockerignore)
|
# Copy impress application (see .dockerignore)
|
||||||
COPY ./src/backend /app/
|
COPY ./src/backend /app/
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -99,9 +99,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 publish and re-install it in editable mode along with development
|
# Uninstall impress and re-install it in editable mode along with development
|
||||||
# dependencies
|
# dependencies
|
||||||
RUN pip uninstall -y publish
|
RUN pip uninstall -y impress
|
||||||
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
|
||||||
@@ -119,21 +119,21 @@ CMD python manage.py runserver 0.0.0.0:8000
|
|||||||
# ---- Production image ----
|
# ---- Production image ----
|
||||||
FROM core as production
|
FROM core as production
|
||||||
|
|
||||||
ARG publish_STATIC_ROOT=/data/static
|
ARG IMPRESS_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/publish.py /usr/local/etc/gunicorn/publish.py
|
COPY docker/files/usr/local/etc/gunicorn/impress.py /usr/local/etc/gunicorn/impress.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 ${publish_STATIC_ROOT} ${publish_STATIC_ROOT}
|
COPY --from=link-collector ${IMPRESS_STATIC_ROOT} ${IMPRESS_STATIC_ROOT}
|
||||||
|
|
||||||
# Copy publish mails
|
# Copy impress 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 publish's main module
|
# The default command runs gunicorn WSGI server in impress's main module
|
||||||
CMD gunicorn -c /usr/local/etc/gunicorn/publish.py publish.wsgi:application
|
CMD gunicorn -c /usr/local/etc/gunicorn/impress.py impress.wsgi:application
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -154,14 +154,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 publish project.
|
makemigrations: ## run django makemigrations for the impress 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 publish project.
|
migrate: ## run django migrations for the impress project.
|
||||||
@echo "$(BOLD)Running migrations$(RESET)"
|
@echo "$(BOLD)Running migrations$(RESET)"
|
||||||
@$(COMPOSE) up -d postgresql
|
@$(COMPOSE) up -d postgresql
|
||||||
@$(WAIT_DB)
|
@$(WAIT_DB)
|
||||||
@@ -276,7 +276,7 @@ clean: ## restore repository state as it was freshly cloned
|
|||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "$(BOLD)publish Makefile"
|
@echo "$(BOLD)impress 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
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# Publish
|
# Impress
|
||||||
|
|
||||||
publish is an application to handle users and templates.
|
Impress prints your markdown to pdf from predefined templates with user and role based access rights.
|
||||||
|
|
||||||
publish is built on top of [Django Rest
|
Impress is built on top of [Django Rest
|
||||||
Framework](https://www.django-rest-framework.org/).
|
Framework](https://www.django-rest-framework.org/) and [Next.js](https://nextjs.org/).
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
|
|||||||
@@ -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="publish"
|
COMPOSE_PROJECT="impress"
|
||||||
|
|
||||||
|
|
||||||
# _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
|
||||||
|
|||||||
@@ -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 'publish.api_urls' \
|
--urlconf 'impress.api_urls' \
|
||||||
--format openapi-json \
|
--format openapi-json \
|
||||||
--file /app/core/tests/swagger/swagger.json
|
--file /app/core/tests/swagger/swagger.json
|
||||||
|
|||||||
@@ -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: publish:development
|
image: impress:development
|
||||||
environment:
|
environment:
|
||||||
- PYLINTHOME=/app/.pylint.d
|
- PYLINTHOME=/app/.pylint.d
|
||||||
- DJANGO_CONFIGURATION=Development
|
- DJANGO_CONFIGURATION=Development
|
||||||
@@ -43,8 +43,8 @@ services:
|
|||||||
|
|
||||||
celery-dev:
|
celery-dev:
|
||||||
user: ${DOCKER_USER:-1000}
|
user: ${DOCKER_USER:-1000}
|
||||||
image: publish:development
|
image: impress:development
|
||||||
command: ["celery", "-A", "publish.celery_app", "worker", "-l", "DEBUG"]
|
command: ["celery", "-A", "impress.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: publish:production
|
image: impress:production
|
||||||
environment:
|
environment:
|
||||||
- DJANGO_CONFIGURATION=Demo
|
- DJANGO_CONFIGURATION=Demo
|
||||||
env_file:
|
env_file:
|
||||||
@@ -78,8 +78,8 @@ services:
|
|||||||
|
|
||||||
celery:
|
celery:
|
||||||
user: ${DOCKER_USER:-1000}
|
user: ${DOCKER_USER:-1000}
|
||||||
image: publish:production
|
image: impress:production
|
||||||
command: ["celery", "-A", "publish.celery_app", "worker", "-l", "INFO"]
|
command: ["celery", "-A", "impress.celery_app", "worker", "-l", "INFO"]
|
||||||
environment:
|
environment:
|
||||||
- DJANGO_CONFIGURATION=Demo
|
- DJANGO_CONFIGURATION=Demo
|
||||||
env_file:
|
env_file:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#
|
#
|
||||||
# To pass environment variables, you can either use the -e option of the docker run command:
|
# To pass environment variables, you can either use the -e option of the docker run command:
|
||||||
#
|
#
|
||||||
# docker run --rm -e USER_NAME=foo -e HOME='/home/foo' publish:latest python manage.py migrate
|
# docker run --rm -e USER_NAME=foo -e HOME='/home/foo' impress:latest python manage.py migrate
|
||||||
#
|
#
|
||||||
# or define new variables in an environment file to use with docker or docker compose:
|
# or define new variables in an environment file to use with docker or docker compose:
|
||||||
#
|
#
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
# USER_NAME=foo
|
# USER_NAME=foo
|
||||||
# HOME=/home/foo
|
# HOME=/home/foo
|
||||||
#
|
#
|
||||||
# docker run --rm --env-file env.d/production publish:latest python manage.py migrate
|
# docker run --rm --env-file env.d/production impress:latest python manage.py migrate
|
||||||
#
|
#
|
||||||
|
|
||||||
echo "🐳(entrypoint) creating user running in the container..."
|
echo "🐳(entrypoint) creating user running in the container..."
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Gunicorn-django settings
|
# Gunicorn-django settings
|
||||||
bind = ["0.0.0.0:8000"]
|
bind = ["0.0.0.0:8000"]
|
||||||
name = "publish"
|
name = "impress"
|
||||||
python_path = "/app"
|
python_path = "/app"
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
# Api client TypeScript
|
# Api client TypeScript
|
||||||
|
|
||||||
The backend application can automatically create a TypeScript client to be used in frontend
|
The backend application can automatically create a TypeScript client to be used in frontend
|
||||||
applications. It is used in the publish front application itself.
|
applications. It is used in the impress front application itself.
|
||||||
|
|
||||||
This client is made with [openapi-typescript-codegen](https://github.com/ferdikoomen/openapi-typescript-codegen)
|
This client is made with [openapi-typescript-codegen](https://github.com/ferdikoomen/openapi-typescript-codegen)
|
||||||
and publish's backend OpenAPI schema (available [here](http://localhost:8071/v1.0/swagger/) if you have the backend running).
|
and impress's backend OpenAPI schema (available [here](http://localhost:8071/v1.0/swagger/) if you have the backend running).
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
# Django
|
# Django
|
||||||
DJANGO_ALLOWED_HOSTS=*
|
DJANGO_ALLOWED_HOSTS=*
|
||||||
DJANGO_SECRET_KEY=ThisIsAnExampleKeyForDevPurposeOnly
|
DJANGO_SECRET_KEY=ThisIsAnExampleKeyForDevPurposeOnly
|
||||||
DJANGO_SETTINGS_MODULE=publish.settings
|
DJANGO_SETTINGS_MODULE=impress.settings
|
||||||
DJANGO_SUPERUSER_PASSWORD=admin
|
DJANGO_SUPERUSER_PASSWORD=admin
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
PYTHONPATH=/app
|
PYTHONPATH=/app
|
||||||
|
|
||||||
# publish settings
|
# impress settings
|
||||||
|
|
||||||
# Mail
|
# Mail
|
||||||
DJANGO_EMAIL_HOST="mailcatcher"
|
DJANGO_EMAIL_HOST="mailcatcher"
|
||||||
DJANGO_EMAIL_PORT=1025
|
DJANGO_EMAIL_PORT=1025
|
||||||
|
|
||||||
# Backend url
|
# Backend url
|
||||||
publish_BASE_URL="http://localhost:8072"
|
IMPRESS_BASE_URL="http://localhost:8072"
|
||||||
|
|
||||||
# OIDC
|
# OIDC
|
||||||
OIDC_OP_JWKS_ENDPOINT=http://nginx:8083/realms/impress/protocol/openid-connect/certs
|
OIDC_OP_JWKS_ENDPOINT=http://nginx:8083/realms/impress/protocol/openid-connect/certs
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
# Postgresql db container configuration
|
# Postgresql db container configuration
|
||||||
POSTGRES_DB=publish
|
POSTGRES_DB=impress
|
||||||
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=publish
|
DB_NAME=impress
|
||||||
DB_USER=dinum
|
DB_USER=dinum
|
||||||
DB_PASSWORD=pass
|
DB_PASSWORD=pass
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
include LICENSE
|
include LICENSE
|
||||||
include README.md
|
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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""publish core API endpoints"""
|
"""Impress 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
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""Permission handlers for the publish core app."""
|
"""Permission handlers for the impress core app."""
|
||||||
from django.core import exceptions
|
from django.core import exceptions
|
||||||
|
|
||||||
from rest_framework import permissions
|
from rest_framework import permissions
|
||||||
|
|||||||
@@ -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.db.models import Q
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
"""publish Core application"""
|
"""Impress 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 publish core app."""
|
# """Configuration class for the impress core app."""
|
||||||
|
|
||||||
# name = "core"
|
# name = "core"
|
||||||
# app_label = "core"
|
# app_label = "core"
|
||||||
# verbose_name = _("publish core application")
|
# verbose_name = _("impress core application")
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class Migration(migrations.Migration):
|
|||||||
options={
|
options={
|
||||||
'verbose_name': 'Template',
|
'verbose_name': 'Template',
|
||||||
'verbose_name_plural': 'Templates',
|
'verbose_name_plural': 'Templates',
|
||||||
'db_table': 'publish_template',
|
'db_table': 'impress_template',
|
||||||
'ordering': ('title',),
|
'ordering': ('title',),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -60,7 +60,7 @@ class Migration(migrations.Migration):
|
|||||||
options={
|
options={
|
||||||
'verbose_name': 'user',
|
'verbose_name': 'user',
|
||||||
'verbose_name_plural': 'users',
|
'verbose_name_plural': 'users',
|
||||||
'db_table': 'publish_user',
|
'db_table': 'impress_user',
|
||||||
},
|
},
|
||||||
managers=[
|
managers=[
|
||||||
('objects', django.contrib.auth.models.UserManager()),
|
('objects', django.contrib.auth.models.UserManager()),
|
||||||
@@ -80,7 +80,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': 'publish_template_access',
|
'db_table': 'impress_template_access',
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
migrations.AddConstraint(
|
migrations.AddConstraint(
|
||||||
|
|||||||
@@ -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 textwrap
|
||||||
import uuid
|
import uuid
|
||||||
@@ -134,7 +134,7 @@ class User(AbstractBaseUser, BaseModel, auth_models.PermissionsMixin):
|
|||||||
REQUIRED_FIELDS = []
|
REQUIRED_FIELDS = []
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = "publish_user"
|
db_table = "impress_user"
|
||||||
verbose_name = _("user")
|
verbose_name = _("user")
|
||||||
verbose_name_plural = _("users")
|
verbose_name_plural = _("users")
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ class Template(BaseModel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = "publish_template"
|
db_table = "impress_template"
|
||||||
ordering = ("title",)
|
ordering = ("title",)
|
||||||
verbose_name = _("Template")
|
verbose_name = _("Template")
|
||||||
verbose_name_plural = _("Templates")
|
verbose_name_plural = _("Templates")
|
||||||
@@ -252,7 +252,7 @@ class TemplateAccess(BaseModel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = "publish_template_access"
|
db_table = "impress_template_access"
|
||||||
verbose_name = _("Template/user relation")
|
verbose_name = _("Template/user relation")
|
||||||
verbose_name_plural = _("Template/user relations")
|
verbose_name_plural = _("Template/user relations")
|
||||||
constraints = [
|
constraints = [
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""Fixtures for tests in the publish core application"""
|
"""Fixtures for tests in the impress core application"""
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|||||||
@@ -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
|
import pytest
|
||||||
from rest_framework.test import APIClient
|
from rest_framework.test import APIClient
|
||||||
|
|||||||
@@ -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
|
import random
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
Test users API endpoints in the publish core app.
|
Test users API endpoints in the impress core app.
|
||||||
"""
|
"""
|
||||||
import pytest
|
import pytest
|
||||||
from rest_framework.test import APIClient
|
from rest_framework.test import APIClient
|
||||||
|
|||||||
@@ -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
|
from unittest import mock
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
import pytest
|
||||||
from rest_framework.test import APIClient
|
from rest_framework.test import APIClient
|
||||||
|
|||||||
@@ -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
|
import random
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
import random
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
Test users API endpoints in the publish core app.
|
Test users API endpoints in the impress core app.
|
||||||
"""
|
"""
|
||||||
import pytest
|
import pytest
|
||||||
from rest_framework.test import APIClient
|
from rest_framework.test import APIClient
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
"""publish celery configuration file."""
|
"""Impress 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", "publish.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "impress.settings")
|
||||||
os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
|
os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
|
||||||
|
|
||||||
install(check_options=True)
|
install(check_options=True)
|
||||||
|
|
||||||
app = Celery("publish")
|
app = Celery("impress")
|
||||||
|
|
||||||
# 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.
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
Django settings for publish project.
|
Django settings for impress 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 = "publish.urls"
|
ROOT_URLCONF = "impress.urls"
|
||||||
WSGI_APPLICATION = "publish.wsgi.application"
|
WSGI_APPLICATION = "impress.wsgi.application"
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
@@ -84,7 +84,7 @@ class Base(Configuration):
|
|||||||
environ_prefix=None,
|
environ_prefix=None,
|
||||||
),
|
),
|
||||||
"NAME": values.Value(
|
"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),
|
"USER": values.Value("dinum", environ_name="DB_USER", environ_prefix=None),
|
||||||
"PASSWORD": values.Value(
|
"PASSWORD": values.Value(
|
||||||
@@ -186,7 +186,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 = [
|
||||||
# publish
|
# impress
|
||||||
"core",
|
"core",
|
||||||
"demo",
|
"demo",
|
||||||
"drf_spectacular",
|
"drf_spectacular",
|
||||||
@@ -231,8 +231,8 @@ class Base(Configuration):
|
|||||||
}
|
}
|
||||||
|
|
||||||
SPECTACULAR_SETTINGS = {
|
SPECTACULAR_SETTINGS = {
|
||||||
"TITLE": "publish API",
|
"TITLE": "Impress API",
|
||||||
"DESCRIPTION": "This is the publish API schema.",
|
"DESCRIPTION": "This is the impress 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(
|
||||||
@@ -415,7 +415,7 @@ class Development(Base):
|
|||||||
CSRF_TRUSTED_ORIGINS = ["http://localhost:8072"]
|
CSRF_TRUSTED_ORIGINS = ["http://localhost:8072"]
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
SESSION_COOKIE_NAME = "publish_sessionid"
|
SESSION_COOKIE_NAME = "impress_sessionid"
|
||||||
|
|
||||||
USE_SWAGGER = True
|
USE_SWAGGER = True
|
||||||
|
|
||||||
@@ -437,7 +437,7 @@ class Test(Base):
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
"loggers": {
|
"loggers": {
|
||||||
"publish": {
|
"impress": {
|
||||||
"handlers": ["console"],
|
"handlers": ["console"],
|
||||||
"level": "DEBUG",
|
"level": "DEBUG",
|
||||||
},
|
},
|
||||||
@@ -528,7 +528,7 @@ class Production(Base):
|
|||||||
AWS_S3_ENDPOINT_URL = values.Value()
|
AWS_S3_ENDPOINT_URL = values.Value()
|
||||||
AWS_S3_ACCESS_KEY_ID = values.Value()
|
AWS_S3_ACCESS_KEY_ID = values.Value()
|
||||||
AWS_S3_SECRET_ACCESS_KEY = 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()
|
AWS_S3_REGION_NAME = values.Value()
|
||||||
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
"""URL configuration for the publish project"""
|
"""URL configuration for the impress 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
|
||||||
@@ -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``.
|
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", "publish.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "impress.settings")
|
||||||
os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
|
os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
|
||||||
|
|
||||||
application = get_wsgi_application()
|
application = get_wsgi_application()
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
"""
|
"""
|
||||||
publish's sandbox management script.
|
impress's sandbox management script.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if __name__ == "__main__":
|
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")
|
os.environ.setdefault("DJANGO_CONFIGURATION", "Development")
|
||||||
|
|
||||||
from configurations.management import execute_from_command_line
|
from configurations.management import execute_from_command_line
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
#
|
#
|
||||||
# publish package
|
# impress package
|
||||||
#
|
#
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools"]
|
requires = ["setuptools"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "publish"
|
name = "impress"
|
||||||
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 = [
|
||||||
@@ -56,10 +56,10 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
"Bug Tracker" = "https://github.com/numerique-gouv/publish/issues/new"
|
"Bug Tracker" = "https://github.com/numerique-gouv/impress/issues/new"
|
||||||
"Changelog" = "https://github.com/numerique-gouv/publish/blob/main/CHANGELOG.md"
|
"Changelog" = "https://github.com/numerique-gouv/impress/blob/main/CHANGELOG.md"
|
||||||
"Homepage" = "https://github.com/numerique-gouv/publish"
|
"Homepage" = "https://github.com/numerique-gouv/impress"
|
||||||
"Repository" = "https://github.com/numerique-gouv/publish"
|
"Repository" = "https://github.com/numerique-gouv/impress"
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
dev = [
|
dev = [
|
||||||
@@ -119,8 +119,8 @@ select = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[tool.ruff.lint.isort]
|
[tool.ruff.lint.isort]
|
||||||
section-order = ["future","standard-library","django","third-party","publish","first-party","local-folder"]
|
section-order = ["future","standard-library","django","third-party","impress","first-party","local-folder"]
|
||||||
sections = { publish=["core"], django=["django"] }
|
sections = { impress=["core"], django=["django"] }
|
||||||
|
|
||||||
[tool.ruff.per-file-ignores]
|
[tool.ruff.per-file-ignores]
|
||||||
"**/tests/*" = ["S", "SLF"]
|
"**/tests/*" = ["S", "SLF"]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/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
|
# coding: utf-8
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<mj-wrapper css-class="wrapper" padding="20px 40px 40px 40px">
|
<mj-wrapper css-class="wrapper" padding="20px 40px 40px 40px">
|
||||||
<mj-section>
|
<mj-section>
|
||||||
<mj-column>
|
<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-column>
|
||||||
</mj-section>
|
</mj-section>
|
||||||
<mj-section mj-class="bg--blue-100" border-radius="6px 6px 0 0" padding="30px 50px 60px 50px">
|
<mj-section mj-class="bg--blue-100" border-radius="6px 6px 0 0" padding="30px 50px 60px 50px">
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"volta": {
|
"volta": {
|
||||||
"node": "16.15.1"
|
"node": "16.15.1"
|
||||||
},
|
},
|
||||||
"repository": "https://github.com/numerique-gouv/publish",
|
"repository": "https://github.com/numerique-gouv/impress",
|
||||||
"author": "DINUM",
|
"author": "DINUM",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "publish-openapi-client-ts",
|
"name": "impress-openapi-client-ts",
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"private": true,
|
"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": {
|
"scripts": {
|
||||||
"generate:api:client:local": "./scripts/openapi-typescript-codegen/generate_api_client_local.sh $1"
|
"generate:api:client:local": "./scripts/openapi-typescript-codegen/generate_api_client_local.sh $1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/numerique-gouv/publish.git"
|
"url": "git+https://github.com/numerique-gouv/impress.git"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"name": "DINUM",
|
"name": "DINUM",
|
||||||
@@ -16,9 +16,9 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"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": {
|
"devDependencies": {
|
||||||
"openapi-typescript-codegen": "0.25.0"
|
"openapi-typescript-codegen": "0.25.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,4 +5,4 @@
|
|||||||
# OPTIONS:
|
# OPTIONS:
|
||||||
# --output the path folder where types will be generated
|
# --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
|
||||||
|
|||||||
Reference in New Issue
Block a user