Skip to content

Commit 1f50372

Browse files
AntoLCgithub-actions[bot]
authored andcommitted
✏️(project) automatic typo correction
Fix typos in the project.
1 parent 6be87ed commit 1f50372

40 files changed

+248
-248
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ and this project adheres to
537537
- ⚡️(e2e) unique login between tests (#80)
538538
- ⚡️(CI) improve e2e job (#86)
539539
- ♻️(frontend) improve the error and message info ui (#93)
540-
- ✏️(frontend) change all occurences of pad to doc (#99)
540+
- ✏️(frontend) change all occurrences of pad to doc (#99)
541541

542542
## Fixed
543543

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ COPY docker/files/usr/local/etc/gunicorn/impress.py /usr/local/etc/gunicorn/impr
149149
ARG DOCKER_USER
150150
USER ${DOCKER_USER}
151151

152-
# Copy statics
152+
# Copy statistics
153153
COPY --from=link-collector ${IMPRESS_STATIC_ROOT} ${IMPRESS_STATIC_ROOT}
154154

155155
# Copy impress mails

SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Security is very important to us.
66

7-
If you have any issue regarding security, please disclose the information responsibly submiting [this form](https://vdp.numerique.gouv.fr/p/Send-a-report?lang=en) and not by creating an issue on the repository. You can also email us at [email protected]
7+
If you have any issue regarding security, please disclose the information responsibly submitting [this form](https://vdp.numerique.gouv.fr/p/Send-a-report?lang=en) and not by creating an issue on the repository. You can also email us at [email protected]
88

99
We appreciate your effort to make Docs more secure.
1010

docs/env.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ These are the environmental variables you can set for the impress-backend contai
3939
| DJANGO_EMAIL_PORT | port used to connect to email host | |
4040
| DJANGO_EMAIL_USE_TLS | use tls for email host connection | false |
4141
| DJANGO_EMAIL_USE_SSL | use sstl for email host connection | false |
42-
| DJANGO_EMAIL_FROM | email adress used as sender | [email protected] |
42+
| DJANGO_EMAIL_FROM | email address used as sender | [email protected] |
4343
| DJANGO_CORS_ALLOW_ALL_ORIGINS | allow all CORS origins | true |
4444
| DJANGO_CORS_ALLOWED_ORIGINS | list of origins allowed for CORS | [] |
4545
| DJANGO_CORS_ALLOWED_ORIGIN_REGEXES | list of origins allowed for CORS using regulair expressions | [] |
@@ -62,11 +62,11 @@ These are the environmental variables you can set for the impress-backend contai
6262
| OIDC_RP_CLIENT_ID | client id used for OIDC | impress |
6363
| OIDC_RP_CLIENT_SECRET | client secret used for OIDC | |
6464
| OIDC_OP_JWKS_ENDPOINT | JWKS endpoint for OIDC | |
65-
| OIDC_OP_AUTHORIZATION_ENDPOINT | Autorization endpoint for OIDC | |
65+
| OIDC_OP_AUTHORIZATION_ENDPOINT | Authorization endpoint for OIDC | |
6666
| OIDC_OP_TOKEN_ENDPOINT | Token endpoint for OIDC | |
6767
| OIDC_OP_USER_ENDPOINT | User endpoint for OIDC | |
6868
| OIDC_OP_LOGOUT_ENDPOINT | Logout endpoint for OIDC | |
69-
| OIDC_AUTH_REQUEST_EXTRA_PARAMS | OIDC extra auth paramaters | {} |
69+
| OIDC_AUTH_REQUEST_EXTRA_PARAMS | OIDC extra auth parameters | {} |
7070
| OIDC_RP_SCOPES | scopes requested for OIDC | openid email |
7171
| LOGIN_REDIRECT_URL | login redirect url | |
7272
| LOGIN_REDIRECT_URL_FAILURE | login redirect url on failure | |
@@ -76,7 +76,7 @@ These are the environmental variables you can set for the impress-backend contai
7676
| OIDC_REDIRECT_ALLOWED_HOSTS | Allowed hosts for OIDC redirect url | [] |
7777
| OIDC_STORE_ID_TOKEN | Store OIDC token | true |
7878
| OIDC_FALLBACK_TO_EMAIL_FOR_IDENTIFICATION | faillback to email for identification | true |
79-
| OIDC_ALLOW_DUPLICATE_EMAILS | Allow dupplicate emails | false |
79+
| OIDC_ALLOW_DUPLICATE_EMAILS | Allow duplicate emails | false |
8080
| USER_OIDC_ESSENTIAL_CLAIMS | essential claims in OIDC token | [] |
8181
| OIDC_USERINFO_FULLNAME_FIELDS | OIDC token claims to create full name | ["first_name", "last_name"] |
8282
| OIDC_USERINFO_SHORTNAME_FIELD | OIDC token claims to create shortname | first_name |

docs/examples/impress.values.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ backend:
8282
python manage.py createsuperuser --email [email protected] --password admin
8383
restartPolicy: Never
8484

85-
# Exra volume to manage our local custom CA and avoid to set ssl_verify: false
85+
# Extra volume to manage our local custom CA and avoid to set ssl_verify: false
8686
extraVolumeMounts:
8787
- name: certs
8888
mountPath: /usr/local/lib/python3.12/site-packages/certifi/cacert.pem
8989
subPath: cacert.pem
9090

91-
# Exra volume to manage our local custom CA and avoid to set ssl_verify: false
91+
# Extra volume to manage our local custom CA and avoid to set ssl_verify: false
9292
extraVolumes:
9393
- name: certs
9494
configMap:

docs/installation.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ OIDC_RP_SCOPES: "openid email"
133133
134134
You can find these values in **examples/keycloak.values.yaml**
135135
136-
### Find redis server connexion values
136+
### Find redis server connection values
137137
138138
Docs needs a redis so we start by deploying one:
139139
@@ -146,7 +146,7 @@ keycloak-postgresql-0 1/1 Running 0 26m
146146
redis-master-0 1/1 Running 0 35s
147147
```
148148

149-
### Find postgresql connexion values
149+
### Find postgresql connection values
150150

151151
Docs uses a postgresql database as backend, so if you have a provider, obtain the necessary information to use it. If you don't, you can install a postgresql testing environment as follow:
152152

@@ -173,7 +173,7 @@ POSTGRES_USER: dinum
173173
POSTGRES_PASSWORD: pass
174174
```
175175
176-
### Find s3 bucket connexion values
176+
### Find s3 bucket connection values
177177
178178
Docs uses an s3 bucket to store documents, so if you have a provider obtain the necessary information to use it. If you don't, you can install a local minio testing environment as follow:
179179
@@ -191,7 +191,7 @@ redis-master-0 1/1 Running 0 10m
191191

192192
## Deployment
193193

194-
Now you are ready to deploy Docs without AI. AI requires more dependencies (OpenAI API). To deploy Docs you need to provide all previous informations to the helm chart.
194+
Now you are ready to deploy Docs without AI. AI requires more dependencies (OpenAI API). To deploy Docs you need to provide all previous information to the helm chart.
195195

196196
```
197197
$ helm repo add impress https://suitenumerique.github.io/docs/

src/backend/core/api/viewsets.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def list(self, request, *args, **kwargs):
576576
queryset, filter_data["is_favorite"]
577577
)
578578

579-
# Apply ordering only now that everyting is filtered and annotated
579+
# Apply ordering only now that everything is filtered and annotated
580580
queryset = filters.OrderingFilter().filter_queryset(
581581
self.request, queryset, self
582582
)
@@ -858,8 +858,8 @@ def tree(self, request, pk, *args, **kwargs):
858858
"""
859859
try:
860860
current_document = self.queryset.only("depth", "path").get(pk=pk)
861-
except models.Document.DoesNotExist as excpt:
862-
raise drf.exceptions.NotFound from excpt
861+
except models.Document.DoesNotExist as except:
862+
raise drf.exceptions.NotFound from except
863863

864864
ancestors = (
865865
(current_document.get_ancestors() | self.queryset.filter(pk=pk))
@@ -889,7 +889,7 @@ def tree(self, request, pk, *args, **kwargs):
889889
)
890890

891891
# Compute cache for ancestors links to avoid many queries while computing
892-
# abilties for his documents in the tree!
892+
# abilities for his documents in the tree!
893893
ancestors_links.append(
894894
{"link_reach": ancestor.link_reach, "link_role": ancestor.link_role}
895895
)

src/backend/core/migrations/0018_update_blank_title.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
def update_titles_to_null(apps, schema_editor):
55
"""
6-
If the titles are "Untitled document" or "Unbenanntes Dokument" or "Document sans titre"
6+
If the titles are "Untitled document" or "Unbenanntes Document" or "Document sans titre"
77
we set them to Null
88
"""
99
Document = apps.get_model("core", "Document")
1010
Document.objects.filter(
11-
title__in=["Untitled document", "Unbenanntes Dokument", "Document sans titre"]
11+
title__in=["Untitled document", "Unbenanntes Document", "Document sans titre"]
1212
).update(title=None)
1313

1414

src/backend/core/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,9 @@ def save(self, *args, **kwargs):
544544
response = default_storage.connection.meta.client.head_object(
545545
Bucket=default_storage.bucket_name, Key=file_key
546546
)
547-
except ClientError as excpt:
547+
except ClientError as except:
548548
# If the error is a 404, the object doesn't exist, so we should create it.
549-
if excpt.response["Error"]["Code"] == "404":
549+
if except.response["Error"]["Code"] == "404":
550550
has_changed = True
551551
else:
552552
raise

src/backend/core/services/ai_services.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
}
4545

4646
AI_TRANSLATE = (
47-
"Keep the same html stucture and formatting. "
47+
"Keep the same html structure and formatting. "
4848
"Translate the content in the html to the specified language {language:s}. "
4949
"Check the translation for accuracy and make any necessary corrections. "
5050
"Do not provide any other information."

src/backend/core/services/collaboration_services.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self):
1717
def reset_connections(self, room, user_id=None):
1818
"""
1919
Reset connections of a room in the collaboration server.
20-
Reseting a connection means that the user will be disconnected and will
20+
Resetting a connection means that the user will be disconnected and will
2121
have to reconnect to the collaboration server, with updated rights.
2222
"""
2323
endpoint = "reset-connections"

src/backend/core/tests/documents/test_api_document_invitations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def test_api_document_invitations_create_cannot_invite_existing_users():
575575
document = factories.DocumentFactory(users=[(user, "owner")])
576576
existing_user = factories.UserFactory()
577577

578-
# Build an invitation to the email of an exising identity in the db
578+
# Build an invitation to the email of an existing identity in the db
579579
invitation_values = {
580580
"email": existing_user.email,
581581
"role": random.choice(models.RoleChoices.values),

src/backend/core/tests/documents/test_api_documents_ai_transform.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_api_documents_ai_transform_authenticated_forbidden(reach, role):
150150
@patch("openai.resources.chat.completions.Completions.create")
151151
def test_api_documents_ai_transform_authenticated_success(mock_create, reach, role):
152152
"""
153-
Autenticated who are not related to a document should be able to request AI transform
153+
Authenticated who are not related to a document should be able to request AI transform
154154
if the link reach and role permit it.
155155
"""
156156
user = factories.UserFactory()

src/backend/core/tests/documents/test_api_documents_ai_translate.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_api_documents_ai_translate_anonymous_success(mock_create):
9999
{
100100
"role": "system",
101101
"content": (
102-
"Keep the same html stucture and formatting. "
102+
"Keep the same html structure and formatting. "
103103
"Translate the content in the html to the specified language Spanish. "
104104
"Check the translation for accuracy and make any necessary corrections. "
105105
"Do not provide any other information."
@@ -172,7 +172,7 @@ def test_api_documents_ai_translate_authenticated_forbidden(reach, role):
172172
@patch("openai.resources.chat.completions.Completions.create")
173173
def test_api_documents_ai_translate_authenticated_success(mock_create, reach, role):
174174
"""
175-
Autenticated who are not related to a document should be able to request AI translate
175+
Authenticated who are not related to a document should be able to request AI translate
176176
if the link reach and role permit it.
177177
"""
178178
user = factories.UserFactory()
@@ -197,7 +197,7 @@ def test_api_documents_ai_translate_authenticated_success(mock_create, reach, ro
197197
{
198198
"role": "system",
199199
"content": (
200-
"Keep the same html stucture and formatting. "
200+
"Keep the same html structure and formatting. "
201201
"Translate the content in the html to the "
202202
"specified language Colombian Spanish. "
203203
"Check the translation for accuracy and make any necessary corrections. "
@@ -274,7 +274,7 @@ def test_api_documents_ai_translate_success(mock_create, via, role, mock_user_te
274274
{
275275
"role": "system",
276276
"content": (
277-
"Keep the same html stucture and formatting. "
277+
"Keep the same html structure and formatting. "
278278
"Translate the content in the html to the "
279279
"specified language Colombian Spanish. "
280280
"Check the translation for accuracy and make any necessary corrections. "

src/backend/core/tests/documents/test_api_documents_attachment_upload.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_api_documents_attachment_upload_authenticated_forbidden(reach, role):
127127
)
128128
def test_api_documents_attachment_upload_authenticated_success(reach, role):
129129
"""
130-
Autenticated users who are not related to a document should be able to upload
130+
Authenticated users who are not related to a document should be able to upload
131131
a file when the link reach and role permit it.
132132
"""
133133
user = factories.UserFactory()
@@ -255,7 +255,7 @@ def test_api_documents_attachment_upload_invalid(client):
255255

256256

257257
def test_api_documents_attachment_upload_size_limit_exceeded(settings):
258-
"""The uploaded file should not exceeed the maximum size in settings."""
258+
"""The uploaded file should not exceed the maximum size in settings."""
259259
settings.DOCUMENT_IMAGE_MAX_SIZE = 1048576 # 1 MB for test
260260

261261
user = factories.UserFactory()

src/backend/core/tests/documents/test_api_documents_create_for_owner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def test_api_documents_create_for_owner_existing_user_email_no_sub_with_fallback
279279
"""
280280
It should be possible to create a document on behalf of a pre-existing user for
281281
who the sub was not found if the settings allow it. This edge case should not
282-
happen in a healthy OIDC federation but can be usefull if an OIDC provider modifies
282+
happen in a healthy OIDC federation but can be useful if an OIDC provider modifies
283283
users sub on each login for example...
284284
"""
285285
user = factories.UserFactory(language="en-us")

src/backend/core/tests/documents/test_api_documents_move.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def test_api_documents_move_authenticated_deleted_target_as_child(position):
310310
def test_api_documents_move_authenticated_deleted_target_as_sibling(position):
311311
"""
312312
It should not be possible to move a document as a sibling of a deleted target document
313-
if the user has no rigths on its parent.
313+
if the user has no rights on its parent.
314314
"""
315315
user = factories.UserFactory()
316316
client = APIClient()

src/backend/core/tests/migrations/test_migrations_0018_update_blank_title.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
def test_update_blank_title_migration(migrator):
88
"""
99
Test that the migration fixes the titles of documents that are
10-
"Untitled document", "Unbenanntes Dokument" or "Document sans titre"
10+
"Untitled document", "Unbenanntes Document" or "Document sans titre"
1111
"""
1212
old_state = migrator.apply_initial_migration(
1313
("core", "0017_add_fields_for_soft_delete")
@@ -18,7 +18,7 @@ def test_update_blank_title_migration(migrator):
1818
title="Untitled document", depth=1, path="0000001"
1919
)
2020
old_german_doc = OldDocument.objects.create(
21-
title="Unbenanntes Dokument", depth=1, path="0000002"
21+
title="Unbenanntes Document", depth=1, path="0000002"
2222
)
2323
old_french_doc = OldDocument.objects.create(
2424
title="Document sans titre", depth=1, path="0000003"
@@ -28,7 +28,7 @@ def test_update_blank_title_migration(migrator):
2828
)
2929

3030
assert old_english_doc.title == "Untitled document"
31-
assert old_german_doc.title == "Unbenanntes Dokument"
31+
assert old_german_doc.title == "Unbenanntes Document"
3232
assert old_french_doc.title == "Document sans titre"
3333
assert old_other_doc.title == "My document"
3434

0 commit comments

Comments
 (0)