Skip to content

Commit ad263c7

Browse files
committed
refactor: remove .python-version file and update README for clarity
1 parent f7ff62d commit ad263c7

File tree

4 files changed

+34
-48
lines changed

4 files changed

+34
-48
lines changed

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 33 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66
[![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)
77
[![codecov](https://codecov.io/gh/pymmcore-plus/pymmcore-nano/branch/main/graph/badge.svg)](https://codecov.io/gh/pymmcore-plus/pymmcore-nano)
88

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!
1520

1621
## Installation
1722

@@ -33,45 +38,45 @@ For example, the version `11.3.0.71.2` refers to:
3338

3439
- MMCore version 11.3.0
3540
- 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)
3843

3944
## For Developers
4045

4146
### Clone repo
4247

4348
```sh
4449
git clone https://github.com/pymmcore-plus/pymmcore-nano.git
45-
git submodule update --init
50+
cd pymmcore-nano
4651
```
4752

4853
### Setup dev environment (editable install)
4954

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/>
5157

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:
5460

5561
```sh
5662
just install
5763
```
5864

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`
6168

6269
```sh
6370
uv sync --no-install-project
6471
. .venv/bin/activate # Windows: .venv\Scripts\activate
6572
just install
6673
```
6774

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.)
7580

7681
### Test
7782

@@ -96,27 +101,12 @@ To release a new version:
96101
- commit changes to main
97102
- run `just release`
98103

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`
109105

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`.
116110

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.

gcovr.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ gcov-ignore-parse-errors = negative_hits.warn
22
exclude-throw-branches = yes
33
html-theme = github.green
44
print-summary = yes
5-
filter = src/mmCoreAndDevices/MMCore/MMCore.cpp
5+
filter = subprojects/mmcore/MMCore.cpp
66
exclude-lines-by-pattern = .*(LOG_ERROR|CMMError).*
77
exclude-noncode-lines = yes

justfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ version:
6060
check:
6161
pre-commit run --all-files --hook-stage manual
6262

63-
pull-mmcore:
64-
git subtree pull --prefix=src/mmCoreAndDevices https://github.com/micro-manager/mmCoreAndDevices main --squash
65-
6663
# MUST run just version and commit changes before.
6764
release:
6865
git branch --show-current | grep -q main || (echo "Not on main branch" && exit 1)

0 commit comments

Comments
 (0)