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
40 changes: 12 additions & 28 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,23 @@ jobs:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv
- name: Checkout the repository
uses: actions/checkout@v4

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

# ----------------------------------------------
# install dependencies if cache does not exist
# ----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install
python-version: ${{ matrix.python-version }}

- name: Install dependencies
- name: Sync the environment with what is in uv.lock
run: |
poetry install
uv sync --frozen

- name: Test with pytest
run: |
poetry run pytest
uv run --frozen pytest

- name: Lint with black
run: |
poetry run black --check src/
uv run --frozen black --check src/
uv run --frozen black --check tests/
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ that make Altair visualizations out of population data in conventional ways.

This is pre-release software and comes with no warranty.

To get started, install [poetry](https://github.com/python-poetry/), then:
To get started, install [uv](https://docs.astral.sh/uv/getting-started/installation/), then:

```
poetry install
poetry run pytest
uv sync
uv run pytest
```

41 changes: 21 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,29 @@ authors = [
{name = "eve n.u.", email = "eve@eatbigger.fish"},
]
readme = "README.md"
packages = [{include = "lpm_plot", from = "src"}]
requires-python = ">=3.12"

[tool.poetry]
requires-poetry = ">=2.0"

[tool.poetry.dependencies]
python = "^3.12"
altair = "^5.4.1"
pandas = "^2.2.3" # Need pandas because of altair
polars = "^1.7.1"
pyarrow = "^18.1.0"
vegafusion = "^1.6.9"
vegafusion-python-embed = "^1.6.9"
vl-convert-python = "^1.7.0"
scipy = "^1.14.1"
dependencies = [
"polars>=1.7.1",
"altair>=5.4.1",
"pandas>=2.2.3", # Need pandas because of altair
"pyarrow>=18.1.0",
"vegafusion>=1.6.9",
"vegafusion-python-embed>=1.6.9",
"vl-convert-python>=1.7.0",
"scipy>=1.14.1",
]

[tool.poetry.group.dev.dependencies]
black = "^24.8.0"
jupyter = "^1.1.1"
pytest = "^8.3.3"
[dependency-groups]
dev = [
"black>=24.8.0",
"jupyter>=1.1.1",
"pytest>=8.3.3",
]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/lpm_plot"]
Loading