Skip to content

Commit

Permalink
Merge branch 'dev' into one-year-ago
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemilink authored Oct 2, 2024
2 parents 8988ebc + 1f99329 commit 0b36111
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 42 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
NODE_VERSION: "18" # needs to be also updated in .nvmrc
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.11"
MARIADB_VERSION: "10.4.10"
COVERALLS_VERSION: "3.3.1" # check if Coverage needs to be also updated in requirements-ci.txt
TYPESENSE_VERSION: "27.0" # needs to be also updated in scripts/define_variable.sh
Expand All @@ -24,7 +24,7 @@ jobs:
# Lint all source files by executing pre-commit hooks.
lint:
name: Lint
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

# do not execute scheduled jobs on forks:
if: ${{ github.event_name != 'schedule' || github.repository_owner == 'zestedesavoir' }}
Expand All @@ -44,7 +44,7 @@ jobs:
# Build the documentation and upload it as an artifact.
build-doc:
name: Build Sphinx documentation
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

# do not execute scheduled jobs on forks:
if: ${{ github.event_name != 'schedule' || github.repository_owner == 'zestedesavoir' }}
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
# Build the website front-end and upload built assets as an artifact.
build-front:
name: Lint and build front-end
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

# do not execute scheduled jobs on forks:
if: ${{ github.event_name != 'schedule' || github.repository_owner == 'zestedesavoir' }}
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
test:
name: Install and test zds-site
needs: build-front
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

strategy:
matrix:
Expand Down Expand Up @@ -182,6 +182,11 @@ jobs:
name: assets
path: dist

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"

- name: Upgrade pip
run: |
pip install --upgrade pip
Expand All @@ -206,11 +211,6 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"

- name: Set up NodeJS ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -246,7 +246,7 @@ jobs:
coverage:
name: Push coverage to Coveralls
needs: test
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Set up Python ${{ env.PYTHON_VERSION }}
Expand All @@ -266,7 +266,7 @@ jobs:
push_doc:
name: Push documentation to GitHub Pages
needs: ["build-doc", "test"]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: "github.ref == 'refs/heads/dev'"

environment:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0 # needs to be also updated in requirements-dev.txt
rev: 24.8.0 # needs to be also updated in requirements-dev.txt
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude_types: ["svg"]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ zmd-stop: ## Stop the zmarkdown server
## ~ Search Engine

run-search-engine: ## Run the search server
./.local/typesense/typesense-server --data-dir=.local/typesense/typesense-data --api-key=xyz || echo 'No Typesense installed (you can add it locally with `./scripts/install_zds.sh +typesense-local`)'
@./.local/typesense/typesense-server --data-dir=.local/typesense/typesense-data --api-key=xyz || echo 'No Typesense installed (you can add it locally with `./scripts/install_zds.sh +typesense-local`)'

index-all: ## Index the whole database in the search engine
python manage.py search_engine_manager index_all
Expand Down
5 changes: 5 additions & 0 deletions assets/images/brands/gandi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/source/install/install-macos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Pré-requis
Ces instructions expliquent comment installer XCode, Homebrew, Python, pip, et
les utilitaires GNU, sur macOS. Si vous avez déjà :

- une installation fonctionnelle de Homebrew et de Python 3.7+ ;
- une installation fonctionnelle de Homebrew et de Python 3.8+ ;
- configuré votre terminal pour utiliser les utilitaires GNU à la place de
ceux de BSD (avec `linuxify <https://github.com/darksonic37/linuxify#install>`_,
par exemple) ;
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 120
target-version = ["py37", "py38", "py39", "py310"]
target-version = ["py38", "py39", "py310", "py311", "py312"]
extend-exclude = """
^/doc
"""
12 changes: 6 additions & 6 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-r requirements.txt

black==24.2.0 # needs to be also updated in .pre-commit-config.yaml
black==24.8.0 # needs to be also updated in .pre-commit-config.yaml
colorlog==6.8.2
django-debug-toolbar==4.3.0
django-debug-toolbar==4.4.6
django-extensions==3.2.3
Faker==24.1.0
pre-commit==3.6.2
PyYAML==6.0.1
selenium==4.18.1
Faker==30.0.0
pre-commit==3.8.0
PyYAML==6.0.2
selenium==4.25.0
Sphinx==7.2.6
sphinx-rtd-theme==2.0.0
6 changes: 3 additions & 3 deletions requirements-prod.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements.txt

gunicorn==21.2.0
gunicorn==23.0.0
mysqlclient==2.2.4
sentry-sdk==2.9.0
ujson==5.9.0
sentry-sdk==2.14.0
ujson==5.10.0
28 changes: 14 additions & 14 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Implicit dependencies (optional dependencies of dependencies)
crispy-forms-bootstrap2==2024.1
social-auth-app-django==5.4.0
social-auth-app-django==5.4.2

# Explicit dependencies (references in code)
beautifulsoup4==4.12.3
django-crispy-forms==2.1
django-model-utils==4.4.0
django-crispy-forms==2.3
django-model-utils==5.0.0
django-recaptcha==4.0.0
Django==4.2.11
easy-thumbnails[svg]==2.8.5
factory-boy==3.3.0
Django==4.2.16
easy-thumbnails[svg]==2.10.0
factory-boy==3.3.1
geoip2==4.8.0
GitPython==3.1.42
GitPython==3.1.43
homoglyphs==2.0.4
lxml==5.1.0
Pillow==10.2.0
lxml==5.3.0
Pillow==10.4.0
pymemcache==4.0.0
requests==2.31.0
typesense==0.19.0
requests==2.32.3
typesense==0.21.0
ua-parser==0.18.0

# Api dependencies
django-cors-headers==4.3.1
django-filter==24.1
django-cors-headers==4.4.0
django-filter==24.3
django-oauth-toolkit==2.3.0
djangorestframework==3.14.0
djangorestframework==3.15.2
drf-extensions==0.7.1
dry-rest-permissions==0.1.10
drf-yasg==1.21.7
Expand Down
13 changes: 13 additions & 0 deletions templates/pages/technologies.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ <h3>{% trans "Droits" %}</h3>
<a href="https://fontawesome.com/license/free">sous licence CC BY</a>.
{% endblocktrans %}
</p>

<h3>{% trans "Hébergement" %}</h3>

<p>
<img src="{% static "images/brands/gandi.svg" %}" alt="Gandi.net" width="80%"/><br>
{% blocktrans %}
<a href="https://news.gandi.net/fr/2021/02/gandi-soutient-zeste-de-savoir/">
Gandi soutient {{ site_name }}
</a>
dans ses projets et ambitions en fournissant ses solutions d'hébergement généreusement et en
relayant certaines de nos actualités. Merci&nbsp;!
{% endblocktrans %}
</p>
</div>
{% endif %}

Expand Down
1 change: 0 additions & 1 deletion zds/mp/api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ def test_expand_list_of_private_topics_for_author(self):
response = self.client.get(reverse("api:mp:list") + "?expand=author")
self.assertEqual(response.status_code, status.HTTP_200_OK)
author = response.data.get("results")[0].get("author")
self.assertIsInstance(author, OrderedDict)
self.assertEqual(author.get("username"), self.profile.user.username)
self.assertEqual(author.get("avatar_url"), self.profile.get_avatar_url())

Expand Down

0 comments on commit 0b36111

Please sign in to comment.