6
6
[ ![ CI] ( https://github.com/pymmcore-plus/pymmcore-nano/actions/workflows/ci.yml/badge.svg )] ( https://github.com/pymmcore-plus/pymmcore-nano/actions/workflows/ci.yml )
7
7
[ ![ codecov] ( https://codecov.io/gh/pymmcore-plus/pymmcore-nano/branch/main/graph/badge.svg )] ( https://codecov.io/gh/pymmcore-plus/pymmcore-nano )
8
8
9
- Experimental python bindings for [ CMMCore] ( https://github.com/micro-manager/mmCoreAndDevices )
10
- (the device abstraction layer for micro-manager) using [ nanobind] ( https://nanobind.readthedocs.io/en/latest/ ) .
11
-
12
- This package can be used as a (mostly) drop-in replacement for [ ` pymmcore ` ] ( https://pypi.org/project/pymmcore/ ) .
13
- There are a few slight differences in behavior. You are encouraged to try it where you might use
14
- pymmcore; and [ let us know] ( https://github.com/pymmcore-plus/pymmcore-nano/issues ) if you run into any issues!
9
+ Experimental python bindings for
10
+ [ CMMCore] ( https://github.com/micro-manager/mmCoreAndDevices ) (the device
11
+ abstraction layer for micro-manager) using
12
+ [ nanobind] ( https://nanobind.readthedocs.io/en/latest/ ) instead of SWIG.
13
+
14
+ This package can be used as a drop-in replacement for
15
+ [ ` pymmcore ` ] ( https://pypi.org/project/pymmcore/ ) . There are a few slight
16
+ differences in behavior. You are encouraged to try it where you might use
17
+ pymmcore; and [ let us
18
+ know] ( https://github.com/pymmcore-plus/pymmcore-nano/issues ) if you run into any
19
+ issues!
15
20
16
21
## Installation
17
22
@@ -33,45 +38,45 @@ For example, the version `11.3.0.71.2` refers to:
33
38
34
39
- MMCore version 11.3.0
35
40
- Device interface 71
36
- - pymmcore-nano build number of 2 (this is a zero indexed version that resets each time
37
- the MMCore or Device Interface versions increment)
41
+ - pymmcore-nano build number of 2 (this is a zero indexed version that resets
42
+ each time the MMCore or Device Interface versions increment)
38
43
39
44
## For Developers
40
45
41
46
### Clone repo
42
47
43
48
``` sh
44
49
git clone https://github.com/pymmcore-plus/pymmcore-nano.git
45
- git submodule update --init
50
+ cd pymmcore-nano
46
51
```
47
52
48
53
### Setup dev environment (editable install)
49
54
50
- Make sure you have uv installed: < https://docs.astral.sh/uv/getting-started/installation/ >
55
+ Make sure you have uv installed:
56
+ < https://docs.astral.sh/uv/getting-started/installation/ >
51
57
52
- This project uses ` just ` as a task runner.
53
- If you have ` just ` installed (e.g. ` brew install just ` ), you can fully setup the project with:
58
+ This project uses ` just ` as a task runner. If you have ` just ` installed (e.g.
59
+ ` brew install just ` ), you can fully setup the project with:
54
60
55
61
``` sh
56
62
just install
57
63
```
58
64
59
- If you prefer not to install ` just ` globally, you can install it with the rest of the
60
- project dependencies using uv. Then activate the environment and call ` just install `
65
+ If you prefer not to install ` just ` globally, you can install it with the rest
66
+ of the project dependencies using uv. Then activate the environment and call
67
+ ` just install `
61
68
62
69
``` sh
63
70
uv sync --no-install-project
64
71
. .venv/bin/activate # Windows: .venv\Scripts\activate
65
72
just install
66
73
```
67
74
68
- This repo contains a few device adapters that are useful for testing,
69
- in src/mmCoreAndDevices/DeviceAdapters. These adapters are built as a part of the
70
- installation.
71
-
72
- On windows, in order to build the SequenceTester device (optional) you will also
73
- need boost installed (e.g. ` choco install boost-msvc-14.3 ` , or similar version
74
- according to your version of visual studio)
75
+ Note that one of the dev dependencies is
76
+ [ ` mm-test-adapters ` ] ( https://pypi.org/project/mm-test-adapters/ ) , this brings in
77
+ a few device adapters that are useful for testing purposes. (The version of
78
+ ` mm-test-adapters ` should match the device interface version you are building
79
+ against.)
75
80
76
81
### Test
77
82
@@ -96,27 +101,12 @@ To release a new version:
96
101
- commit changes to main
97
102
- run ` just release `
98
103
99
- ### Updating ` mmCoreAndDevices ` source code
100
-
101
- Rather than using git submodules, this repository checks in the
102
- [ ` mmCoreAndDevices ` ] ( https://github.com/micro-manager/mmCoreAndDevices ) source
103
- code. This makes measuring C++ code coverage easier, as the ` mmCoreAndDevices `
104
- code is included in the same repository (see codecov results
105
- [ here] ( https://app.codecov.io/gh/pymmcore-plus/pymmcore-nano/tree/main/src%2FmmCoreAndDevices ) ),
106
- and it also makes it easier to make changes to the ` mmCoreAndDevices ` code
107
- directly from this repository (e.g., to fix bugs or add features that are
108
- pending in the upstream repo).
104
+ ### Updating ` MMCore ` and ` MMDevice `
109
105
110
- To bring in new changes from the upstream ` mmCoreAndDevices ` repository, you can
111
- run:
112
-
113
- ``` python
114
- python scripts/ update_sources.py
115
- ```
106
+ The versions of ` MMCore ` and ` MMDevice ` that this project builds against are
107
+ pinned in the ` subprojects/mmcore.wrap ` and ` subprojects/mmdevice.wrap ` files,
108
+ respectively. To build against a new version, update the ` revision ` field in
109
+ the appropriate wrap file and re-run ` just install ` .
116
110
117
- After updating, you can test the build and python code as usual.
118
-
119
- ``` sh
120
- just build
121
- pytest
122
- ```
111
+ For version changes that bump the Device Interface version, you will also want
112
+ to update the version of ` mm-test-adapters ` in the ` pyproject.toml ` file.
0 commit comments