Skip to content

Commit

Permalink
Use uv instead of poetry for managing dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lebr0nli committed Jan 6, 2025
1 parent f8246c8 commit 31ff60e
Show file tree
Hide file tree
Showing 8 changed files with 290 additions and 275 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y shellcheck shfmt
curl -sSL https://install.python-poetry.org | python3 -
poetry install --with dev
curl -LsSf https://astral.sh/uv/0.5.14/install.sh | sh
~/.local/bin/uv sync --group dev
- name: Run linters
run: |
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ RUN apt-get update && \
curl \
wget \
vim && \
curl -sSL https://install.python-poetry.org | python3 - && \
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && \
~/.fzf/install --all

ENV PATH="/root/.fzf/bin:/root/.local/bin:${PATH}"

COPY --from=ghcr.io/astral-sh/uv:0.5.14 /uv /bin/

COPY . /root/.local/share/GEP

WORKDIR /root/.local/share/GEP

RUN ./install.sh -d && \
poetry install --with dev
uv sync --group dev
5 changes: 3 additions & 2 deletions Dockerfile.arch
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ RUN pacman -Syu --noconfirm && \
curl \
wget \
vim && \
curl -sSL https://install.python-poetry.org | python3 - && \
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && \
~/.fzf/install --all

ENV PATH="/root/.fzf/bin:/root/.local/bin:${PATH}"

COPY --from=ghcr.io/astral-sh/uv:0.5.14 /uv /bin/

COPY . /root/.local/share/GEP

WORKDIR /root/.local/share/GEP

RUN ./install.sh -d && \
poetry install --with dev
uv sync --group dev
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PYTHON=$VENV_PATH/bin/python
echo "Installing dependencies"
"$PYTHON" -m pip install -U pip
if [[ $DEV == 1 ]]; then
poetry install --with dev
uv sync --group dev
else
"$VENV_PATH/bin/pip" install --no-cache-dir -e .
fi
Expand Down
243 changes: 0 additions & 243 deletions poetry.lock

This file was deleted.

5 changes: 0 additions & 5 deletions poetry.toml

This file was deleted.

37 changes: 17 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
[tool.poetry]
[project]
name = "GEP"
version = "2024.05"
description = "GDB Enhanced Prompt"
authors = ["Alan Li <61896187+lebr0nli@users.noreply.github.com>"]
readme = "README.md"
packages = [
{ include = "gdbinit-gep.py" },
authors = [
{name = "Alan Li", email = "61896187+lebr0nli@users.noreply.github.com"},
]
requires-python = "<4.0,>=3.8"
dependencies = [
"prompt-toolkit==3.0.46",
]

[tool.poetry.dependencies]
python = "^3.8"
prompt-toolkit = "3.0.46"

[tool.poetry.group.dev]
optional = true

[tool.poetry.group.dev.dependencies]
ruff = "^0.4.4"
mypy = "^1.10.0"
types-gdb = "^12.1.4.20240408"
vermin = "^1.6.0"
pytest = "8.2.0"
[dependency-groups]
dev = [
"ruff<1.0.0,>=0.4.4",
"mypy<2.0.0,>=1.10.0",
"types-gdb<13.0.0.0,>=12.1.4.20240408",
"vermin<2.0.0,>=1.6.0",
"pytest==8.2.0",
]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.uv]
default-groups = []

[tool.ruff]
line-length = 100
Expand Down
Loading

0 comments on commit 31ff60e

Please sign in to comment.