Recent commits to derivepassphrase.git (d1977d9a206d1bc787a00d1d71abb1374d492ba9) https://git.schokokeks.org/derivepassphrase.git/tree/d1977d9a206d1bc787a00d1d71abb1374d492ba9 Recent commits feed provided by GitList. 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 Add static analysis and testing dependencies to "dev" extra This also enables the static analysis environment to directly use the "dev" extra instead of re-declaring all dependencies. (Sadly, the testing environment needs manual re-declaration, because `cryptography` is a transitive dependency of `hatch`, but the test suite needs to test the "no cryptography support" scenario too.) https://git.schokokeks.org/derivepassphrase.git/commit/bb88253ddbdc2db185778934c3c0b3bbc91b4555 software@the13thletter.info (Marco Ricci) Fri, 31 Jan 2025 15:20:21 +0100 bb88253ddbdc2db185778934c3c0b3bbc91b4555 Remove type annotations from enum value definitions Apparently type checkers have always internally assigned new Literal types to those enum names, and are now also instructed to flag explicit type annotations as errors. For Griffe/mkdocstrings-python, this means we'll need to fill the attribute table manually. *sigh* https://git.schokokeks.org/derivepassphrase.git/commit/b6d98c77f7f78abacb69b4aa3acd896008a848d6 software@the13thletter.info (Marco Ricci) Fri, 31 Jan 2025 15:18:20 +0100 b6d98c77f7f78abacb69b4aa3acd896008a848d6 Fix formatting nitpicks from ruff https://git.schokokeks.org/derivepassphrase.git/commit/e974c931a62fc5e8adc9b08b30f80085668a2f9d software@the13thletter.info (Marco Ricci) Fri, 31 Jan 2025 15:03:58 +0100 e974c931a62fc5e8adc9b08b30f80085668a2f9d Document general changes to the test suite since 0.4.0 https://git.schokokeks.org/derivepassphrase.git/commit/ef4c911e26342d47bb672e580d5922dcd436ba9f software@the13thletter.info (Marco Ricci) Fri, 31 Jan 2025 15:00:24 +0100 ef4c911e26342d47bb672e580d5922dcd436ba9f Document change in testing setup https://git.schokokeks.org/derivepassphrase.git/commit/966cc7d3d7fbc5fef406629f304f9d018b22eb57 software@the13thletter.info (Marco Ricci) Fri, 31 Jan 2025 14:54:53 +0100 966cc7d3d7fbc5fef406629f304f9d018b22eb57 Adjust hypothesis deadlines globally and redo the profiles and slowdown factors Previously, we would define a "worst-case" hypothesis profile for use under instrumentation (coverage measurement), and decorate every hypothesis test which we experienced to have deadline problems with this decorator. This step was manual, and very error-prone when generating new hypothesis tests. Conceptually, it also indicated that adjusted deadlines applied for some tests, but not for others, even though the deadline adjustment is actually a side-effect of global instrumentation. We therefore now adopt a global solution, where the pytest configuration file detects which coverage instrumentation (if any) is running, and adjusts the default hypothesis settings appropriately. The decorator is removed. In the course of this, we re-evaluated the profiles and the slowdown factors, instead of assuming the worst-case instrumentation. hypothesis also defines a "ci" profile for use in continuous integration, together with some commentary on how this profile is expected to be used. We cede this profile name to hypothesis (and remove it from our testing matrix in hatch), and define our own "intense" profile for high-volume hypothesis testing based on the "ci" profile, to be invoked manually as a "pre-release" (or perhaps "nightly") run. Finally, because the test suite now is rather slow in sequential use, we add `--dist=worksteal` to the test options to better distribute load during parallel testing. We choose this over other more "balanced" strategies because our single-test runtimes wildly fluctuate thanks to hypothesis, so work stealing appears to be the most reliable distribution heuristic for us. https://git.schokokeks.org/derivepassphrase.git/commit/7e9e0e24feaedfe8465a080e2bfee991bbbb6a40 software@the13thletter.info (Marco Ricci) Fri, 31 Jan 2025 14:43:03 +0100 7e9e0e24feaedfe8465a080e2bfee991bbbb6a40