Skip to content

Commit 8a4faf1

Browse files
maint: add rdata as a testing dependency (#265)
* Add rdata as a dependency * Don't explicitly install rdata an extra time. Don't reference [test] in `pip install -e .` * Revert removal of `[test]` in cases where it is still needed. * Add read_rds workaround for rdata on Python 3.8. * Remove `hasattr` check * Add type conversion for 3.8 support of rds load * Use f.name for 3.8 rdata call * Use f.name rather than type conversion. * Enable `reportMissingImports` in pyright * Isolate protected import for pyright * Disable pyright for protected optional import * Fix typo 🤦‍♂️ * dropped 3.8, no longer need workaround --------- Co-authored-by: isabelizimm <[email protected]>
1 parent 0ae055e commit 8a4faf1

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ jobs:
9191
run: |
9292
python -m pip install --upgrade pip
9393
python -m pip install -r requirements/dev.txt
94-
python -m pip install rdata
95-
python -m pip install -e .[test]
94+
python -m pip install -e .
9695
9796
- name: run Posit Connect
9897
run: |

pins/drivers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def load_data(
114114

115115
elif meta.type == "rds":
116116
try:
117-
import rdata
117+
import rdata # pyright: ignore[reportMissingImports]
118118

119119
return rdata.read_rds(f)
120120
except ModuleNotFoundError:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ test = [
6060
"pytest-dotenv",
6161
"pytest-parallel",
6262
"s3fs",
63+
"rdata",
6364
]
6465

6566
[build-system]
@@ -102,7 +103,6 @@ reportArgumentType = false
102103
reportAttributeAccessIssue = false
103104
reportCallIssue = false
104105
reportIncompatibleMethodOverride = false
105-
reportMissingImports = false
106106
reportMissingTypeStubs = false
107107
reportOptionalMemberAccess = false
108108
reportOptionalSubscript = false

requirements/dev.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,8 @@ pyzmq==26.2.0
360360
# jupyter-client
361361
quartodoc==0.9.1
362362
# via pins (pyproject.toml)
363+
rdata==0.11.2
364+
# via pins (pyproject.toml)
363365
referencing==0.35.1
364366
# via
365367
# jsonschema
@@ -442,6 +444,8 @@ wheel==0.45.1
442444
# via pip-tools
443445
wrapt==1.17.0
444446
# via aiobotocore
447+
xarray==2024.6.0
448+
# via rdata
445449
xxhash==3.5.0
446450
# via pins (pyproject.toml)
447451
yarl==1.18.3

0 commit comments

Comments
 (0)