Support Moxa NPort firmware 2.x backups and update copier template to 5.1.0 - #58
Merged
Conversation
- handle https redirect with self-signed certificate on moxa backup - support new SHA256 challenge login alongside the old MD5 scheme - skip the firmware 2.x login history page and fetch the export csrf_token from BackupRestore.htm when ConfExp.htm is gone - raise an error if the export returns the login page (bad credentials) - tolerate urllib3 >= 2.0 which removed DEFAULT_CIPHERS - stage deleted files with git CLI add as IndexFile.add cannot
Apply the python-copier-template 5.1.0 update: switch to uv-based CI/ release/container workflows, replace dependabot with renovate, drop the install_requirements action and the _pypi workflow, and add .python-version and .gitleaks.toml. Also refreshes the devcontainer, pre-commit, Dockerfile, README and CONTRIBUTING to match the template. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The 3.1.0->5.1.0 template migration reset project.dependencies to an empty list and rerouted the console script through __main__, leaving the tool unable to run. Restore the dependencies and fix the fallout: - pyproject: re-add runtime deps (dls-pmacanalyse, dls-pmaclib, cothread, epicscorelibs, gitpython, attrs, pexpect, requests[socks], pyqt5) and regenerate uv.lock - pyproject/ci: cap python to >=3.11,<3.13 because brick.py and dls-pmaclib import the stdlib telnetlib removed in 3.13; drop the 3.13/3.14 classifiers and CI matrix entries - __main__: expose backup.main as `main` so the dls-backup-bl entry point resolves - tserver: let a moxa "server" carry an https:// scheme for https-only devices (e.g. via a port forward), wrap two over-length log messages, and strip the scheme from the backup filename Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #58 +/- ##
==========================================
- Coverage 29.73% 29.35% -0.39%
==========================================
Files 10 10
Lines 797 821 +24
==========================================
+ Hits 237 241 +4
- Misses 560 580 +20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
GitPython, imported by repository.py, requires the git executable on PATH at import time. The minimal ubuntu:noble runtime stage didn't include it, so `docker run ... --version` failed with "Bad git executable". Install git in the runtime image. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This is a hardware-facing repo where much of the code talks to live devices over the network, so automated coverage is limited by design. Report coverage without failing pull requests on it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
|
Hold fire on the merge, I seem to have put in a wrong answer when running copier update that prevents the PyPi publishing. Fixing now |
Collaborator
Author
|
OK ready to merge and release |
JamesOHeaDLS
approved these changes
Jun 24, 2026
JamesOHeaDLS
left a comment
Collaborator
There was a problem hiding this comment.
Thanks Lee, looks good
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Enables backing up Moxa NPort firmware 2.x terminal servers, including HTTPS-only devices and ones reachable only via a SOCKS proxy (e.g. the vacuum-control terminal servers on the isolated CIA network). Also updates the copier template to 5.1.0 and restores the runtime dependencies the migration had dropped.
HTTPS handling:
SOCKS proxy:
Build / dependencies:
Testing: