Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch from rye to uv #47

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
FROM ubuntu:24.04
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN apt-get update && apt-get install -y \
zsh git make curl \
zsh git make \
npm

# chromium dependencies
RUN apt-get install -y fonts-noto-color-emoji libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libxkbcommon0 libxdamage1 libpango-1.0-0 libcairo2 libasound2t64

USER ubuntu
RUN curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION=--yes bash

ENV LC_ALL="en_US.UTF-8"
USER ubuntu
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.12.2
3.12
21 changes: 12 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ deps-js-update:
cd frontend; npx npm-check-updates -i

deps-py:
rye sync
uv sync

deps-py-update:
rye lock --update-all
uv lock --upgrade

deps: deps-js deps-py

Expand All @@ -34,26 +34,29 @@ test: test-js

## Utils
run:
cd example; rye run fava example.beancount
cd example; uv run fava example.beancount

run-debug:
cd example; rye run fava --debug example.beancount
cd example; uv run fava --debug example.beancount

lint:
cd frontend; npx tsc --noEmit
rye run mypy src/fava_portfolio_returns/__init__.py
rye run pylint src/fava_portfolio_returns/__init__.py
uv run mypy src/fava_portfolio_returns/__init__.py
uv run pylint src/fava_portfolio_returns/__init__.py

format:
cd frontend; npx prettier -w . ../src/fava_portfolio_returns/templates/*.css
rye run black src/fava_portfolio_returns/__init__.py
find example -name '*.beancount' -exec rye run bean-format -c 59 -o "{}" "{}" \;
uv run black src/fava_portfolio_returns/__init__.py
find example -name '*.beancount' -exec uv run bean-format -c 59 -o "{}" "{}" \;

ci:
make lint
make build
make run &
make test

make format

# https://github.com/astral-sh/uv/issues/7533
git restore uv.lock

git diff --exit-code
1 change: 1 addition & 0 deletions frontend/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies = [
"protobuf<3.21",
]
readme = "README.md"
requires-python = ">= 3.8"
requires-python = ">= 3.10"
license = {text = "GPL-2.0"}

[project.urls]
Expand All @@ -21,9 +21,8 @@ Source = "https://github.com/andreasgerstmayr/fava-portfolio-returns"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.rye]
managed = true
dev-dependencies = [
[dependency-groups]
dev = [
"black>=24.3.0",
"mypy>=1.9.0",
"pylint>=3.1.0",
Expand All @@ -46,6 +45,7 @@ disable = [
"missing-function-docstring",
"line-too-long",
"too-many-arguments",
"too-many-positional-arguments",
"too-many-locals",
"too-many-branches",
"too-many-statements",
Expand Down
189 changes: 0 additions & 189 deletions requirements-dev.lock

This file was deleted.

Loading