Repository navigation
feat: add secure connections and FastFrame support - #192
SaiDeepikaKuchibhotla wants to merge 7 commits into
Conversation
Documentation build overview
12 files changed ·
|
| return True, None | ||
|
|
||
|
|
||
| def discover(url: str) -> tuple[bool, Path | None, dict, bool]: |
Test Results (macos)
|
Test Results (ubuntu)
|
Test Results (windows)
tests\test_credential_store.py('D:\\a\\TekHSI\\TekHSI\\tests\\test_credential_store.py', 118, 'Skipped: POSIX chmod only') |
nfelt14
left a comment
There was a problem hiding this comment.
You also need to make sure to run pre-commit run -a ruff-check and pre-commit run -a ruff-format to fix issues, that is why all the checks are failing.
| legacy_tox_ini = """ | ||
| [tox] | ||
| requires = tox>4 | ||
| isolated_build = True |
| ``` | ||
|
|
||
| The first connection can use `on_trust_prompt` to approve the scope certificate. The certificate fingerprint and credentials are then stored for later connections. A changed certificate raises a certificate-mismatch error rather than silently trusting a different endpoint. | ||
| The default store locations are: |
There was a problem hiding this comment.
Why is the store on Linux .tektronix, but other platforms just tektronix (no dot)?
There was a problem hiding this comment.
The leading dot follows the Unix convention for hidden application configuration directories. Windows uses %APPDATA%, while macOS uses its standard Application Support directory, so neither needs a dot-prefixed folder.
There was a problem hiding this comment.
Why not put it in the user folder on Windows too?
| | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | | ||
| | `UNAUTHENTICATED` | Confirm the scope is in the expected security mode and verify the password. | | ||
| | Certificate mismatch | Remove the stale stored certificate only after verifying the new certificate, then trust it deliberately. | | ||
| | No active channel | Enable the channel on the scope and check `TEKHSI_SCOPE_CHANNEL`. | |
There was a problem hiding this comment.
Manual integration test information should not live in this usage document. This is for package users only, not package developers.
Breaking API Changes |
| - [`TekCertificateMismatch`][tekhsi.security.TekCertificateMismatch] | ||
| - [`TekSecurityError`][tekhsi.security.TekSecurityError] | ||
| - [`FastFrameLoadTiming`][tekhsi.load_timing.WaveformTransferTiming] (the compatibility alias for [`WaveformTransferTiming`][tekhsi.load_timing.WaveformTransferTiming]) | ||
| - [`FastFrameDigitalWaveform`](https://tm-data-types.readthedocs.io/en/stable/) |
There was a problem hiding this comment.
Use a dot syntax like tekhsi, it resolves due to the imported libraries in the build process.
There was a problem hiding this comment.
This file is just an example of bad code. We shouldn't have an example that imports private members.
| "missing-class-docstring", # caught by ruff | ||
| "missing-module-docstring", # caught by ruff | ||
| "no-member", # caught by pyright | ||
| "locally-disabled", # local suppressions are reviewed at their usage sites |
| "consider-using-with", # TODO: enable this check | ||
| "deprecated-typing-alias", # caught by ruff | ||
| "duplicate-code", | ||
| "fixme", # caught by ruff |
| output-format = "text" # colorized could be another option | ||
|
|
||
| [tool.pyright] | ||
| executionEnvironments = [ |
There was a problem hiding this comment.
This shouldn't be necessary if the tests are set up properly. The tests shouldn't be manipulating sys.path
| "src/tekhsi/_tek_highspeed_server_pb2*.py*" = [ | ||
| "ALL", | ||
| ] | ||
| "src/tekhsi/credential_store.py" = ["ALL"] |
There was a problem hiding this comment.
Remove total file ignore for these filea
| pydantic = "^2.7.4" | ||
| pygments = "^2.17.2" | ||
| pymdown-extensions = "^12.1.0" | ||
| pymdown-extensions = "^11.0.1" |
| ) | ||
|
|
||
| global _logger_initialized # noqa: PLW0603 | ||
| global _logger_initialized # noqa: PLW0603 # pylint: disable=global-statement |
There was a problem hiding this comment.
This pylint error can still be ignored globally, since it is caught by ruff
|
|
||
|
|
||
| @pytest.fixture | ||
| def manual_scope_enabled_fixture() -> None: |
There was a problem hiding this comment.
This should just be an auto use fixture, it doesn't need to be used manually. Also, this env var should be removed, just use the presence of the scope ip address to skip.
Proposed changes
This PR adds two related capabilities to TekHSI:
Secure connections
Fast-Frame acquisitions
These changes improve secure instrument communication and provide complete Fast-Frame waveform handling for acquisition and analysis.
Addresses #< fill in issue number here >
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Addresses #<issue_number>