Skip to content

#227. Replace local install workflow with an offline USB bundle - #230

Merged
sbillinge merged 7 commits into
juami:mainfrom
q24609962-svg:fix-local-install-workflow
Jun 20, 2026
Merged

#227. Replace local install workflow with an offline USB bundle#230
sbillinge merged 7 commits into
juami:mainfrom
q24609962-svg:fix-local-install-workflow

Conversation

@q24609962-svg

Copy link
Copy Markdown
Contributor

The old scripts/install_from_local.bat hardcoded Python 3.8.1, pip-installed 28 pinned wheels from a committed whls/ folder, and used the removed setup.py install. Replace it with a two-step offline workflow:

  • scripts/build_local_install.py (run on an internet-connected machine) builds the pytentiostat wheel and downloads all dependency wheels into local-install/whls.
  • scripts/install_from_local.bat (run on the offline machine) installs Python from a bundled installer if needed, creates a virtual environment, and installs pytentiostat offline via pip install --no-index --find-links.

Wheels and the Python installer are gitignored so build artifacts are never committed. Instructions updated accordingly. Closes #227.

q24609962-svg and others added 2 commits June 18, 2026 14:28
The old scripts/install_from_local.bat hardcoded Python 3.8.1, pip-installed
28 pinned wheels from a committed whls/ folder, and used the removed
`setup.py install`. Replace it with a two-step offline workflow:

* scripts/build_local_install.py (run on an internet-connected machine) builds
  the pytentiostat wheel and downloads all dependency wheels into
  local-install/whls.
* scripts/install_from_local.bat (run on the offline machine) installs Python
  from a bundled installer if needed, creates a virtual environment, and
  installs pytentiostat offline via pip install --no-index --find-links.

Wheels and the Python installer are gitignored so build artifacts are never
committed. Instructions updated accordingly. Closes juami#227.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…3.12+)

docformatter pulls in untokenize, whose sdist-only setup.py uses
ast.Constant.s (removed in Python 3.12). On the pre-commit.ci runner
(now Python 3.14) the hook environment fails to build, breaking CI. Skip it
on pre-commit.ci; it still runs in local pre-commit installs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.01%. Comparing base (1d8efb0) to head (59fe5b0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #230   +/-   ##
=======================================
  Coverage   91.01%   91.01%           
=======================================
  Files           6        6           
  Lines         167      167           
=======================================
  Hits          152      152           
  Misses         15       15           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbillinge sbillinge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Please just remove the skipped tests and update the pre-commit yaml to latest versions.

Comment thread .pre-commit-config.yaml Outdated
# docformatter is skipped on pre-commit.ci: its dependency untokenize
# (sdist-only) fails to build on the CI's Python 3.12+ runner. It still
# runs in local pre-commit installs.
skip: [no-commit-to-branch, docformatter]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this block to avoid propagating badness.

A better fix is to update all the versions in the pre-commit yaml. Please see the latest scikit-package

q24609962-svg and others added 5 commits June 19, 2026 22:05
Switch docformatter to PyCQA/docformatter v1.7.8 (poetry-core backend),
which removes the untokenize build failure on py3.12+ CI, so the
pre-commit.ci skip is no longer needed. Bump all other hook versions to
match the latest scikit-package config.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The pre-commit version bump pulls flake8 7.3.0, which flags F824 for
`global` names that are only read, never assigned in their scope.
Remove the unused `global Interrupt` in operator.py and `global board, d9`
in main.py (both names are read-only in those functions).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ility

docformatter v1.7.8 (pulled in by the hook version bump) and black
oscillate forever on the inline sys.exit("""...""".format(...)) blocks in
param_checker: black joins them, docformatter then mangles the multi-line
string literals (re-adding backslash continuations and splitting .format),
so the two never converge and CI cannot go green.

Bind each message to a local variable first (message = """..."""; then
sys.exit(message.format(...))), which docformatter leaves untouched. The
warning string literals are byte-for-byte identical to before, so the
emitted error messages are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sbillinge
sbillinge merged commit dc72b0d into juami:main Jun 20, 2026
7 checks passed
@sbillinge

Copy link
Copy Markdown
Member

thanks @q24609962-svg

@q24609962-svg

Copy link
Copy Markdown
Contributor Author

You are welcome @sbillinge

sbillinge pushed a commit that referenced this pull request Jun 21, 2026
Relocate the GUI code and designer files from src/GUI/ into
src/pytentiostat/gui/ so the GUI is a proper importable subpackage, and
move the image assets to src/pytentiostat/pics/ (the code references them
via ../pics). Add a gui package with __init__, a refactored main() entry
point, and an app_setup.create_app helper that applies a consistent,
readable stylesheet across all windows. Update the .flake8 per-file-ignore
path to match the new location.

Rebuilt fresh on top of a synced upstream/main so it carries none of the
unrelated formatting/pre-commit changes (already merged via #230) and
introduces no phantom reverts of the simulator feature or main.py.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: update local installation workflow

2 participants