Skip to content
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
16 changes: 5 additions & 11 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,16 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Get dependencies cache key
id: dependencies-cache-key
run: echo "hash=$(md5sum pyproject.toml | awk '{print $1}')" >> $GITHUB_OUTPUT

- name: Setup rye
uses: eifinger/setup-rye@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: '0.39.0'
cache-prefix: ${{ steps.dependencies-cache-key.outputs.hash }}
enable-cache: false

- name: Formatting
run: rye fmt --check
run: uv run ruff format --check .

- name: Linting
run: rye lint
run: uv run ruff check .

- name: Static type checks (pyright)
run: make pyright
11 changes: 3 additions & 8 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Get dependencies cache key
id: dependencies-cache-key
run: echo "hash=$(md5sum pyproject.toml | awk '{print $1}')" >> $GITHUB_OUTPUT
- name: Setup rye
uses: eifinger/setup-rye@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: '0.39.0'
cache-prefix: ${{ steps.dependencies-cache-key.outputs.hash }}
enable-cache: false
- name: Run tests
run: make coverage.xml
- name: Upload coverage to Codecov
Expand Down
8 changes: 4 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
all: test

test: .venv
rye run pytest -s -v -x
uv run pytest -s -v -x

.venv:
rye sync
uv sync

coverage.xml: .venv
rye run pytest --junitxml=junit.xml --cov=valentbind --cov-report xml:coverage.xml
uv run pytest --junitxml=junit.xml --cov=valentbind --cov-report xml:coverage.xml

pyright: .venv
rye run pyright valentbind
uv run pyright valentbind

clean:
rm -rf coverage.xml
18 changes: 8 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,26 @@ authors = [
{ name = "Aaron Meyer", email = "ameyer@ucla.edu" }
]
dependencies = [
"numpy>=1.26",
"numpy>=2.3",
"scipy>=1.12",
"jax>=0.4",
"jaxlib>=0.4",
"jaxopt>=0.8",
"jax>=0.8",
"optimistix>=0.0.11",
]
readme = "README.md"
requires-python = ">= 3.10"
requires-python = ">= 3.11"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.rye]
managed = true
dev-dependencies = [
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"pytest-cov>=6.0",
"pyright>=1.1",
"pandas>=2.2.2",
"seaborn>=0.13.2",
"matplotlib>=3.9.2",
"matplotlib>=3.10",
]

[tool.hatch.metadata]
Expand Down
89 changes: 0 additions & 89 deletions requirements-dev.lock

This file was deleted.

39 changes: 0 additions & 39 deletions requirements.lock

This file was deleted.

Loading
Loading