Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make enum listings reproducible and improve formatting
I'm rebuilding RPM packages to check build reproducibility (https://docs.fedoraproject.org/en-US/reproducible-builds/), and we got the result that rebuilds of the snakemake man page varies in this trivial way: │ │ │ \fB\-\-rerun\-trigger\fR mtime'. (default: │ │ │ -frozenset({<RerunTrigger.INPUT: 2>, │ │ │ -<RerunTrigger.MTIME: 0>, <RerunTrigger.SOFTWARE_ENV: │ │ │ -3>, <RerunTrigger.PARAMS: 1>, <RerunTrigger.CODE: │ │ │ -4>})) │ │ │ +frozenset({<RerunTrigger.CODE: 4>, │ │ │ +<RerunTrigger.PARAMS: 1>, <RerunTrigger.INPUT: 2>, │ │ │ +<RerunTrigger.SOFTWARE_ENV: 3>, <RerunTrigger.MTIME: │ │ │ +0>})) sets/frozensets are hash-ordered, not insertion ordered, so the order is not reproducible. Also, the automatic formatting in --help looks bad, the fact that it's a frozenset is not interesting to the user. If we drop the explicit sorting, the items are sorted in the definition order, which seems reasonable. --help text with the patch: --rerun-triggers {mtime,params,input,software-env,code} [{mtime,params,input,software-env,code} ...] Define what triggers the rerunning of a job. By default, all triggers are used, which guarantees that results are consistent with the workflow code and configuration. If you rather prefer the traditional way of just considering file modification dates, use ' --rerun-trigger mtime'. (default: (<RerunTrigger.MTIME: 0>, <RerunTrigger.PARAMS: 1>, <RerunTrigger.INPUT: 2>, <RerunTrigger.SOFTWARE_ENV: 3>, <RerunTrigger.CODE: 4>))
- Loading branch information