b9dd956b59b6f53a572076fea6d686f1626eeba8
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

1) [build-system]
2) requires = ["hatchling"]
3) build-backend = "hatchling.build"
4) 
5) [project]
6) name = "derivepassphrase"
7) description = "An almost faithful Python reimplementation of James Coglan's vault."
8) readme = "README.md"
Marco Ricci Add support for Python 3.9

Marco Ricci authored 3 months ago

9) requires-python = ">= 3.9"
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

10) license = "MIT"
11) keywords = []
12) authors = [
Marco Ricci Change the author e-mail ad...

Marco Ricci authored 4 months ago

13)   { name = "Marco Ricci", email = "software@the13thletter.info" },
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

14) ]
15) classifiers = [
16)   "Development Status :: 4 - Beta",
17)   "Environment :: Console",
Marco Ricci Fix misspelt project settings

Marco Ricci authored 6 months ago

18)   "License :: OSI Approved :: MIT License",
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

19)   "Programming Language :: Python :: 3",
Marco Ricci Fix missing Python version...

Marco Ricci authored 2 months ago

20)   "Programming Language :: Python :: 3.9",
Marco Ricci Support Python 3.10 and PyP...

Marco Ricci authored 5 months ago

21)   "Programming Language :: Python :: 3.10",
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

22)   "Programming Language :: Python :: 3.11",
23)   "Programming Language :: Python :: 3.12",
Marco Ricci Support Python 3.13

Marco Ricci authored 3 months ago

24)   "Programming Language :: Python :: 3.13",
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

25)   "Programming Language :: Python :: Implementation :: CPython",
26)   "Programming Language :: Python :: Implementation :: PyPy",
27) ]
28) dependencies = [
Marco Ricci Specify project dependencie...

Marco Ricci authored 4 months ago

29)   # We use click for the command-line interface.  We require version 8.1.0
30)   # or higher due to click issue #1985.
31)   "click >= 8.1",
32)   # We include type annotations, and use facilities that are not readily
33)   # available in older Pythons (such as typing.Self).  These are loaded from
34)   # typing_extensions, instead of using explicit version guards.
Marco Ricci Support Python 3.10 and PyP...

Marco Ricci authored 5 months ago

35)   "typing_extensions",
Marco Ricci Overhaul dependency and env...

Marco Ricci authored 7 months ago

36) ]
Marco Ricci Reintroduce dynamic version...

Marco Ricci authored 3 months ago

37) dynamic = ['version']
Marco Ricci Overhaul dependency and env...

Marco Ricci authored 7 months ago

38) 
39) [project.optional-dependencies]
Marco Ricci Specify project dependencie...

Marco Ricci authored 4 months ago

40) dev = [
41)   # Development uses the hatch build system, to isolate all tools in their
42)   # own virtual environment.
43)   "hatch ~= 1.10",
44) ]
Marco Ricci Add dependency on cryptogra...

Marco Ricci authored 4 months ago

45) export = [
46)   # The vault configuration exporter relies on cryptography.  Version 38 was
47)   # the first to include the `algorithms.AES256` interface, instead of only
48)   # the `algorithms.AES` interface.
49)   "cryptography >= 38.0.0",
50) ]
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

51) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

52) [project.scripts]
53) derivepassphrase = "derivepassphrase.cli:derivepassphrase"
54) 
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

55) [project.urls]
Marco Ricci Set up a web host for the d...

Marco Ricci authored 5 months ago

56) Documentation = "https://the13thletter.info/derivepassphrase/"
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

57) Issues = "https://github.com/the-13th-letter/derivepassphrase/issues"
58) Source = "https://github.com/the-13th-letter/derivepassphrase"
59) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

60) [tool.coverage.html]
61) directory = "html/coverage"
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

62) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

63) [tool.coverage.paths]
64) src = ["src"]
65) tests = ["tests"]
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

66) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

67) [tool.coverage.report]
68) skip_covered = false
69) skip_empty = true
70) precision = 3
71) partial_branches = [
72)     'pragma: no branch',
73) ]
74) exclude_also = [
75)   "if __name__ == .__main__.:",
76)   'if (?:typing\.)?TYPE_CHECKING:',
77)   "raise AssertionError",
78)   "raise NotImplementedError",
79)   'assert False',
Marco Ricci Merge topic branch 'clean-u...

Marco Ricci authored 4 months ago

80)   '(?:typing\.)?assert_never\(',
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

81) ]
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

82) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

83) [tool.coverage.run]
84) source_pkgs = ["derivepassphrase", "tests"]
85) branch = true
86) parallel = true
87) omit = [
88)   "__main__.py",
89) ]
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

90) 
Marco Ricci Fix Python package build co...

Marco Ricci authored 5 months ago

