You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@echo " start-infra -- Start all containers necessary for tests. NOTE: it is not necessary to this before running CI tests, they start the infra by themselves"
Python monorepo for all [Supabase](https://supabase.com) libraries. This is a work in progress, and currently these are the ones contained in this repository:
This repository relies on the following dependencies for development:
35
+
-`uv` for python project management.
36
+
-`make` for command running.
37
+
-`docker` for both `postgrest` and `auth` test containers.
38
+
-`supabase-cli` for both `storage` and `realtime` test containers.
39
+
40
+
All of these dependencies are included in the nix shell environment, through `flake.nix`. If you've got `nix` installed, you may prefer to use it through `nix develop`.
28
41
29
-
We recommend activating your virtual environment. For example, we like `uv`, `conda` and `nix`! Click [here](https://docs.python.org/3/library/venv.html) for more about Python virtual environments and working with [conda](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment) and [uv](https://docs.astral.sh/uv/getting-started/features/). For nix, just install it with flakes enabled.
42
+
### Use a Virtual Environment
43
+
44
+
We recommend using a virtual environment, preferrably through `uv`, given it is currently the only tool that understands the workspace setup (you can read more about it in [the uv docs](https://docs.astral.sh/uv/concepts/projects/workspaces/)).
30
45
31
-
Using uv:
32
46
```
33
47
uv venv supabase-py
34
48
source supabase-py/bin/activate
35
49
uv sync
36
50
```
37
51
38
-
Using venv (Python 3 built-in):
52
+
If you're using nix, the generated `python` executable should have the correct dependencies installed for the whole workspace, given it is derived from the root's `pyproject.toml` using [uv2nix](https://github.com/pyproject-nix/uv2nix).
39
53
40
-
```bash
41
-
python3 -m venv env
42
-
source env/bin/activate # On Windows, use .\env\Scripts\activate
43
-
```
54
+
### Running tests and other commands
44
55
45
-
Using conda:
56
+
We use `make` to store and run the relevant commands. The structure is setup such that each sub package can individually set its command in its own `Makefile`, and the job of the main `Makefile` is just coordinate calling each of them.
46
57
58
+
For instance, in order to run all tests of all packages, you should use the following root command
47
59
```bash
48
-
conda create --name supabase-py
49
-
conda activate supabase-py
60
+
make ci
50
61
```
62
+
Which internally dispatches `make -C src/{package} tests` calls to each package in the monorepo.
51
63
52
-
Using nix:
64
+
You should also consider using
53
65
```bash
54
-
nix develop
66
+
make ci -jN # where N is the number of max concurrent jobs, or just -j for infinite jobs
55
67
```
68
+
To run each of the packages' tests in parallel. This should be generally faster than running in 1 job, but has the downside of messing up the CLI output, so parsing error messages might not be easy.
56
69
57
-
### Local installation
58
-
59
-
You can also install locally after cloning this repo. Install Development mode with `pip install -e`, which makes it editable, so when you edit the source code the changes will be reflected in your python module.
This is a Python port of the [supabase js gotrue client](https://github.com/supabase/gotrue-js). The current state is that there is a features parity but with small differences that are mentioned in the section **Differences to the JS client**. As of December 14th, we renamed to repo from `gotrue-py` to `auth-py` to mirror the changes in the JavaScript library.
9
8
10
9
## Installation
11
10
12
-
The package can be installed using pip or poetry:
11
+
The package can be installed using pip, uv or poetry:
0 commit comments