Pierre Chapuis commited on
Commit
bbdb110
1 Parent(s): e1592e8

add stuff to help with local development

Browse files
Files changed (4) hide show
  1. .gitignore +1 -0
  2. pyproject.toml +51 -0
  3. requirements.lock +172 -0
  4. typings/environs/__init__.pyi +10 -0
.gitignore CHANGED
@@ -1,4 +1,5 @@
1
  gradio_cached_examples/
 
2
 
3
  # https://github.com/github/gitignore/blob/main/Python.gitignore
4
  # Byte-compiled / optimized / DLL files
 
1
  gradio_cached_examples/
2
+ requirements-dev.lock
3
 
4
  # https://github.com/github/gitignore/blob/main/Python.gitignore
5
  # Byte-compiled / optimized / DLL files
pyproject.toml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "eraser"
3
+ version = "0.1.0"
4
+ description = "Finegrain Object Eraser (Gradio)"
5
+ authors = [
6
+ { name = "Pierre Chapuis", email = "pierre@lagon.tech" }
7
+ ]
8
+ dependencies = [
9
+ "gradio>=4.41.0",
10
+ "environs>=11.0.0",
11
+ "gradio-image-annotation>=0.2.3",
12
+ "httpx>=0.27.0",
13
+ "pillow>=10.4.0",
14
+ "gradio-imageslider>=0.0.20",
15
+ ]
16
+ readme = "README.md"
17
+ requires-python = ">= 3.12, <3.13"
18
+
19
+ [build-system]
20
+ requires = ["hatchling"]
21
+ build-backend = "hatchling.build"
22
+
23
+ [tool.rye]
24
+ managed = true
25
+ dev-dependencies = []
26
+
27
+ [tool.hatch.metadata]
28
+ allow-direct-references = true
29
+
30
+ [tool.hatch.build.targets.wheel]
31
+ packages = ["src/eraser"]
32
+
33
+ [tool.ruff]
34
+ line-length = 120
35
+ target-version = "py312"
36
+
37
+ [tool.ruff.lint]
38
+ select = [
39
+ "E", # pycodestyle errors
40
+ "W", # pycodestyle warnings
41
+ "F", # pyflakes
42
+ "UP", # pyupgrade
43
+ "A", # flake8-builtins
44
+ "B", # flake8-bugbear
45
+ "Q", # flake8-quotes
46
+ "I", # isort
47
+ ]
48
+
49
+ [tool.pyright]
50
+ include = ["src"]
51
+ exclude = ["**/__pycache__"]
requirements.lock ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # generated by rye
2
+ # use `rye lock` or `rye sync` to update this lockfile
3
+ #
4
+ # last locked with the following flags:
5
+ # pre: false
6
+ # features: []
7
+ # all-features: false
8
+ # with-sources: false
9
+ # generate-hashes: false
10
+ # universal: false
11
+
12
+ -e file:.
13
+ aiofiles==23.2.1
14
+ # via gradio
15
+ annotated-types==0.7.0
16
+ # via pydantic
17
+ anyio==4.4.0
18
+ # via gradio
19
+ # via httpx
20
+ # via starlette
21
+ certifi==2024.7.4
22
+ # via httpcore
23
+ # via httpx
24
+ # via requests
25
+ charset-normalizer==3.3.2
26
+ # via requests
27
+ click==8.1.7
28
+ # via typer
29
+ # via uvicorn
30
+ contourpy==1.2.1
31
+ # via matplotlib
32
+ cycler==0.12.1
33
+ # via matplotlib
34
+ environs==11.0.0
35
+ # via eraser
36
+ fastapi==0.112.2
37
+ # via gradio
38
+ ffmpy==0.4.0
39
+ # via gradio
40
+ filelock==3.15.4
41
+ # via huggingface-hub
42
+ fonttools==4.53.1
43
+ # via matplotlib
44
+ fsspec==2024.6.1
45
+ # via gradio-client
46
+ # via huggingface-hub
47
+ gradio==4.42.0
48
+ # via eraser
49
+ # via gradio-image-annotation
50
+ # via gradio-imageslider
51
+ gradio-client==1.3.0
52
+ # via gradio
53
+ gradio-image-annotation==0.2.3
54
+ # via eraser
55
+ gradio-imageslider==0.0.20
56
+ # via eraser
57
+ h11==0.14.0
58
+ # via httpcore
59
+ # via uvicorn
60
+ httpcore==1.0.5
61
+ # via httpx
62
+ httpx==0.27.0
63
+ # via eraser
64
+ # via gradio
65
+ # via gradio-client
66
+ huggingface-hub==0.24.6
67
+ # via gradio
68
+ # via gradio-client
69
+ idna==3.8
70
+ # via anyio
71
+ # via httpx
72
+ # via requests
73
+ importlib-resources==6.4.4
74
+ # via gradio
75
+ jinja2==3.1.4
76
+ # via gradio
77
+ kiwisolver==1.4.5
78
+ # via matplotlib
79
+ markdown-it-py==3.0.0
80
+ # via rich
81
+ markupsafe==2.1.5
82
+ # via gradio
83
+ # via jinja2
84
+ marshmallow==3.22.0
85
+ # via environs
86
+ matplotlib==3.9.2
87
+ # via gradio
88
+ mdurl==0.1.2
89
+ # via markdown-it-py
90
+ numpy==2.1.0
91
+ # via contourpy
92
+ # via gradio
93
+ # via matplotlib
94
+ # via pandas
95
+ orjson==3.10.7
96
+ # via gradio
97
+ packaging==24.1
98
+ # via gradio
99
+ # via gradio-client
100
+ # via huggingface-hub
101
+ # via marshmallow
102
+ # via matplotlib
103
+ pandas==2.2.2
104
+ # via gradio
105
+ pillow==10.4.0
106
+ # via eraser
107
+ # via gradio
108
+ # via gradio-imageslider
109
+ # via matplotlib
110
+ pydantic==2.8.2
111
+ # via fastapi
112
+ # via gradio
113
+ pydantic-core==2.20.1
114
+ # via pydantic
115
+ pydub==0.25.1
116
+ # via gradio
117
+ pygments==2.18.0
118
+ # via rich
119
+ pyparsing==3.1.4
120
+ # via matplotlib
121
+ python-dateutil==2.9.0.post0
122
+ # via matplotlib
123
+ # via pandas
124
+ python-dotenv==1.0.1
125
+ # via environs
126
+ python-multipart==0.0.9
127
+ # via gradio
128
+ pytz==2024.1
129
+ # via pandas
130
+ pyyaml==6.0.2
131
+ # via gradio
132
+ # via huggingface-hub
133
+ requests==2.32.3
134
+ # via huggingface-hub
135
+ rich==13.7.1
136
+ # via typer
137
+ ruff==0.6.2
138
+ # via gradio
139
+ semantic-version==2.10.0
140
+ # via gradio
141
+ shellingham==1.5.4
142
+ # via typer
143
+ six==1.16.0
144
+ # via python-dateutil
145
+ sniffio==1.3.1
146
+ # via anyio
147
+ # via httpx
148
+ starlette==0.38.2
149
+ # via fastapi
150
+ tomlkit==0.12.0
151
+ # via gradio
152
+ tqdm==4.66.5
153
+ # via huggingface-hub
154
+ typer==0.12.5
155
+ # via gradio
156
+ typing-extensions==4.12.2
157
+ # via fastapi
158
+ # via gradio
159
+ # via gradio-client
160
+ # via huggingface-hub
161
+ # via pydantic
162
+ # via pydantic-core
163
+ # via typer
164
+ tzdata==2024.1
165
+ # via pandas
166
+ urllib3==2.2.2
167
+ # via gradio
168
+ # via requests
169
+ uvicorn==0.30.6
170
+ # via gradio
171
+ websockets==12.0
172
+ # via gradio-client
typings/environs/__init__.pyi ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import contextlib
2
+ from collections.abc import Iterator
3
+
4
+ class Env:
5
+ def __init__(self) -> None: ...
6
+ def read_env(self) -> None: ...
7
+ @contextlib.contextmanager
8
+ def prefixed(self, prefix: str) -> Iterator[Env]: ...
9
+ def bool(self, name: str, default: bool | None = None) -> bool | None: ...
10
+ def str(self, name: str, default: str | None = None) -> str | None: ...