Skip to content

Commit 20aa3e7

Browse files
committed
fix: move away from just, ditch unasync-cli in favor of unasync script
unasync-cli uses setuptools.find_packages() under the hood to find the files to patch, which is not ideal given it does not know how to handle the `src` directories correctly. instead, by using `unasync` directly, we can give it the list of files to operate on
1 parent df32461 commit 20aa3e7

File tree

12 files changed

+84
-161
lines changed

12 files changed

+84
-161
lines changed

Makefile

Whitespace-only changes.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131

3232
dev-tools = pkgs: [
3333
pkgs.supabase-cli
34-
pkgs.just
3534
pkgs.uv
35+
pkgs.gnumake
3636
];
3737
workspace = uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; };
3838

justfile

Lines changed: 0 additions & 21 deletions
This file was deleted.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ members = [
77
[tool.uv.sources]
88
realtime = { workspace = true }
99
supabase = { workspace = true }
10-
unasync-cli = { git = "https://github.com/supabase-community/unasync-cli.git", branch = "main" }
1110

1211
[tool.pytest.ini_options]
1312
asyncio_mode = "auto"

src/realtime/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.PHONY: pytest pre-commit mypy tests infra stop-infra
2+
3+
pre-commit:
4+
uv run pre-commit run --all-files
5+
6+
mypy:
7+
uv run --exact --package realtime mypy src/realtime
8+
9+
infra:
10+
supabase start --workdir infra -x studio,mailpit,edge-runtime,logflare,vector,supavisor,imgproxy,storage-api
11+
12+
stop-infra:
13+
supabase --workdir infra stop
14+
15+
tests: pre-commit mypy infra pytest
16+
17+
pytest:
18+
uv run --exact --package realtime pytest --cov=realtime --cov-report=xml --cov-report=html -vv

src/realtime/mod.just

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/realtime/release-please-config.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/supabase/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Supabase
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

src/supabase/Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.PHONY: pytest pre-commit unasync build-sync tests
2+
3+
pytest:
4+
uv run --package --exact supabase pytest --cov=./ --cov-report=xml --cov-report=html -vv
5+
6+
pre-commit:
7+
uv run pre-commit run --all-files
8+
9+
unasync:
10+
uv run run-unasync.py
11+
12+
build-sync: unasync
13+
sed -i 's/asyncio.create_task(self.realtime.set_auth(access_token))//g' src/supabase/_sync/client.py
14+
sed -i 's/asynch/synch/g' src/supabase/_sync/auth_client.py
15+
sed -i 's/Async/Sync/g' src/supabase/_sync/auth_client.py
16+
sed -i 's/Async/Sync/g' src/supabase/_sync/client.py
17+
sed -i 's/create_async_client/create_client/g' tests/_sync/test_client.py
18+
sed -i 's/SyncClient/Client/gi' tests/_sync/test_client.py
19+
sed -i 's/SyncHTTPTransport/HTTPTransport/g' tests/_sync/test_client.py
20+
sed -i 's/SyncMock/Mock/g' tests/_sync/test_client.py
21+
22+
tests: pre-commit pytest

src/supabase/mod.just

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)