91) [tool.hatch.build.targets.sdist]
92) exclude = [
Marco Ricci Switch from towncrier to sc...

Marco Ricci authored 3 months ago

93)     'docs/changelog.d/*.md',
Marco Ricci Fix Python package build co...

Marco Ricci authored 5 months ago

94) ]
95) 
96) [tool.hatch.build.targets.wheel]
Marco Ricci Move `sequin` and `ssh_agen...

Marco Ricci authored 5 months ago

97) packages = ['src/derivepassphrase']
Marco Ricci Fix Python package build co...

Marco Ricci authored 5 months ago

98) 
Marco Ricci Overhaul dependency and env...

Marco Ricci authored 7 months ago

99) [tool.hatch.env]
100) requires = [
101)   "hatch-mkdocs",
102) ]
103) 
104) [tool.hatch.env.collectors.mkdocs.docs]
105) path = "mkdocs.yml"
106) 
Marco Ricci Fill out README and documen...

Marco Ricci authored 6 months ago

107) [tool.hatch.envs.docs]
108) extra-dependencies = [
Marco Ricci Annotate settings and selec...

Marco Ricci authored 5 months ago

109)   # Our documentation uses formatted function signatures (i.e. with
110)   # formatted type annotations), which requires `black`.
Marco Ricci Fill out README and documen...

Marco Ricci authored 6 months ago

111)   "black",
Marco Ricci Clean up "docs" hatch envir...

Marco Ricci authored 1 month ago

112)   # Our changelog is assembled from singular entries, orchestrated by
113)   # `scriv`.
114)   "scriv >= 1.4"
Marco Ricci Fill out README and documen...

Marco Ricci authored 6 months ago

115) ]
116) detached = false
117) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

118) [tool.hatch.envs.hatch-static-analysis]
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

119) config-path = "/dev/null"
Marco Ricci Specify project dependencie...

Marco Ricci authored 4 months ago

120) dependencies = [
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

121)   "ruff ~= 0.6.0",
Marco Ricci Specify project dependencie...

Marco Ricci authored 4 months ago

122) ]
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

123) 
124) [tool.hatch.envs.hatch-test]
125) default-args = ['src', 'tests']
Marco Ricci Set up the "hypothesis" tes...

Marco Ricci authored 3 months ago

126) extra-dependencies = [
127)     "hypothesis >= 6.0",
128) ]
129) matrix-name-format = '{variable}_{value}'
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

130) 
131) [[tool.hatch.envs.hatch-test.matrix]]
Marco Ricci Support Python 3.13

Marco Ricci authored 3 months ago

132) python = ["3.13", "3.12", "3.11", "3.10", "3.9", "pypy3.10", "pypy3.9"]
Marco Ricci Set up the "hypothesis" tes...

Marco Ricci authored 3 months ago

133) cryptography = ["no", "yes"]
134) hypothesis-profile = ["user-default"]
Marco Ricci Refactor code to run under...

Marco Ricci authored 1 month ago

135) parser-version = ["PEG"]
136) 
137) [[tool.hatch.envs.hatch-test.matrix]]
138) python = ["3.9", "pypy3.9"]
139) cryptography = ["no", "yes"]
140) hypothesis-profile = ["user-default"]
141) parser-version = ["LL1"]
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

142) 
Marco Ricci Merge topic branch 'clean-u...

Marco Ricci authored 4 months ago

143) [[tool.hatch.envs.hatch-test.matrix]]
Marco Ricci Set up the "hypothesis" tes...

Marco Ricci authored 3 months ago

144) cryptography = ["yes"]
145) hypothesis-profile = ["ci"]
Marco Ricci Merge topic branch 'clean-u...

Marco Ricci authored 4 months ago

146) 
147) [tool.hatch.envs.hatch-test.overrides]
Marco Ricci Set up the "hypothesis" tes...

Marco Ricci authored 3 months ago

148) matrix.cryptography.features = [
149)     { value = "export", if = ["yes"] },
Marco Ricci Merge topic branch 'clean-u...

Marco Ricci authored 4 months ago

150) ]
Marco Ricci Set up the "hypothesis" tes...

Marco Ricci authored 3 months ago

151) matrix.hypothesis-profile.env-vars = [
152)     { key = "HYPOTHESIS_PROFILE", if = ["ci", "default", "dev", "debug"] },
153) ]
Marco Ricci Refactor code to run under...

Marco Ricci authored 1 month ago

154) matrix.parser-version.env-vars = [
155)     { key = "PYTHONOLDPARSER", value = "1", if = ["LL1"] },
156) ]
Marco Ricci Set up the "hypothesis" tes...

Marco Ricci authored 3 months ago

157) 
158) [tool.hatch.envs.hatch-test.scripts]
159) run = "pytest --hypothesis-profile={env:HYPOTHESIS_PROFILE:default}{env:HATCH_TEST_ARGS:} {args}"
160) run-cov = "coverage run -m pytest --hypothesis-profile={env:HYPOTHESIS_PROFILE:default}{env:HATCH_TEST_ARGS:} {args}"
161) cov-combine = "coverage combine"
162) cov-report = "coverage report"
Marco Ricci Merge topic branch 'clean-u...

Marco Ricci authored 4 months ago

163) 
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

164) [tool.hatch.envs.types]
165) extra-dependencies = [
Marco Ricci Set up the "hypothesis" tes...

Marco Ricci authored 3 months ago

166)   "hypothesis >= 6.0",
Marco Ricci Specify project dependencie...

Marco Ricci authored 4 months ago

167)   "mypy ~= 1.0",
Marco Ricci Undo single-child hatch env...

Marco Ricci authored 4 months ago

168)   "pytest ~= 8.1",
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

169) ]
Marco Ricci Add command-line interface...

Marco Ricci authored 4 months ago

170) features = [
171)     "export",
172) ]
173) 
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

174) [tool.hatch.envs.types.scripts]
175) check = "mypy --install-types --non-interactive {args:src/derivepassphrase tests}"
176) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

177) [tool.hatch.version]
178) path = "src/derivepassphrase/__init__.py"
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

179) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

180) [tool.mypy]
181) files = ['src/**/*.py', 'tests/**/*.py']
182) mypy_path = '$MYPY_CONFIG_FILE_DIR/src'
183) explicit_package_bases = true
184) implicit_reexport = false
185) sqlite_cache = true
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

186) enable_error_code = ['ignore-without-code']
Marco Ricci Import initial project files

Marco Ricci authored 8 months ago

187) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

188) [tool.pytest.ini_options]
189) addopts = '--doctest-modules'
190) pythonpath = ['src']
191) testpaths = ['src', 'tests']
192) xfail_strict = true
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 5 months ago

193) 
194) [tool.ruff]
195) line-length = 79
196) src = ["src"]
197) 
198) [tool.ruff.format]
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

199) docstring-code-format = true
Marco Ricci Reformat everything with ruff

Marco Ricci authored 5 months ago

200) docstring-code-line-length = "dynamic"
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 5 months ago

201) preview = true
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

202) quote-style = 'single'
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 5 months ago

203) 
204) [tool.ruff.lint]
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

205) ignore = [
206)     # Suggested ignore by ruff when also using ruff to format.  We *do*
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 4 months ago

207)     # check for E501, because this usually only happens when there is
208)     # a text string that should be manually broken.
209)     'W191', 'E111', 'E114', 'E117', 'D206', 'D300', 'Q000', 'Q001',
210)     'Q002', 'Q003', 'COM812', 'COM819', 'ISC001', 'ISC002',
Marco Ricci Annotate settings and selec...

Marco Ricci authored 5 months ago

211)     # We use `assert` regularly to appease the type checker, and because
212)     # it is the right language tool for this job.
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 5 months ago

213)     'S101',
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

214)     # The formatter takes care of trailing commas and docstring code
215)     # automatically.
216)     'COM812', 'W505',
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 4 months ago

217)     # We document transitive exceptions as well (if we feel they would
218)     # be surprising to the user otherwise).
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

219)     'DOC502',
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 4 months ago

220)     # We currently don't have issues for every TODO.  Forcing an issue
221)     # also goes against the philosophy of TODOs as low-overhead markers
222)     # for future work; see
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

223)     # https://gist.github.com/dmnd/ed5d8ef8de2e4cfea174bd5dafcda382 .
224)     'TD003',
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 4 months ago

225)     # We somewhat regularly use loops where each iteration needs
226)     # a separate try-except block.
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

227)     'PERF203',
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 4 months ago

228)     # We do not currently use pathlib.  The PTH rules are unselected,
229)     # but FURB includes several pathlib-related rules.
230)     'FURB101', 'FURB103',
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

231)     # We catch type-ignore comments without specific code via the mypy
232)     # configuration, not via ruff.
233)     'PGH003',
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 5 months ago

234) ]
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

235) preview = true
236) # We select here in the order of presentation on the ruff documentation
237) # website.  ruff default selection (v0.6.2) is merely E4, E7, E9 and F.
238) select = [
239)     'F', 'E', 'W', 'C90', 'I', 'N', 'D', 'UP', 'YTT',
240)     'ANN', 'ASYNC', 'S', 'BLE', 'FBT', 'B', 'A', 'COM',
241)     'CPY', 'C4', 'DTZ', 'T10', 'DJ', 'EM', 'EXE', 'FA',
242)     'ISC', 'ICN', 'LOG', 'G', 'INP', 'PIE', 'T20', 'PYI',
243)     'PT', 'Q', 'RET', 'SLF', 'SLOT', 'SIM', 'TID', 'TCH',
244)     'INT', 'ARG',
245)     # We currently do not use pathlib. Disable 'PTH'.
246)     'TD',
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 4 months ago

247)     # We use TODOs and FIXMEs as notes for later, and don't want the
248)     # linter to nag about every occurrence.  Disable 'FIX'.
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

249)     #
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 4 months ago

250)     # The "eradicate" rule is prone to a lot of false positives, and it
251)     # is unclear to me, and probably confusing to read, where to apply
252)     # a noqa marker.  Instead, disable 'ERA', and if necessary, specify
253)     # it on the command-line.
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

254)     'PD', 'PGH', 'PL', 'TRY', 'FLY', 'NPY', 'FAST',
255)     'AIR', 'PERF', 'FURB', 'DOC', 'RUF',
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 5 months ago

256) ]
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 5 months ago

257) 
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

258) [tool.ruff.lint.per-file-ignores]
259) "**/scripts/*" = [
260)   # Suggested by hatch.
261)   'INP',
262)   # Suggested by hatch.
263)   'T20',
264) ]
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 5 months ago

265) "**/tests/**/*" = [
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

266)   # Suggested by hatch, assumingly because it may be important to verify
267)   # that the value is exactly the empty string, and not just any falsy
268)   # value.
269)   'PLC1901',
270)   # Suggested by hatch, assumingly because tests may use "magic values".
271)   'PLR2004',
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 4 months ago

272)   # Suggested by hatch, because tests are typically organized as classes
273)   # and instance methods but may not really be using the `self`
274)   # argument.
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

275)   'PLR6301',
276)   # Suggested by hatch, because these warnings may be precisely what the
277)   # tests are supposed to test.
278)   'S',
279)   # Suggested by hatch, because pytest-style tests conventionally import
280)   # code from each other via relative imports.
281)   'TID252',
282)   # Our tests regularly use arguments named `input` to store an input
283)   # (text-/byte-)string.
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 5 months ago

284)   'A002',
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

285)   # We regularly annotate pytest fixtures like monkeypatch as `Any`.
286)   'ANN401',
287)   # Our tests generally don't contain docstrings.
288)   'D', 'DOC',
Marco Ricci Annotate settings and selec...

Marco Ricci authored 5 months ago

289)   # Our tests are regularly parametrized with booleans, for benign
290)   # purposes.
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

291)   'FBT',
Marco Ricci Annotate settings and selec...

Marco Ricci authored 5 months ago

292)   # One of our standard modules is called `derivepassphrase._types`.
293)   # Importing this from the tests directory would then automatically
294)   # trigger `PLC2701`.
Marco Ricci Consolidate `types` submodu...

Marco Ricci authored 5 months ago

295)   'PLC2701',
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 4 months ago

296)   # Too many public methods/arguments/returns/branches/locals doesn't
297)   # really apply here.
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

298)   'PLR0904', 'PLR0911', 'PLR0912', 'PLR0913', 'PLR0914', 'PLR0915',
299)   'PLR0916', 'PLR0917',
Marco Ricci Annotate settings and selec...

Marco Ricci authored 5 months ago

300)   # To fully test the `derivepassphrase.cli` module (and a couple other
301)   # things), we need to call and to mock several internal functions,
302)   # which would automatically trigger `SLF001`.
Marco Ricci Consolidate `types` submodu...

Marco Ricci authored 5 months ago

303)   'SLF001',
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 5 months ago

304) ]
305) 
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

306) [tool.ruff.lint.flake8-copyright]
307) # Include hatch-enforced SPDX-FileCopyrightText in check.
308) notice-rgx = '(?i)(?:Copyright\s+((?:\(C\)|©)\s+)?|SPDX-FileCopyrightText:\s+)\d{4}((-|,\s)\d{4})*'
Marco Ricci Add a changelog and support...

Marco Ricci authored 5 months ago

309) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

310) [tool.ruff.lint.flake8-pytest-style]
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

311) fixture-parentheses = false
312) mark-parentheses = false
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

313) parametrize-names-type = 'list'
Marco Ricci Add a changelog and support...

Marco Ricci authored 5 months ago

314) 
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 4 months ago

315) [tool.ruff.lint.flake8-tidy-imports]
316) ban-relative-imports = "all"
317) 
318) [tool.ruff.lint.isort]
319) known-first-party = ["derivepassphrase"]
320) 
321) [tool.ruff.lint.pycodestyle]
322) ignore-overlong-task-comments = true  # for E501
323) max-doc-length = 72  # for W505
324) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

325) [tool.ruff.lint.pydocstyle]
326) convention = 'google'
Marco Ricci Add a changelog and support...

Marco Ricci authored 5 months ago

327)