Skip to content

Commit

Permalink
Merge pull request #5 from zkurtz/uv-not-poetry
Browse files Browse the repository at this point in the history
uv not poetry/pyenv
  • Loading branch information
zkurtz authored Nov 16, 2024
2 parents 91e1553 + ef8e971 commit 999cfe4
Show file tree
Hide file tree
Showing 8 changed files with 310 additions and 1,157 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,18 @@ jobs:

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12.2'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi
pip install uv
uv sync
- name: Check code quality with Ruff
run: ruff check .
run: uv run ruff check .

- name: Check type hints with pyright
run: pyright
run: uv run pyright

- name: Run unit tests with pytest
run: pytest
run: uv run pytest
29 changes: 0 additions & 29 deletions .github/workflows/publish.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ __pycache__/
# Build artifacts
dist/
build/
*.egg-info/

# IDE-specific files
.idea/
.vscode/

# Dev ops
dev.py
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.2
26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,14 @@ assert data == dummio.yaml.load(path)

## Installation

We're [on pypi](https://pypi.org/project/dummio/) so you can just `pip install dummio` or `poetry add dummio` etc.
We're [on pypi](https://pypi.org/project/dummio/), so `pip install dummio`.

## Development

1. Install poetry: `curl -sSL https://install.python-poetry.org | python3 -`
1. Install [pyenv and its virtualenv plugin](https://github.com/pyenv/pyenv-virtualenv).
1. Create a dev ops virtual environment:
```
PYTHON_VERSION=3.12.2
function makenv {
# clean up any existing env
source deactivate
pyenv uninstall --force $1
# build new venv
pyenv install $PYTHON_VERSION --skip-existing
pyenv global $PYTHON_VERSION
pyenv virtualenv $PYTHON_VERSION $1
pyenv activate $1
poetry install --with extras --with dev
pre-commit install
poetry lock --no-update
}
makenv dummio
git clone [email protected]:zkurtz/dummio.git
cd dummio
pip install uv
uv sync --group extras
source .venv/bin/activate
```
1,073 changes: 0 additions & 1,073 deletions poetry.lock

This file was deleted.

46 changes: 19 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,41 +1,33 @@
[tool.poetry]
[project]
name = "dummio"
version = "0.0.3"
description = "Easiest-possible IO for basic file types."
authors = ["Zach Kurtz <[email protected]>"]
authors = [{ name = "Zach Kurtz", email = "[email protected]" }]
readme = "README.md"
homepage = "https://github.com/zkurtz/dummio"
requires-python = ">=3.10"

[dependency-groups]
dev = [
"pre-commit >=3.8.0",
"pyright >=1.1.378",
"ruff >=0.7.4",
"pytest >=8.3.2",
]
extras = [
"pyyaml >=6.0.2",
]

[project.urls]
Source = "https://github.com/zkurtz/dummio"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.uv]
package = true

[tool.poetry.dependencies]
python = "^3.10"

[tool.poetry.group.dev.dependencies]
ruff = "^0.6.3"
pyright = "^1.1.378"
pytest = "^8.3.2"
pre-commit = "^3.8.0"
build = "^1.2.1"
twine = "^5.1.1"

[tool.poetry.group.extras.dependencies]
pyyaml = "^6.0.2"
[tool.pytest.ini_options]
testpaths = ["tests",]

[tool.ruff]
line-length = 120

[tool.ruff.lint]
select = ["E", "F", "I"]
ignore = []

[tool.pyright]
include = ["dummio"]

[tool.pytest.ini_options]
testpaths = ["tests"]
include = ["dummio", "tests"]
275 changes: 275 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

0 comments on commit 999cfe4

Please sign in to comment.