forked from Github-Mirrors/canaille
fix: do not install '--all-extras' by default in the demo env
since it may require to compile dependencies for the mariadb backend for instance.
This commit is contained in:
parent
c0b6fa358c
commit
8f3ea59a70
5 changed files with 12 additions and 6 deletions
|
@ -21,7 +21,11 @@ The only tool required for local development is `uv`.
|
|||
Make sure to have uv `installed on your computer <https://docs.astral.sh/uv/getting-started/installation/>`_
|
||||
to be able to hack Canaille.
|
||||
|
||||
Initialize your development environment with ``uv sync --all-extras``.
|
||||
Initialize your development environment with:
|
||||
- ``uv sync --extra front --extra oidc`` to have a minimal working development environment. This will allow you to run the tests with ``uv pytest --backend memory``.
|
||||
- ``uv sync --extra front --extra oidc --extra sqlite`` to have a minimal working development environment with SQLite backend support. This will allow you to run the tests with ``uv pytest --backend sql``.
|
||||
- ``uv sync --extra front --extra oidc --extra ldap`` to have a minimal working development environment with LDAP backend support. This will allow you to run the tests with ``uv pytest --backend ldap``.
|
||||
- ``uv sync --all-extras`` if you want to have everything at your fingertips. Note that it may compile some Python dependencies that would expect things to be installed on your system;
|
||||
Some dependencies of Canaille might need to be compiled, so you probably want to check that `GCC` and `cargo` are available on your computer.
|
||||
|
||||
After having launched the demo you have access to several services:
|
||||
|
@ -178,7 +182,7 @@ The generated documentation is located at ``build/sphinx/html``.
|
|||
Publish a new release
|
||||
---------------------
|
||||
|
||||
1. Check that dependencies are up to date with ``uv sync --upgrade`` and update dependencies accordingly in separated commits;
|
||||
1. Check that dependencies are up to date with ``uv sync --all-extras --upgrade`` and update dependencies accordingly in separated commits;
|
||||
2. Check that tests are still green for every supported python version, and that coverage is still at 100%, by running ``uv run tox``;
|
||||
3. Check that the demo environments are still working, both the local and the Docker one;
|
||||
4. Check that the :ref:`development/changelog:Release notes` section is correctly filled up;
|
||||
|
|
|
@ -22,6 +22,6 @@ COPY uv.lock pyproject.toml hatch_build.py LICENSE.rst README.md demo/demoapp.py
|
|||
COPY canaille /opt/canaille/canaille
|
||||
RUN pip install uv
|
||||
WORKDIR /opt/canaille
|
||||
RUN uv sync --group demo --all-extras
|
||||
RUN uv sync --group demo --extra front --extra oidc --extra ldap --extra sqlite
|
||||
|
||||
ENTRYPOINT ["uv", "run", "flask", "run", "--host=0.0.0.0", "--extra-files", "/opt/canaille/conf/canaille-memory.toml", "--extra-files", "/opt/canaille/conf/canaille-ldap.toml", "--extra-files", "/opt/canaille/conf/canaille-sql.toml"]
|
||||
|
|
|
@ -26,14 +26,15 @@ pushd "$DIR" > /dev/null 2>&1 || exit
|
|||
# https://github.com/fief-dev/zxcvbn-rs-py/issues/2
|
||||
export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
|
||||
|
||||
uv sync --group demo --all-extras
|
||||
|
||||
if [ "$BACKEND" = "memory" ]; then
|
||||
|
||||
uv sync --group demo --extra front --extra oidc
|
||||
uv run honcho --env ../.env --procfile Procfile-memory start
|
||||
|
||||
elif [ "$BACKEND" = "sql" ]; then
|
||||
|
||||
uv sync --group demo --extra front --extra oidc --extra sqlite
|
||||
uv run honcho --env ../.env --procfile Procfile-sql start
|
||||
|
||||
elif [ "$BACKEND" = "ldap" ]; then
|
||||
|
@ -44,6 +45,7 @@ elif [ "$BACKEND" = "ldap" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
uv sync --group demo --extra front --extra oidc --extra ldap
|
||||
uv run honcho --env ../.env --procfile Procfile-ldap start
|
||||
|
||||
else
|
||||
|
|
|
@ -220,7 +220,7 @@ env_list = [
|
|||
set_env = {PYO3_USE_ABI3_FORWARD_COMPATIBILITY = "1"}
|
||||
runner = "uv-venv-lock-runner"
|
||||
dependency_groups = ["dev"]
|
||||
uv_sync_flags = ["--all-extras"]
|
||||
uv_sync_flags = ["--extra", "front", "--extra", "oidc", "--extra", "sqlite", "--extra", "ldap"]
|
||||
commands = [
|
||||
["pytest", "--showlocals", "--full-trace", "{posargs}"],
|
||||
]
|
||||
|
|
2
uv.lock
2
uv.lock
|
@ -121,7 +121,7 @@ wheels = [
|
|||
|
||||
[[package]]
|
||||
name = "canaille"
|
||||
version = "0.0.55"
|
||||
version = "0.0.56"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "flask" },
|
||||
|
|
Loading…
Reference in a new issue