Skip to content

Commit aff2438

Browse files
committed
implement riffq
1 parent ebd6957 commit aff2438

29 files changed

+4106
-3113
lines changed

.cursor/rules/uv.mdc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ alwaysApply: true
55
---
66
- Always use `uv` to install Python packages (e.g., `uv pip install <package>`) instead of `pip`.
77
- Always use `uv` to run Python scripts and tests (`uv run pytest`) or commands (e.g., `uv python <script.py>`) instead of `python` or `python3`, or `pytest`.
8-
- This projects installs a package called "spile", the [main.py](mdc:universql/main.py) is the entryfile. When you create a Python file, you should ask the user if the tests need to be created and executed before considering the task is done.
8+
- This projects installs a package called "spile", the [main.py](mdc:universql/main.py) is the entryfile. When you create a Python file, you should ask the user if the tests need to be created and executed before considering the task is done.
9+
- Do not use comments unless asked explicitly. DON'T USE COMMENTS!

.dockerignore

Lines changed: 256 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,256 @@
1-
tests/*
2-
resources/*
3-
.git/*
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
pip-wheel-metadata/
20+
share/python-wheels/
21+
*.egg-info/
22+
.installed.cfg
23+
*.egg
24+
MANIFEST
25+
26+
# PyInstaller
27+
*.manifest
28+
*.spec
29+
30+
# Installer logs
31+
pip-log.txt
32+
pip-delete-this-directory.txt
33+
34+
# Unit test / coverage reports
35+
htmlcov/
36+
.tox/
37+
.nox/
38+
.coverage
39+
.coverage.*
40+
.cache
41+
nosetests.xml
42+
coverage.xml
43+
*.cover
44+
*.py,cover
45+
.hypothesis/
46+
.pytest_cache/
47+
48+
# Jupyter Notebook
49+
.ipynb_checkpoints
50+
51+
# IPython
52+
profile_default/
53+
ipython_config.py
54+
55+
# pyenv
56+
.python-version
57+
58+
# pipenv
59+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
60+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
61+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
62+
# install all needed dependencies.
63+
#Pipfile.lock
64+
65+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
66+
__pypackages__/
67+
68+
# Celery stuff
69+
celerybeat-schedule
70+
celerybeat.pid
71+
72+
# SageMath parsed files
73+
*.sage.py
74+
75+
# Environments
76+
.env
77+
.venv
78+
env/
79+
venv/
80+
ENV/
81+
env.bak/
82+
venv.bak/
83+
84+
# Spyder project settings
85+
.spyderproject
86+
.spyproject
87+
88+
# Rope project settings
89+
.ropeproject
90+
91+
# mkdocs documentation
92+
/site
93+
94+
# mypy
95+
.mypy_cache/
96+
.dmypy.json
97+
dmypy.json
98+
99+
# Pyre type checker
100+
.pyre/
101+
102+
# Git
103+
.git/
104+
.gitignore
105+
.gitattributes
106+
107+
# IDE
108+
.vscode/
109+
.idea/
110+
*.swp
111+
*.swo
112+
*~
113+
114+
# OS
115+
.DS_Store
116+
.DS_Store?
117+
._*
118+
.Spotlight-V100
119+
.Trashes
120+
ehthumbs.db
121+
Thumbs.db
122+
123+
# Node.js (if any frontend components)
124+
node_modules/
125+
npm-debug.log*
126+
yarn-debug.log*
127+
yarn-error.log*
128+
129+
# Logs
130+
logs
131+
*.log
132+
133+
# Runtime data
134+
pids
135+
*.pid
136+
*.seed
137+
*.pid.lock
138+
139+
# Coverage directory used by tools like istanbul
140+
coverage/
141+
142+
# nyc test coverage
143+
.nyc_output
144+
145+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
146+
.grunt
147+
148+
# Bower dependency directory (https://bower.io/)
149+
bower_components
150+
151+
# Dependency directories
152+
node_modules/
153+
jspm_packages/
154+
155+
# Documentation
156+
docs/
157+
*.md
158+
!README.md
159+
160+
# Examples and tests
161+
examples/
162+
tests/
163+
test/
164+
165+
# Frontend source files (but keep dist/)
166+
frontend/src/
167+
frontend/node_modules/
168+
frontend/package-lock.json
169+
frontend/.vite/
170+
ui/src/
171+
ui/node_modules/
172+
web/src/
173+
web/node_modules/
174+
client/src/
175+
client/node_modules/
176+
app/src/
177+
app/node_modules/
178+
179+
# Keep built frontend assets
180+
!frontend/dist/
181+
!ui/dist/
182+
!web/dist/
183+
!client/dist/
184+
!app/dist/
185+
!dist/
186+
187+
# Kubernetes manifests
188+
k8s/
189+
*.yaml
190+
*.yml
191+
!docker-compose.yml
192+
193+
# Scripts
194+
scripts/
195+
*.sh
196+
197+
# CI/CD
198+
.github/
199+
.gitlab-ci.yml
200+
.travis.yml
201+
circle.yml
202+
203+
# Database files
204+
*.db
205+
*.sqlite
206+
*.sqlite3
207+
208+
# Temporary files
209+
tmp/
210+
temp/
211+
*.tmp
212+
213+
# SSL certificates and keys
214+
*.pem
215+
*.key
216+
*.crt
217+
*.p12
218+
*.pfx
219+
ssl/
220+
221+
# Cache directories
222+
.cache/
223+
cache/
224+
225+
# Local configuration
226+
local.py
227+
local_settings.py
228+
.env.local
229+
.env.development
230+
.env.test
231+
.env.production
232+
233+
# Backup files
234+
*.bak
235+
*.backup
236+
*.old
237+
238+
# Archive files
239+
*.tar
240+
*.tar.gz
241+
*.tgz
242+
*.zip
243+
*.rar
244+
245+
# Compiled files
246+
*.com
247+
*.class
248+
*.dll
249+
*.exe
250+
*.o
251+
*.so
252+
253+
# Miscellaneous
254+
.sass-cache/
255+
connect.lock
256+
typings/

Dockerfile

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
FROM python:3.11-slim-bullseye
22

33
RUN apt-get update && apt-get -y upgrade \
4-
&& apt-get install gcc -y \
4+
&& apt-get install gcc curl libpq-dev python3-dev -y \
55
&& pip install --upgrade pip
66

7+
# Install uv
8+
RUN pip install uv
9+
710
# Set separate working directory for easier debugging.
811
WORKDIR /app
912

10-
RUN pip install 'poetry==1.8.3'
11-
COPY pyproject.toml poetry.lock ./
13+
# Copy everything first. (Note: If needed, we can use .dockerignore to limit what's copied.)
14+
COPY . .
1215

13-
RUN poetry config virtualenvs.create false --local
16+
# Install dependencies using uv
17+
RUN uv sync --frozen
1418

15-
# Copy everything. (Note: If needed, we can use .dockerignore to limit what's copied.)
16-
COPY . .
19+
# Ensure frontend build directory exists (will be empty if not built)
20+
RUN mkdir -p dist frontend/dist ui/dist web/dist client/dist app/dist
1721

18-
RUN poetry install
22+
# Install the project
23+
RUN uv pip install -e .
1924

20-
EXPOSE 8084
25+
EXPOSE 5432 8084
2126
ENV SERVER_HOST=0.0.0.0
2227
ENV USE_LOCALCOMPUTING_COM=1
2328

24-
ENTRYPOINT ["poetry", "run", "universql"]
29+
ENTRYPOINT ["uv", "run", "universql"]

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ name = "pypi"
66
[packages]
77

88
[dev-packages]
9+
ipykernel = "*"
910

1011
[requires]
1112
python_version = "3.11"

0 commit comments

Comments
 (0)