simple_python()now pins the managed environment's Python interpreter to a known-good version (newpython_versionargument, default"3.12", overridable viaoptions(nat.python.python_version=)) instead of letting reticulate pick, which on a fresh install can be a bleeding-edge Python that key packages do not yet support. An existing environment at a different version is kept, with a warning pointing atsimple_python("cleanenv")(#10).pandas2df()now converts pandas extension-array columns that reticulate leaves unconverted, in particular pandas 3.0's default Arrow-backed string dtype (PDEP-14): string columns become R character vectors and other Arrow columns (e.g.int64[pyarrow]ids) map to the same R types as their native-dtype equivalents (#9).simple_python()pins the baseline install topandas < 3for now. Althoughpandas2df()handles pandas 3.0, the pin is retained as a caution while the wider ecosystem settles on pandas 3; lift it (back topandas) once ready.- CI now provisions Python through
simple_python()itself (the end-user path), rather than a bespokereticulate::py_install()call. - Testing: added a test-coverage workflow reporting to Codecov (#5) and substantially expanded coverage of previously-untested paths, from 34% to 66% (#6).
First tagged release. A small shared layer of Python interoperability and environment management for the natverse, built on reticulate. fafbseg, bancr and seatabler depend on it for both concerns.
simple_python()provisions and manages a shared miniconda environment, with curated bundles for the FlyWire/connectomics ecosystem:"basic"(cloud-volume + seatable_api + CAVEclient),"full"(+ navis + fafbseg),"extra"(+ skeletonisation tooling),"minimal"(just pandas, nat.python's own baseline; numpy rides in with it), and"none"for an env with no bundle.check_reticulate()checks a usable Python is available, guiding users tosimple_python()when not.
check_module()— install/load gate that checks whether a module is present (from distribution metadata, without importing), imports it, and on absence offers to install it or errors with guidance.module_available(),module_version()/forget_module_version(),py_module_info()for introspecting the environment.
pandas2df()converts pandasDataFrames to R, recovering 64-bit id columns asbit64, flattening object/numpy columns and coercing datetimes.- Fast-path for pandas nullable
Int64/UInt64extension columns, which reticulate otherwise converts cell-by-cell (~24x faster on large id-heavy frames; output byte-for-byte identical). - A
bigintargument and unified integer-column classification.
- Fast-path for pandas nullable
null2na()helper forNone→NA.
pyids2bit64(),rids2pyint(),rids2raw()round-trip large integer identifiers between R (bit64), numpy and raw bytes without precision loss;int64_overflows()flags values that would overflow.
ts2pydatetime()converts R timestamps to Python datetimes.