https://git.schokokeks.org/derivepassphrase.git/tree/61fbc909d899ac2bd791b14c20987553b638ac4fRecent commits to derivepassphrase.git (61fbc909d899ac2bd791b14c20987553b638ac4f)2025-02-06T14:27:21+01:00tag:gitlist.org,2012:commit/61fbc909d899ac2bd791b14c20987553b638ac4fReintroduce a "modern" editor interface à la git-commit or git-rebase2025-02-06T14:27:21+01:00Marco Riccisoftware@the13thletter.info
<pre>Reintroduce the previous git-like editor interface as the "modern"
editor interface to the "vault" subcommand, and provide explicit options
`--modern-editor-interface` and `--vault-legacy-editor-interface`,
defaulting to the latter for compatibility.
Furthermore, for the legacy interface, introduce a backup copy of the
notes to guard against accidental data loss, because the legacy
interface offers no way to abort mid-editing, making fatal mistakes all
the more likely.
</pre>
tag:gitlist.org,2012:commit/4db75cd458b8c16baba9def7cbdc8d917fe0e017Warn the user when `derivepassphrase vault --notes` is ineffective2025-02-06T13:16:37+01:00Marco Riccisoftware@the13thletter.info
<pre>In 7b0f4e121a5e688b59abad73b8b60bacfc7d02ed, we adjusted
`derivepassphrase` to only act upon `--notes` if `--config` is also
given, for compatibility with vault(1). However, this is incompatible
with previous versions of `derivepassphrase`, and potentially confusing
even to vault(1) users. As such, `derivepassphrase vault` now emits
a warning if it is called with `--notes` but without `--config`.
</pre>
tag:gitlist.org,2012:commit/7b67d930b8166f6fa1b68dca568134f5d31e4b10Use a vault(1)-compatible naive notes editing system2025-02-05T14:44:16+01:00Marco Riccisoftware@the13thletter.info
<pre>We originally provided a modern git-like editor interface, with a marker
for explanatory texts and with support for aborting the edit by leaving
the file empty. vault(1) however takes the contents of the notes file
literally. For compatibility, we must do the same.
</pre>
tag:gitlist.org,2012:commit/385f2ab4c92bd5c34616b9897ca9c16b1dfaa114Use hypothesis for notes handling tests2025-02-05T14:40:56+01:00Marco Riccisoftware@the13thletter.info
<pre>Have the existing or the new notes be generated data (whichever is
appropriate).
Also handle the previously untested case of aborting the notes edit when
there are no stored notes yet. *This* test does not use hypothesis.
</pre>
tag:gitlist.org,2012:commit/f77599178003fd98fce957ea4ca39a127f3131e2Adapt notes printing test to arbitrary notes2025-02-05T12:07:24+01:00Marco Riccisoftware@the13thletter.info
<pre></pre>
tag:gitlist.org,2012:commit/e0bef32b866004b4ef0cd045b2dea90d0be12f97Clean up notes testing functions2025-02-04T13:30:22+01:00Marco Riccisoftware@the13thletter.info
<pre>They had similar bad defaults and easily avoidable linting overrides
like the no-op test.
</pre>
tag:gitlist.org,2012:commit/55547619b270f05ebef7934129532dab9b1a3af5Use a better test for no-op editing notes2025-02-04T13:17:03+01:00Marco Riccisoftware@the13thletter.info
<pre>"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.
</pre>
tag:gitlist.org,2012:commit/7b0f4e121a5e688b59abad73b8b60bacfc7d02edPartially align notes printing and editing behavior with vault(1)2025-02-04T13:16:29+01:00Marco Riccisoftware@the13thletter.info
<pre>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.)
</pre>
tag:gitlist.org,2012:commit/1e0bf18a3c0f707be7f2ad4c2b588bf3a57db3adAssert that notes should be printed (via xfailing test)2025-02-04T09:53:14+01:00Marco Riccisoftware@the13thletter.info
<pre>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.
</pre>
tag:gitlist.org,2012:commit/df99312f030ab62b3b565ae072f3b44cf23936e8Merge topic branch 'usage-fixes' into master2025-02-02T15:32:18+01:00Marco Riccisoftware@the13thletter.info
<pre>* 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
</pre>