Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to toml config #4018

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .codecov.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/actions/python-cache-requirements/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ runs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pip'
cache-dependency-path: |
requirements.txt
dev-requirements.txt
docs/requirements.txt

- run: |
pip install -r ${{ inputs.requirements }}
shell: bash
8 changes: 3 additions & 5 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check deps
on:
pull_request:
paths:
- setup.py
- pyproject.toml.py
- requirements.txt
- dev-requirements.txt
- docs/requirements.txt
Expand Down Expand Up @@ -31,13 +31,11 @@ jobs:

- name: Install dependencies
run: |
pip3 install -c dev-requirements.txt pip-tools
pip install uv

- name: Check dependency graph
run: |
pip-compile -q --strip-extras
pip-compile -q --strip-extras dev-requirements.in
pip-compile -q --strip-extras docs/requirements.in
make ci_check_deps

- name: Verify dependency graph is ok
uses: tj-actions/verify-changed-files@v17
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ jobs:
doc:
name: Documentation
runs-on: ubuntu-latest
container:
image: python:3.8
env:
LANG: C.UTF-8
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/python-cache-requirements
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Install dependencies
run: |
pip3 install -c dev-requirements.txt flake8
pip3 install -c dev-requirements.txt flake8 flake8-pyproject

- name: Flake8
run: |
Expand Down
38 changes: 28 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test CI

on:
Expand Down Expand Up @@ -75,11 +72,12 @@ jobs:
with:
path: |
./venv
~/.cache/uv

key: pip-${{ matrix.python-version }}-${{ matrix.os }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }}
key: uv-${{ matrix.python-version }}-${{ matrix.os }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }}
restore-keys: |
pip-${{ matrix.python-version }}-${{ matrix.os }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }}
pip-${{ matrix.python-version }}-${{ matrix.os }}
uv-${{ matrix.python-version }}-${{ matrix.os }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }}
uv-${{ matrix.python-version }}-${{ matrix.os }}

- name: Prepare test env
run: |
Expand Down Expand Up @@ -112,10 +110,10 @@ jobs:

- name: Install python dependencies
run: |
python3.8 -m venv ./venv
./venv/bin/pip3 install --upgrade pip wheel setuptools -c requirements.txt -c dev-requirements.txt
./venv/bin/pip3 install -r requirements.txt -U
./venv/bin/pip3 install -r dev-requirements.txt -U
pip install uv
uv venv -p /usr/bin/python${{ matrix.python-version }} venv
. venv/bin/activate
uv pip install -r dev-requirements.txt -U

- name: Create test required directories
run: |
Expand Down Expand Up @@ -174,6 +172,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/python-cache-requirements
with:
requirements: requirements.txt

- name: Compile translations
run: |
pip3 install django -c requirements.txt
sudo apt-get -qqy install gettext
django-admin compilemessages

- name: Prepare debian 18.04 versioning
run: |
grep '^[0-9]\+\.[0-9]\+\.[0-9]\+$' VERSION || sed -i 's/+dev/.ubuntu18.04~dev'$GITHUB_RUN_ID'/' debian/changelog
Expand All @@ -196,6 +204,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/python-cache-requirements
with:
requirements: requirements.txt

- name: Compile translations
run: |
pip3 install django -c requirements.txt
sudo apt-get -qqy install gettext
django-admin compilemessages

- name: Prepare debian 20.04 versioning
run: |
sed -i 's/+dev/.ubuntu20.04~dev'$GITHUB_RUN_ID'/' debian/changelog
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ else
docker_compose=docker-compose
endif

dep_update = uv pip compile -q --strip-extras pyproject.toml --output-file requirements.txt && uv pip compile pyproject.toml -c requirements.txt -q --strip-extras --extra dev --output-file dev-requirements.txt && uv pip compile --strip-extras -q docs/requirements.in --output-file docs/requirements.txt

-include Makefile.perso.mk

###########################
Expand Down Expand Up @@ -32,7 +34,10 @@ serve:
$(docker_compose) up

deps:
$(docker_compose) run --rm web bash -c "pip-compile -q --strip-extras && pip-compile -q --strip-extras dev-requirements.in && pip-compile -q --strip-extras docs/requirements.in"
$(docker_compose) run --rm web bash -c "$(dep_update)"

ci_check_deps:
$(dep_update)

flake8:
$(docker_compose) run --rm web flake8 geotrek
Expand Down
2 changes: 1 addition & 1 deletion debian/geotrek-admin.links
Original file line number Diff line number Diff line change
@@ -1 +1 @@
opt/geotrek-admin/bin/manage.py usr/sbin/geotrek
/opt/geotrek-admin/bin/manage.py /usr/sbin/geotrek
2 changes: 0 additions & 2 deletions debian/geotrek-admin.triggers
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Register interest in Python interpreter changes; and
# don't make the Python package dependent on the virtualenv package
# processing (noawait)
interest-noawait /usr/bin/python3.5
interest-noawait /usr/bin/python3.6
interest-noawait /usr/bin/python3.8

# Also provide a symbolic trigger for all dh-virtualenv packages
Expand Down
11 changes: 0 additions & 11 deletions dev-requirements.in

This file was deleted.

Loading
Loading