Recent commits to derivepassphrase.git (55547619b270f05ebef7934129532dab9b1a3af5) https://git.schokokeks.org/derivepassphrase.git/tree/55547619b270f05ebef7934129532dab9b1a3af5 Recent commits feed provided by GitList. Use a better test for no-op editing notes "no-op" editing of notes makes no sense for a service which does not have notes yet. Also, "no-op" editing may involve extra whitespace at the beginning or end of the contents. Use these two facts to construct a better test. Also, do not use click's convenience feature of using a `None` return to signal that no changes have been made. The check is heuristic in nature (it involves filesystem timestamps), and vault(1) actually uses a more naive system that does not map cleanly to click's system. https://git.schokokeks.org/derivepassphrase.git/commit/55547619b270f05ebef7934129532dab9b1a3af5 software@the13thletter.info (Marco Ricci) Tue, 04 Feb 2025 13:17:03 +0100 55547619b270f05ebef7934129532dab9b1a3af5 Partially align notes printing and editing behavior with vault(1) Notes (if any) are printed after the derived passphrase is emitted. The `--notes` flag is an option, not a command: editing notes requires both `--notes` and `--config`. Any such edits happen after querying for master passphrases or SSH keys to use. Editing notes, even if a no-op, will at least register the service name as a known service. The `--unset` option now additionally accepts the "notes" argument. (Caveat: vault(1) actually leaves the terminal in a bad state during editing if called after querying a master passphrase or selecting an SSH key.) https://git.schokokeks.org/derivepassphrase.git/commit/7b0f4e121a5e688b59abad73b8b60bacfc7d02ed software@the13thletter.info (Marco Ricci) Tue, 04 Feb 2025 13:16:29 +0100 7b0f4e121a5e688b59abad73b8b60bacfc7d02ed Assert that notes should be printed (via xfailing test) Like vault(1), `derivepassphrase vault` should print the service's notes to standard error when deriving a passphrase. But due to an oversight, it currently doesn't. Explicitly test for this. https://git.schokokeks.org/derivepassphrase.git/commit/1e0bf18a3c0f707be7f2ad4c2b588bf3a57db3ad software@the13thletter.info (Marco Ricci) Tue, 04 Feb 2025 09:53:14 +0100 1e0bf18a3c0f707be7f2ad4c2b588bf3a57db3ad Merge topic branch 'usage-fixes' into master * t/usage-fixes: Reorder parametrizations with modified argument lists Implement all parametrization-related changes suggested in the TODOs Convert Parametrizations enums to Parametrize namespace Consolidate test parametrizations per test module Resolve dependency versions explicitly in pyproject.toml Fix inconsistent indentation in pyproject.toml Add static analysis and testing dependencies to "dev" extra Remove type annotations from enum value definitions Fix formatting nitpicks from ruff Document general changes to the test suite since 0.4.0 Document change in testing setup Adjust hypothesis deadlines globally and redo the profiles and slowdown factors https://git.schokokeks.org/derivepassphrase.git/commit/df99312f030ab62b3b565ae072f3b44cf23936e8 software@the13thletter.info (Marco Ricci) Sun, 02 Feb 2025 15:32:18 +0100 df99312f030ab62b3b565ae072f3b44cf23936e8 Reorder parametrizations with modified argument lists https://git.schokokeks.org/derivepassphrase.git/commit/14bb7ea6b91e37880114372d78af639a304a9909 software@the13thletter.info (Marco Ricci) Sun, 02 Feb 2025 13:39:03 +0100 14bb7ea6b91e37880114372d78af639a304a9909 Implement all parametrization-related changes suggested in the TODOs Most of these are straight-forward cases of renaming, consolidating, or yielding additional parameters. Regarding the TODOs in the `ssh_agent` test module dealing with `skip` and `xfail` messages, I decided to follow [Paul Ganssle's use of `xfail`][GANSSLE_XFAIL]: "use `skip` for tests that *aren't supposed to work*", and "use `xfail` for tests that *should, but currently don't pass*". (In other words, for `skip`, the failure is external to the system under test and cannot be accomodated for; for `xfail`, it is internal, or part of the system under test's job to accomodate for it.) For the aforementioned tests for the `ssh_agent` module, both `skip` messages occur because of unsatisfied assumptions on the running SSH agent (a test key isn't loaded, or one kind of failure mode doesn't occur with this agent), so they shall both remain `skip` messages. [GANSSLE_XFAIL]: https://blog.ganssle.io/articles/2021/11/pytest-xfail.html https://git.schokokeks.org/derivepassphrase.git/commit/199474b2ff325c51608426f7992ba0830610fcf0 software@the13thletter.info (Marco Ricci) Sun, 02 Feb 2025 11:55:25 +0100 199474b2ff325c51608426f7992ba0830610fcf0 Convert Parametrizations enums to Parametrize namespace Switch out `enum.Enum` for `types.SimpleNamespace` to collect the various `pytest.mark.parametrize` decorators: it works equally well in practice when coupled with a type checker, and it avoids having to unpack the enum value when actually calling the decorator. Opt for the shorter name `Parametrize` instead of `Parametrizations`. Also consolidate the two versions of the `VAULT_CONFIG_FORMATS_DATA` parametrization set by moving it into a dedicated namespace in the top-level `tests` package. https://git.schokokeks.org/derivepassphrase.git/commit/d1977d9a206d1bc787a00d1d71abb1374d492ba9 software@the13thletter.info (Marco Ricci) Sat, 01 Feb 2025 23:25:35 +0100 d1977d9a206d1bc787a00d1d71abb1374d492ba9 Consolidate test parametrizations per test module Collect all calls to `pytest.mark.parametrize` in a per-module enum. This deduplicates the definitions and highlights inconsistencies. (For the CLI test module, the shell formatter functions were moved above the enum to avoid NameErrors.) https://git.schokokeks.org/derivepassphrase.git/commit/7ad2c7a5b65deb79dff20352ffdab7477a79f907 software@the13thletter.info (Marco Ricci) Sat, 01 Feb 2025 15:55:49 +0100 7ad2c7a5b65deb79dff20352ffdab7477a79f907 Resolve dependency versions explicitly in pyproject.toml Remove the `~=` version specifiers in favor of `>=` specifiers, and only use explicitly tested versions as minimum version requirements. Also explicitly list pytest plugins and coverage plugins as dependencies. https://git.schokokeks.org/derivepassphrase.git/commit/9f32d01e5eb9ccb15d406f7781e0c2ae95ab8c23 software@the13thletter.info (Marco Ricci) Fri, 31 Jan 2025 18:03:02 +0100 9f32d01e5eb9ccb15d406f7781e0c2ae95ab8c23 Fix inconsistent indentation in pyproject.toml https://git.schokokeks.org/derivepassphrase.git/commit/88436ca428fc4cd1a25f4a3cf9d9a54845f8be1c software@the13thletter.info (Marco Ricci) Fri, 31 Jan 2025 15:37:32 +0100 88436ca428fc4cd1a25f4a3cf9d9a54845f8be1c