Skip to content

Conversation

@rickwierenga
Copy link
Member

Summary

Renames Hamilton tip creator functions from ambiguous names like low_volume_tip_with_filter to descriptive names that match the tip rack naming pattern (e.g., hamilton_tip_10uL_filter). This creates consistency across the Hamilton resources API and makes tip functions easier to discover and understand.

Changes

All Hamilton tip creator functions now follow the pattern: hamilton_tip_{volume}uL[_filter][_variant]

Renamed Functions

10 µL tips:

  • low_volume_tip_no_filterhamilton_tip_10uL
  • low_volume_tip_with_filterhamilton_tip_10uL_filter

50 µL tips:

  • fifty_ul_tip_no_filterhamilton_tip_50uL
  • fifty_ul_tip_with_filterhamilton_tip_50uL_filter

300 µL tips:

  • standard_volume_tip_no_filterhamilton_tip_300uL
  • standard_volume_tip_with_filterhamilton_tip_300uL_filter
  • slim_standard_volume_tip_with_filterhamilton_tip_300uL_filter_slim
  • ultrawide_standard_volume_tip_with_filterhamilton_tip_300uL_filter_ultrawide

1000 µL tips:

  • high_volume_tip_no_filterhamilton_tip_1000uL
  • high_volume_tip_with_filterhamilton_tip_1000uL_filter
  • wide_high_volume_tip_with_filterhamilton_tip_1000uL_filter_wide
  • ultrawide_high_volume_tip_with_filterhamilton_tip_1000uL_filter_ultrawide

4000 & 5000 µL tips:

  • four_ml_tip_with_filterhamilton_tip_4000uL_filter
  • five_ml_tiphamilton_tip_5000uL
  • five_ml_tip_with_filterhamilton_tip_5000uL_filter

Backward Compatibility

  • All old function names remain available and fully functional
  • Old functions now call new functions internally
  • Each deprecated function includes a DeprecationWarning with clear migration path
  • All internal tip rack definitions updated to use new names
  • User code continues to work without changes

Migration Example

# Old code (still works, but shows deprecation warning)
from pylabrobot.resources.hamilton import low_volume_tip_with_filter
tip = low_volume_tip_with_filter()

# New code (recommended)
from pylabrobot.resources.hamilton import hamilton_tip_10uL_filter
tip = hamilton_tip_10uL_filter()

Test Plan

  • All existing tests pass
  • Deprecation warnings tested and working correctly
  • New function names tested for correctness
  • All tip rack definitions updated and verified
  • No breaking changes to public API

Benefits

  1. Consistency: Tip functions now match tip rack naming (e.g., hamilton_96_tiprack_10uL_filter uses hamilton_tip_10uL_filter)
  2. Clarity: Volume clearly stated in microliters (10uL vs "low volume")
  3. Discoverability: Easy to find tips by volume in autocomplete
  4. Maintainability: Logical naming makes code easier to understand and maintain

🤖 Generated with Claude Code

rickwierenga and others added 2 commits January 25, 2026 22:44
Renames Hamilton tip creator functions from ambiguous names like
`low_volume_tip_with_filter` to descriptive names matching the tip
rack naming pattern (e.g., `hamilton_tip_10uL_filter`).

Changes:
- Rename 10 µL tips: low_volume_tip_* → hamilton_tip_10uL*
- Rename 50 µL tips: fifty_ul_tip_* → hamilton_tip_50uL*
- Rename 300 µL tips: standard_volume_tip_* → hamilton_tip_300uL*
- Rename 1000 µL tips: high_volume_tip_* → hamilton_tip_1000uL*
- Rename 4000 µL tips: four_ml_tip_* → hamilton_tip_4000uL*
- Rename 5000 µL tips: five_ml_tip* → hamilton_tip_5000uL*
- Add variant suffixes: _slim, _wide, _ultrawide for special tip types
- Old functions deprecated with warnings pointing to new names
- Update all tip rack definitions to use new function names

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove version numbers and Sphinx directive syntax from deprecation
docstrings. Use simple one-line format: 'Deprecated. Use :func:...'

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR renames Hamilton tip creator functions to follow a consistent naming convention that matches the tip rack naming pattern. All functions are renamed from ambiguous names like low_volume_tip_with_filter to descriptive names like hamilton_tip_10uL_filter. The refactoring maintains full backward compatibility by keeping the old function names as deprecation wrappers.

Changes:

  • Renamed 15 tip creator functions to follow the pattern hamilton_tip_{volume}uL[_filter][_variant]
  • Added deprecation warnings to all old function names with clear migration paths
  • Updated all internal tip rack definitions to use the new function names
  • Improved documentation with catalog numbers and clearer descriptions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pylabrobot/resources/hamilton/tip_creators.py Converted old function implementations to deprecation wrappers, added new functions with consistent naming pattern following hamilton_tip_{volume}uL[_filter][_variant] convention
pylabrobot/resources/hamilton/tip_racks.py Updated all imports and internal references from old function names to new function names

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"""

def hamilton_tip_5000uL_filter(name: Optional[str] = None) -> HamiltonTip:
"""Hamilton 5000 µL tip with filter (`tt25` in venus)"""
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

Both hamilton_tip_5000uL and hamilton_tip_5000uL_filter reference the same Venus tip type (tt25). These should likely have different Venus tip type identifiers since one has a filter and one does not. Please verify the correct Venus tip types for these two functions.

Suggested change
"""Hamilton 5000 µL tip with filter (`tt25` in venus)"""
"""Hamilton 5000 µL tip with filter"""

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

good point, but I have no idea where this is defined

@rickwierenga rickwierenga merged commit e6e1878 into main Jan 26, 2026
10 checks passed
@rickwierenga rickwierenga deleted the feature/rename-hamilton-tips branch January 26, 2026 20:43
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