Skip to content

Conversation

@tfehlmann
Copy link
Contributor

@tfehlmann tfehlmann commented Jan 30, 2026

Summary

  • Migrate packaging from imperative setup.py to declarative PEP 621 metadata in pyproject.toml
  • Add pixi configuration for automatic binary dependency management via conda-forge
  • Delete setup.py

Details

pyproject.toml migration

All setup() arguments are converted to their PEP 621 equivalents:

  • Build system: setuptools>=68.0 with setuptools.build_meta backend
  • Project metadata: name, description, readme, license, Python version requirement
  • Dynamic version: read from pylabrobot/version.txt via [tool.setuptools.dynamic]
  • Dependencies: all install_requires and extras_require groups preserved with identical pins
  • Entry points: lh-server and plr-gui console scripts
  • Package discovery: namespaces = false to match find_packages() behavior exactly
  • Package data: visualizer/* and version.txt unchanged

Existing [tool.ruff] configuration is preserved.

Pixi configuration

Adds [tool.pixi.*] sections for automatic binary dependency management:

Feature Conda Package Purpose
fw libusb USB device communication
plate-reading libftdi FTDI device communication
inheco libhidapi HID device communication
dev all of the above Development environment

Each feature environment includes editable PyPI installation with the corresponding extras.

Pixi tasks mirror the Makefile: test, lint, format, format-check, typecheck.

Users who do not use pixi are completely unaffected — pip install works identically.

Verification

  • pip install -e '.[dev]' succeeds
  • python -m build produces valid wheel and sdist
  • Wheel file list is identical to the previous setup.py build (verified via diff)
  • python -c "from pylabrobot import __version__" returns 0.1.6
  • Entry points (lh-server, plr-gui) resolve correctly
  • All 821 tests pass via both python -m pytest and pixi run -e dev test
  • No CI workflow changes required

Test plan

  • pip install -e '.[dev]' works
  • python -m build produces valid artifacts
  • All tests pass
  • Entry points resolve
  • CI passes without changes

…ixi configuration

Replace the imperative setup.py with declarative PEP 621 metadata in
pyproject.toml. All dependencies, optional extras, entry points, and
package data are preserved identically — verified via wheel content
diff against the previous setup.py build.

Add pixi configuration for automatic binary dependency management
(libusb, libftdi, libhidapi) via conda-forge, with tasks mirroring
the Makefile (test, lint, format, typecheck). Users who do not use
pixi are unaffected; pip install continues to work as before.
pixi.lock Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be dropped, although since you pinned all packages that's just a more precise pinning, but will drop it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants