Your PR has 3 merge conflicts in the following files:
src/arraybridge/decorators.py- 1 conflict (import statements)src/arraybridge/stack_utils.py- 1 conflict (import statements)src/arraybridge/utils.py- 3 conflicts (docstring and import placement)
All conflicts stem from the same root cause: package renaming from openhcs to arraybridge that happened in the main branch.
<<<<<<< HEAD
from arraybridge.types import MemoryType, VALID_MEMORY_TYPES
from arraybridge.utils import optional_import
from arraybridge.oom_recovery import _execute_with_oom_recovery
from arraybridge.framework_ops import _FRAMEWORK_OPS
=======
import numpy as np
from openhcs.constants.constants import MemoryType
>>>>>>> origin/main- Your branch (HEAD): Uses
arraybridge.types(correct - package was renamed) - Main branch: Uses
openhcs.constants.constants(old package name) and has extranumpyimport
Keep HEAD version but ensure numpy import exists elsewhere if needed:
from arraybridge.types import MemoryType, VALID_MEMORY_TYPES
from arraybridge.utils import optional_import
from arraybridge.oom_recovery import _execute_with_oom_recovery
from arraybridge.framework_ops import _FRAMEWORK_OPSNote: Check if numpy as np is needed later in the file. If so, add it after these imports.
<<<<<<< HEAD
from arraybridge.types import GPU_MEMORY_TYPES, MemoryType
=======
from openhcs.constants.constants import GPU_MEMORY_TYPES, MemoryType
>>>>>>> origin/main- Your branch: Uses
arraybridge.types(correct) - Main branch: Uses
openhcs.constants.constants(old name)
Keep HEAD version - simple and straightforward:
from arraybridge.types import GPU_MEMORY_TYPES, MemoryTypeThis is the most complex conflict with multiple merge markers.
<<<<<<< HEAD
Memory conversion utility functions for arraybridge.
This module provides utility functions for memory conversion operations.
=======
Memory conversion utility functions for OpenHCS.
This module provides utility functions for memory conversion operations,
supporting Clause 251 (Declarative Memory Conversion Interface) and
Clause 65 (Fail Loudly).
>>>>>>> origin/mainResolution: Keep main's more detailed docstring but update package name:
"""
Memory conversion utility functions for arraybridge.
This module provides utility functions for memory conversion operations,
supporting Clause 251 (Declarative Memory Conversion Interface) and
Clause 65 (Fail Loudly).
"""This is the critical conflict. The issue is about import order:
- Your branch (HEAD): Imports are at top (before
optional_importfunction) - Main branch: Imports are at bottom (after
optional_importfunction)
# HEAD version (top placement):
from typing import Any, Optional
# Then later at line 94:
from arraybridge.types import MemoryType
from .exceptions import MemoryConversionError
from .framework_config import _FRAMEWORK_CONFIG
logger = logging.getLogger(__name__)# Main version (better placement):
from typing import Any, Optional
from arraybridge.types import MemoryType
from .exceptions import MemoryConversionError
from .framework_config import _FRAMEWORK_CONFIG
logger = logging.getLogger(__name__)
# Then _ModulePlaceholder class and optional_import functionResolution: Keep main branch's placement (imports at line 19, NOT line 94). This is better because:
- Standard Python convention: imports at the top
optional_importdoesn't depend on these imports- Avoids potential circular import issues
-
Merge main into your branch:
git fetch origin git merge origin/main
-
Resolve decorators.py:
# Edit the file and keep: from arraybridge.types import MemoryType, VALID_MEMORY_TYPES from arraybridge.utils import optional_import from arraybridge.oom_recovery import _execute_with_oom_recovery from arraybridge.framework_ops import _FRAMEWORK_OPS # Remove conflict markers and the openhcs import
-
Resolve stack_utils.py:
# Keep: from arraybridge.types import GPU_MEMORY_TYPES, MemoryType -
Resolve utils.py:
- Update docstring to mention "arraybridge" with full description
- Place imports at line 19 (after
from typing import Any, Optional) - Remove duplicate imports at line 94
-
Mark as resolved and commit:
git add src/arraybridge/decorators.py git add src/arraybridge/stack_utils.py git add src/arraybridge/utils.py git commit -m "Merge main and resolve package rename conflicts" git push
If the conflicts are too complex:
-
Accept main's version completely:
git fetch origin git merge origin/main -X theirs
-
Verify the code still works:
python -c "import arraybridge; print(arraybridge.__version__)" -
Your documentation changes should still be intact (they don't conflict)
-
Commit and push:
git push
The main branch underwent a package rename from openhcs to arraybridge. Your documentation branch was based on an earlier commit (before the rename), so when you try to merge:
- Your branch has the OLD package structure
- Main branch has the NEW package structure
- Git can't auto-merge because import paths are different
After resolving conflicts, verify everything works:
# 1. Check imports work
python -c "from arraybridge.types import MemoryType; print(MemoryType.NUMPY)"
# 2. Build docs to ensure no broken references
cd docs && make html
# 3. Run a basic test
python -c "from arraybridge import detect_memory_type; import numpy as np; print(detect_memory_type(np.array([1,2,3])))"Use Option 1 (Manual Resolution) with this exact resolution:
- decorators.py: Keep HEAD (your imports from
arraybridge.*) - stack_utils.py: Keep HEAD (your imports from
arraybridge.*) - utils.py:
- Docstring: Use main's detailed version but say "arraybridge"
- Imports: Use main's placement (line 19, not line 94)
- Content: Both versions are essentially the same after imports
This preserves your work while properly integrating with the package rename.