Skip to content

Commit

Permalink
Merge branch 'main' 1.2.19dev into production
Browse files Browse the repository at this point in the history
  • Loading branch information
LoanR committed Feb 5, 2025
2 parents 9767efb + 4392840 commit 12715d1
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.3.4'
rev: 'v0.9.4'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: fix-byte-order-marker
- id: trailing-whitespace
Expand All @@ -16,7 +16,7 @@ repos:
exclude: "\\.svg$|\\.map$|\\.min\\.css$|\\.min\\.js$|\\.po$|\\.pot$"
- id: check-toml
- repo: https://github.com/pycqa/isort
rev: "5.13.2"
rev: "6.0.0"
hooks:
- id: isort
name: isort (python)
Expand Down
5 changes: 3 additions & 2 deletions documentation/maintainers/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ La branche de référence pour les releases est `production`. C'est ici qu'on re

Pour publier une nouvelle version :
- S'assurer d'être sur la branche `production`
- Faire un merge de `main` dans `production` pour récupérer les dernières modifications. `main` devrait être dans une version de dev et supérieure à `production`. Ce merge devrait créer un conflit.
- Faire un merge de `main` dans `production` pour récupérer les dernières modifications. `main` devrait être dans une version de dev et supérieure à `production`. Ce merge devrait créer deux conflits sur `pyproject.toml` et `web/b3desk/__init__.py`.
- Résoudre ce conflit en mettant à jour le numéro de version dans `pyproject.toml` et dans `web/b3desk/__init__.py` simplement en enlevant `dev` de la version.
- Nommer ce commit de merge "Merge branch 'main' W.X.Ydev into production"
- Mettre un tag sur ce commit, portant le numéro de la version, avec `git tag -a vW.X.Y -m "Bump to W.X.Y version`
- Pousser le commit ET le tag `git push upstream production --follow-tags` (et sur le fork si besoin)
- Se rendre sur [la page github de publication de version](https://github.com/numerique-gouv/b3desk/releases/new)
- Choisir le tag récemment ajouté, remplir les informations, publier la version.
- Repasser sur `main` pour passer cette branche sur la prochaine version dev `W.X.Zdev`.
- Repasser sur `main` pour passer cette branche sur la prochaine version dev `W.X.Zdev` dans les fichiers `pyproject.toml` et `web/b3desk/__init__.py`.
- Nommer ce commit "Update main to W.X.Zdev version".
- Pousser ce commit sur upstream et/ou sur le fork.

Attention, pour que le numéro de version s'affiche correctement sur la version déployée, il est nécessaire que le projet soit déployé avec git (c.à.d. qu'il y ait un dépôt git qui soit déployé), et aussi que le commit qui soit déployé soit directement marqué par un tag git. Dans les autres cas, c'est le numéro de commit qui sera affiché.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "b3desk"
version = "1.2.18"
version = "1.2.19"
description = "Outil de visioconférence pour les agents de l'Education Nationale et de l'Etat en général."
authors = ["Your Name <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion web/b3desk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from .utils import enum_converter
from .utils import model_converter

__version__ = "1.2.18"
__version__ = "1.2.19"

LANGUAGES = ["en", "fr"]

Expand Down
2 changes: 1 addition & 1 deletion web/b3desk/endpoints/meeting_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def add_meeting_files(meeting: Meeting, owner: User):
def download_meeting_files(meeting: Meeting, owner: User, file_id=None):
TMP_DOWNLOAD_DIR = current_app.config["TMP_DOWNLOAD_DIR"]
Path(TMP_DOWNLOAD_DIR).mkdir(parents=True, exist_ok=True)
tmp_name = f'{current_app.config["TMP_DOWNLOAD_DIR"]}{secrets.token_urlsafe(32)}'
tmp_name = f"{current_app.config['TMP_DOWNLOAD_DIR']}{secrets.token_urlsafe(32)}"
file_to_send = None

for current_file in meeting.files:
Expand Down
21 changes: 4 additions & 17 deletions web/b3desk/models/bbb.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def bbb_request(self, action, method="GET", **kwargs):
bigbluebutton_secret = current_app.config["BIGBLUEBUTTON_SECRET"]
secret = "{}{}".format(
prepped.url.replace("?", "").replace(
f'{current_app.config["BIGBLUEBUTTON_ENDPOINT"]}/', ""
f"{current_app.config['BIGBLUEBUTTON_ENDPOINT']}/", ""
),
bigbluebutton_secret,
)
Expand Down Expand Up @@ -279,22 +279,9 @@ def get_recordings(self):
"images": images,
}
if type == "video":
try:
resp = requests.get(
direct_link := media_url + "video-0.m4v"
)
if resp.status_code == 200:
data["playbacks"][type]["direct_link"] = (
direct_link
)
except (
requests.exceptions.HTTPError,
requests.exceptions.ConnectionError,
):
current_app.logger.warning(
"No direct recording link for meeting %s",
self.meeting.meetingID,
)
data["playbacks"][type]["direct_link"] = (
media_url + "video-0.m4v"
)
result.append(data)
except Exception as exception:
current_app.logger.error(exception)
Expand Down
2 changes: 1 addition & 1 deletion web/b3desk/models/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def make_nextcloud_credentials_request(url, payload, headers):
data = response.json()
if current_app.config.get("FORCE_HTTPS_ON_EXTERNAL_URLS"):
valid_nclocator = (
f'//{data["nclocator"]}'
f"//{data['nclocator']}"
if not (
data["nclocator"].startswith("//")
or data["nclocator"].startswith("http://")
Expand Down
2 changes: 1 addition & 1 deletion web/b3desk/templates/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
},
{
"title": _(
"""Besoin de contacter l'équipe du ministére de l'Éducation nationale ?"""
"""Besoin de contacter l'équipe du ministère de l'Éducation nationale ?"""
),
"description": _(
"""Rendez-vous sur votre portail d'assistance académique https://www.education.gouv.fr/la-messagerie-professionnelle-3446 ou sur Apps.education.fr"""
Expand Down
10 changes: 5 additions & 5 deletions web/tests/meeting/test_meeting.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def test_create_no_file(client_app, meeting, mocker, bbb_response):
assert bbb_response.called
bbb_url = bbb_response.call_args.args[0].url
assert bbb_url.startswith(
f'{client_app.app.config["BIGBLUEBUTTON_ENDPOINT"]}/create'
f"{client_app.app.config['BIGBLUEBUTTON_ENDPOINT']}/create"
)
bbb_params = {
key: value[0] for key, value in parse_qs(urlparse(bbb_url).query).items()
Expand Down Expand Up @@ -375,7 +375,7 @@ def test_create_with_only_a_default_file(
assert bbb_response.called
bbb_url = bbb_response.call_args.args[0].url
assert bbb_url.startswith(
f'{client_app.app.config["BIGBLUEBUTTON_ENDPOINT"]}/create'
f"{client_app.app.config['BIGBLUEBUTTON_ENDPOINT']}/create"
)
bbb_params = {
key: value[0] for key, value in parse_qs(urlparse(bbb_url).query).items()
Expand Down Expand Up @@ -468,7 +468,7 @@ def test_create_with_files(
assert bbb_response.called
bbb_url = bbb_response.call_args.args[0].url
assert bbb_url.startswith(
f'{client_app.app.config["BIGBLUEBUTTON_ENDPOINT"]}/create'
f"{client_app.app.config['BIGBLUEBUTTON_ENDPOINT']}/create"
)
bbb_params = {
key: value[0] for key, value in parse_qs(urlparse(bbb_url).query).items()
Expand Down Expand Up @@ -507,7 +507,7 @@ def test_create_with_files(

assert mocked_background_upload.called
assert mocked_background_upload.call_args.args[0].startswith(
f'{client_app.app.config["BIGBLUEBUTTON_ENDPOINT"]}/insertDocument'
f"{client_app.app.config['BIGBLUEBUTTON_ENDPOINT']}/insertDocument"
)

secret_key = client_app.app.config["SECRET_KEY"]
Expand Down Expand Up @@ -550,7 +550,7 @@ def test_create_quick_meeting(client_app, monkeypatch, user, mocker, bbb_respons
assert bbb_response.called
bbb_url = bbb_response.call_args.args[0].url
assert bbb_url.startswith(
f'{client_app.app.config["BIGBLUEBUTTON_ENDPOINT"]}/create'
f"{client_app.app.config['BIGBLUEBUTTON_ENDPOINT']}/create"
)
bbb_params = {
key: value[0] for key, value in parse_qs(urlparse(bbb_url).query).items()
Expand Down
3 changes: 1 addition & 2 deletions web/translations/fr/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ msgid "[email protected]"
msgstr ""

#: web/b3desk/templates/content.py:113
msgid "Besoin de contacter l'équipe du ministére de l'Éducation nationale ?"
msgid "Besoin de contacter l'équipe du ministère de l'Éducation nationale ?"
msgstr ""

#: web/b3desk/templates/content.py:116
Expand Down Expand Up @@ -2962,4 +2962,3 @@ msgstr ""
#~ "consultation de sa page d’accueil sous"
#~ " le pilotage de l’éditeur."
#~ msgstr ""

2 changes: 1 addition & 1 deletion web/translations/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ msgid "[email protected]"
msgstr ""

#: web/b3desk/templates/content.py:113
msgid "Besoin de contacter l'équipe du ministére de l'Éducation nationale ?"
msgid "Besoin de contacter l'équipe du ministère de l'Éducation nationale ?"
msgstr ""

#: web/b3desk/templates/content.py:116
Expand Down

0 comments on commit 12715d1

Please sign in to comment.