File size: 2,665 Bytes
64cb1f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
458a17a
64cb1f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20f04e8
 
64cb1f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[project]
name = "zero_spaces_template"
version = "0.1.0"
description = "Add a short description here"
authors = [{ name = "Pablo Vela", email = "pablovela5620@gmail.com" }]
requires-python = ">= 3.11"
dependencies = ["build>=1.2.2.post1,<2"]

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
include = ["zero_spaces_template*"]

[tool.pixi.project]
channels = ["https://fast.prefix.dev/conda-forge"]
platforms = ["linux-64"]

[tool.pixi.activation]
scripts = [".pixi.sh"]

[tool.pixi.tasks]
_install-wheel = "uv pip install ./dist/$WHL_PATH --force-reinstall"
_build-wheel = "python -m build"
upload-hf = { cmd = "python tools/upload_to_hf.py", depends-on = [
    "_build-wheel",
] }

[tool.pixi.tasks.app]
cmd = """
    python tools/gradio_app.py
    """
description = "Runs Gradio frontend"

[tool.pixi.tasks.dev-app]
cmd = """
    gradio tools/gradio_app.py
    """
description = "Runs Gradio frontend for hotreload"

[tool.pixi.feature.spaces.tasks.app]
cmd = """
    python gradio_app.py
    """
description = "Runs Gradio frontend in huggingface spaces"
depends-on = ["_install-wheel"]

[tool.pixi.pypi-dependencies]
# zero_spaces_template = { path = ".", editable = true }
zero_spaces_template = { path = "dist/zero_spaces_template-0.1.0-py3-none-any.whl" }
torch = { version = ">=2.5.1", index = "https://download.pytorch.org/whl/cu124" }
torchvision = { version = ">=0.20.1", index = "https://download.pytorch.org/whl/cu124" }
gradio-rerun = { url = "https://huggingface.co/datasets/pablovela5620/gradio-rr-0.23/resolve/main/gradio_rerun-0.0.8-py3-none-any.whl" }
rerun-sdk = { url = "https://github.com/rerun-io/rerun/releases/download/prerelease/rerun_sdk-0.23.0a1+dev-cp38-abi3-manylinux_2_31_x86_64.whl" }
simplecv = { git = "https://github.com/pablovela5620/simplecv.git", rev = "663a6a8882689cf70093cb16f717053731ca545e" }

[tool.pixi.dependencies]
python = "3.11.*"
uv = ">=0.6.0,<0.7"

[tool.pixi.feature.spaces.pypi-dependencies]
spaces = "==0.30.3"

[tool.pixi.environments]
spaces = { features = ["spaces"], solve-group = "default" }

[tool.ruff]
line-length = 150
select = [
    # pycodestyle
    "E",
    # Pyflakes
    "F",
    # pyupgrade
    "UP",
    # flake8-bugbear
    "B",
    # flake8-simplify
    "SIM",
    # isort
    "I",
]

ignore = [
    "E501",   # Line too long.
    "F722",   # Forward annotation false positive from jaxtyping. Should be caught by pyright.
    "F821",   # Forward annotation false positive from jaxtyping. Should be caught by pyright.
    "SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
]