Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 10 #83

Merged
merged 15 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
matrix:
os: [ubuntu-22.04, macos-13, windows-2022]
include:
- python-version: '3.12'
- python-version: '3.13'
- os: ubuntu-22.04
name: linux
- os: macos-13
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev']
python-version: ['3.13']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12', '3.13-dev']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down
24 changes: 22 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
# Changelog

## [9.0.2] - Development
## [10.0.1] - Development

## [10.0.0] - 2024-12-22

### Changed

- __Breaking__: Rename --verbose CLI flag to --debug ([`5116ffe`](https://github.com/bessman/mcbootflash/commit/5116ffeec3369fe024d9f1cc730ce57f6dd91232))
- __Breaking__: Raise `bincopy.Error` instead of `ValueError` in `chunked` ([`452afb5`](https://github.com/bessman/mcbootflash/commit/452afb59b8205406b70a3604214070f1c6b625e4))
- Improve CLI error handling ([`5116ffe`](https://github.com/bessman/mcbootflash/commit/5116ffeec3369fe024d9f1cc730ce57f6dd91232))
- Clarify `self_verify` docstring ([`fc8d16b`](https://github.com/bessman/mcbootflash/commit/fc8d16b2d9b6ee528edbeec7bd47a4a157c3b78b))

### Added

- Implement `read_flash` ([`908aeac`](https://github.com/bessman/mcbootflash/commit/908aeac1ff28985ac0697a44362cf8753354013b))
- Add `readback` utility function to read firmware image from flash ([`53481c2`](https://github.com/bessman/mcbootflash/commit/53481c2980d8feb0fc4459a9c025d0aa8ecf8241))
- Add support for Python 3.13 ([`a74ed75`](https://github.com/bessman/mcbootflash/commit/a74ed753406161a56fd758e0fa45193350a88120))

### Removed

- Drop support for EOL Python 3.8 ([`a74ed75`](https://github.com/bessman/mcbootflash/commit/a74ed753406161a56fd758e0fa45193350a88120))

### Fixed

- __Breaking__: Re-rename types.py to protocol.py to avoid shadowing built-in types.py ([`2a66b7b`](https://github.com/bessman/mcbootflash/commit/2a66b7b6df783b9d3b81a1592d6732c8440e767e))

## [9.0.1] - 2024-05-14

### Changed
Expand All @@ -29,7 +48,7 @@

### Removed

- __Breaking__: Remove `.has_checksum` attribute of `BootAttrs` ([`b685bb5`](https://github.com/bessman/mcbootflash/commit/b685bb56165805706fdc87adcba76c1285cc3416))
- __Breaking__: Remove `.has_checksum` attribute versionof `BootAttrs` ([`b685bb5`](https://github.com/bessman/mcbootflash/commit/b685bb56165805706fdc87adcba76c1285cc3416))

### Fixed

Expand Down Expand Up @@ -278,6 +297,7 @@ _Maintanence release._

_Initial release._

[10.0.0]: https://github.com/bessman/mcbootflash/releases/tag/10.0.0
[9.0.1]: https://github.com/bessman/mcbootflash/releases/tag/9.0.1
[9.0.0]: https://github.com/bessman/mcbootflash/releases/tag/9.0.0
[8.0.2]: https://github.com/bessman/mcbootflash/releases/tag/8.0.2
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ options:
$ mcbootflash --port /dev/ttyUSB0 --baudrate 460800 firmware.hex
Connecting to bootloader...
Erasing program area...
100% 162.0 KiB |######################################| Elapsed Time: 0:00:01
Flashing firmware.hex...
100% 88.7 KiB |########################################| Elapsed Time: 0:00:05
100% 98.8 KiB |#######################################| Elapsed Time: 0:00:06
Self verify OK
```

Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

## Custom Types

::: mcbootflash.types
::: mcbootflash.protocol
options:
show_root_toc_entry: false
heading_level: 3
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ name = "mcbootflash"
authors = [{name = "Alexander Bessman", email = "[email protected]"}]
dynamic = ["version", "description"]
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = {file = "LICENSE"}
dependencies = [
"pyserial",
"bincopy >= 20.0.0",
"datastructclass",
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
]
Expand Down Expand Up @@ -72,11 +73,12 @@ ignore = [
"G004", # logging-f-string
"N818", # error-suffix-on-exception-name
"S101", # assert
"ANN101", # missing-type-self
]

[tool.ruff.lint.per-file-ignores]
"**/{tests,docs}/*" = ["ALL"]
# Do not show user a traceback unless they explicitly ask for it with --debug.
"__main__.py" = ["TRY400"]

[tool.ruff.lint.pydocstyle]
convention = "numpy"
11 changes: 7 additions & 4 deletions src/mcbootflash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,32 @@
checksum,
erase_flash,
get_boot_attrs,
read_flash,
reset,
self_verify,
write_flash,
)
from .types import BootAttrs, Chunk, Command
from .util import chunked
from .protocol import BootAttrs, Chunk, Command
from .util import chunked, readback

__all__ = [
"BadAddress",
"BadLength",
"BootAttrs",
"BootloaderError",
"Chunk",
"Command",
"UnsupportedCommand",
"VerifyFail",
"BootAttrs",
"checksum",
"chunked",
"erase_flash",
"get_boot_attrs",
"read_flash",
"readback",
"reset",
"self_verify",
"write_flash",
]

__version__ = "9.0.2"
__version__ = "10.0.0"
Loading
Loading