Skip to content

Commit bb5a428

Browse files
committed
Merge branch 'main' into dev-force-identical
2 parents 1ce2aa4 + 8faca6c commit bb5a428

37 files changed

+624
-555
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python: ["3.8", "3.9", "3.10", "3.11"]
23+
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2424
os: ["ubuntu-latest"]
2525
pytest_opts: ["--workers 4 --tests-per-worker 1"]
2626
requirements: [""]
@@ -96,7 +96,7 @@ jobs:
9696
9797
- name: run Posit Connect
9898
run: |
99-
docker-compose up --build -d
99+
docker compose up --build -d
100100
make dev
101101
env:
102102
RSC_LICENSE: ${{ secrets.RSC_LICENSE }}

.github/workflows/code-checks.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,20 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-python@v4
1818
- uses: pre-commit/[email protected]
19+
20+
pyright:
21+
name: "Run Pyright"
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-python@v4
26+
with:
27+
python-version: 3.12 # Use the maximum version supported by python-pins
28+
- name: Install dependencies
29+
shell: bash
30+
run: |
31+
python -m pip install --upgrade pip
32+
python -m pip install -e .[check]
33+
- uses: jakebailey/pyright-action@v2
34+
with:
35+
version: 1.1.372 # Manually sync with setup.cfg

.pre-commit-config.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
44
rev: v2.4.0
55
hooks:
6-
- id: flake8
7-
# line too long and line before binary operator (black is ok with these)
8-
types:
9-
- python
106
- id: trailing-whitespace
117
- id: end-of-file-fixer
128
- id: check-yaml
139
args: ["--unsafe"]
1410
- id: check-added-large-files
15-
- repo: https://github.com/psf/black
16-
rev: 22.3.0
11+
- repo: https://github.com/charliermarsh/ruff-pre-commit
12+
rev: "v0.5.4" # Sync with pyproject.toml
1713
hooks:
18-
- id: black
14+
- id: ruff
15+
args: ["--fix"]
16+
- id: ruff-format

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ RSC_API_KEYS=pins/tests/rsconnect_api_keys.json
77
dev: pins/tests/rsconnect_api_keys.json
88

99
dev-start:
10-
docker-compose up -d
11-
docker-compose exec -T rsconnect bash < script/setup-rsconnect/add-users.sh
10+
docker compose up -d
11+
docker compose exec -T rsconnect bash < script/setup-rsconnect/add-users.sh
1212
# curl fails with error 52 without a short sleep....
1313
sleep 5
1414
curl -s --retry 10 --retry-connrefused http://localhost:3939
1515

1616
dev-stop:
17-
docker-compose down
17+
docker compose down
1818
rm -f $(RSC_API_KEYS)
1919

2020
$(RSC_API_KEYS): dev-start
@@ -41,7 +41,7 @@ docs-clean:
4141
requirements/dev.txt: setup.cfg
4242
@# allows you to do this...
4343
@# make requirements | tee > requirements/some_file.txt
44-
@pip-compile setup.cfg --rebuild --extra doc --extra test --output-file=- > $@
44+
@pip-compile setup.cfg --rebuild --extra doc --extra test --extra check --output-file=- > $@
4545

4646
binder/requirements.txt: requirements/dev.txt
4747
cp $< $@

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pins
22
<a href="https://rstudio.github.io/pins-python/"><img src="docs/logo.png" align="right" height="138" /></a>
33

4-
![PyPI - Version](https://img.shields.io/pypi/v/pins.svg) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pins)
4+
![PyPI - Version](https://img.shields.io/pypi/v/pins.svg) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pins) [![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
55

66

77

docs/get_started.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ That said, most boards transmit pins over HTTP, and this is going to be slow and
8282
As a general rule of thumb, we don't recommend using pins with files over 500 MB.
8383
If you find yourself routinely pinning data larger that this, you might need to reconsider your data engineering pipeline.
8484

85-
Storing your data/object as a pin works well when you write from a single source or process. It is _not_ appropriate when multiple sources or processes need to write to the same pin; since the pins package reads and writes files, it cannot manage concurrent writes.
85+
Storing your data/object as a pin works well when you write from a single source or process. It is _not_ appropriate when multiple sources or processes need to write to the same pin; since the pins package reads and writes files, it cannot manage concurrent writes. It is also not appropriate for high frequency writes (multiple times per second).
8686

8787
- **Good** use for pins: an ETL pipeline that stores a model or summarized dataset once a day
8888
- **Bad** use for pins: a Shiny app that collects data from users, who may be using the app at the same time

pins/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# Imports ----
1212
from .cache import cache_prune, cache_info
1313
from .constructors import (
14-
board_deparse,
1514
board_folder,
1615
board_temp,
1716
board_local,
@@ -25,3 +24,4 @@
2524
board_gcs,
2625
board,
2726
)
27+
from .boards import board_deparse

pins/_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Union
21
from io import IOBase
2+
from typing import Union
33

44
StrOrFile = Union[str, IOBase]

0 commit comments

Comments
 (0)