bf906f3d8786229aba3513eef084814cd5b85b07
Marco Ricci Import initial project files

Marco Ricci authored 7 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 Specify project dependencie...

Marco Ricci authored 4 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 7 months ago

19)   "Programming Language :: Python :: 3",
Marco Ricci Support Python 3.10 and PyP...

Marco Ricci authored 5 months ago

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

Marco Ricci authored 7 months ago

21)   "Programming Language :: Python :: 3.11",
22)   "Programming Language :: Python :: 3.12",
23)   "Programming Language :: Python :: Implementation :: CPython",
24)   "Programming Language :: Python :: Implementation :: PyPy",
25) ]
26) dependencies = [
Marco Ricci Specify project dependencie...

Marco Ricci authored 4 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 6 months ago

34) ]
Marco Ricci Reintroduce dynamic version...

Marco Ricci authored 3 months ago

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

Marco Ricci authored 6 months ago

36) 
37) [project.optional-dependencies]
Marco Ricci Specify project dependencie...

Marco Ricci authored 4 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 4 months ago

50) [project.scripts]
51) derivepassphrase = "derivepassphrase.cli:derivepassphrase"
Marco Ricci Merge topic branch 'clean-u...

Marco Ricci authored 3 months ago

52) derivepassphrase_export = "derivepassphrase.exporter:derivepassphrase_export"
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

53) 
Marco Ricci Import initial project files

Marco Ricci authored 7 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 4 months ago

80) ]
Marco Ricci Import initial project files

Marco Ricci authored 7 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 5 months ago

90) [tool.hatch.build.targets.sdist]
91) exclude = [
92)     'towncrier.d/[0123456789+]*.md',
93) ]
94) 
95) [tool.hatch.build.targets.wheel]
Marco Ricci Move `sequin` and `ssh_agen...

Marco Ricci authored 4 months ago

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

Marco Ricci authored 5 months ago

97) 
Marco Ricci Overhaul dependency and env...

Marco Ricci authored 6 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 4 months ago

108)   # Our documentation uses the Material theme.  It also uses
109)   # `mkdocstrings[python]`, but `hatch-mkdocs` is apparently smart
110)   # enough to pick *that* one up from the MkDocs configuration, but not
111)   # the selected theme...
112)   "mkdocs-material",
113)   # Our documentation uses formatted function signatures (i.e. with
114)   # formatted type annotations), which requires `black`.
Marco Ricci Fill out README and documen...

Marco Ricci authored 5 months ago

115)   "black",
Marco Ricci Annotate settings and selec...

Marco Ricci authored 4 months ago

116)   # Our documentation is generated in multiple versions, orchestrated by
117)   # `mike`.
Marco Ricci Deploy versioned documentat...

Marco Ricci authored 4 months ago

118)   "mike",
Marco Ricci Fill out README and documen...

Marco Ricci authored 5 months ago

119) ]
120) detached = false
121) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 2 months ago

130) extra-dependencies = [
131)     "hypothesis >= 6.0",
132) ]
133) matrix-name-format = '{variable}_{value}'
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

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

Marco Ricci authored 2 months ago

136) python = ["3.12", "3.11", "3.10", "pypy3.10"]
137) cryptography = ["no", "yes"]
138) hypothesis-profile = ["user-default"]
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 2 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 2 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 2 months ago

148) matrix.hypothesis-profile.env-vars = [
149)     { key = "HYPOTHESIS_PROFILE", if = ["ci", "default", "dev", "debug"] },
150) ]
151) 
152) [tool.hatch.envs.hatch-test.scripts]
153) run = "pytest --hypothesis-profile={env:HYPOTHESIS_PROFILE:default}{env:HATCH_TEST_ARGS:} {args}"
154) run-cov = "coverage run -m pytest --hypothesis-profile={env:HYPOTHESIS_PROFILE:default}{env:HATCH_TEST_ARGS:} {args}"
155) cov-combine = "coverage combine"
156) cov-report = "coverage report"
Marco Ricci Merge topic branch 'clean-u...

Marco Ricci authored 3 months ago

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

Marco Ricci authored 4 months ago

158) [tool.hatch.envs.release]
Marco Ricci Specify project dependencie...

Marco Ricci authored 4 months ago

159) extra-dependencies = [
160)   "towncrier >= 23.11"
161) ]
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 4 months ago

162) 
163) [tool.hatch.envs.release.scripts]
164) 
Marco Ricci Import initial project files

Marco Ricci authored 7 months ago

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

Marco Ricci authored 2 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 7 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 3 months ago

307) [tool.ruff.lint.flake8-copyright]
308) # Include hatch-enforced SPDX-FileCopyrightText in check.
309) 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

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 5 months ago

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

Marco Ricci authored 3 months ago

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

Marco Ricci authored 4 months ago

326) [tool.ruff.lint.pydocstyle]
327) convention = 'google'