ef40e2a2624047f1b02e87716f17d8569dc94bfb
Marco Ricci Import initial project files

Marco Ricci authored 4 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 1 month ago

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

Marco Ricci authored 4 months ago

10) license = "MIT"
11) keywords = []
12) authors = [
13)   { name = "Marco Ricci", email = "m@the13thletter.info" },
14) ]
15) classifiers = [
16)   "Development Status :: 4 - Beta",
17)   "Environment :: Console",
Marco Ricci Fix misspelt project settings

Marco Ricci authored 2 months ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 2 months ago

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

Marco Ricci authored 4 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 1 month 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 2 months ago

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

Marco Ricci authored 3 months ago

34) ]
Marco Ricci Release 0.1.3

Marco Ricci authored 1 month ago

35) version = "0.1.3"
Marco Ricci Overhaul dependency and env...

Marco Ricci authored 3 months ago

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

Marco Ricci authored 1 month 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 1 month 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 4 months ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

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

Marco Ricci authored 1 month ago

53) 
Marco Ricci Import initial project files

Marco Ricci authored 4 months ago

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

Marco Ricci authored 2 months ago

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

Marco Ricci authored 4 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 1 month ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 1 month 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 2 weeks ago

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

Marco Ricci authored 1 month ago

80) ]
Marco Ricci Import initial project files

Marco Ricci authored 4 months ago

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

Marco Ricci authored 1 month 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 4 months ago

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

Marco Ricci authored 1 month 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 1 month ago

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

Marco Ricci authored 1 month ago

97) 
Marco Ricci Overhaul dependency and env...

Marco Ricci authored 3 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 2 months ago

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

Marco Ricci authored 1 month 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 2 months ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 months ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 1 month ago

127) 
128) [tool.hatch.envs.hatch-test]
129) default-args = ['src', 'tests']
130) 
131) [[tool.hatch.envs.hatch-test.matrix]]
132) python = ["3.10", "3.11", "3.12", "pypy3.10"]
133) 
Marco Ricci Merge topic branch 'clean-u...

Marco Ricci authored 2 weeks ago

134) [[tool.hatch.envs.hatch-test.matrix]]
135) python = ["3.10", "3.11", "3.12", "pypy3.10"]
136) feature = ["export"]
137) 
138) [tool.hatch.envs.hatch-test.overrides]
139) matrix.feature.features = [
140)     { value = "export", if = ["export"] },
141) ]
142) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 month ago

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

Marco Ricci authored 1 month ago

144) extra-dependencies = [
145)   "towncrier >= 23.11"
146) ]
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 month ago

147) 
148) [tool.hatch.envs.release.scripts]
149) 
Marco Ricci Import initial project files

Marco Ricci authored 4 months ago

150) [tool.hatch.envs.types]
151) extra-dependencies = [
Marco Ricci Specify project dependencie...

Marco Ricci authored 1 month ago

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

Marco Ricci authored 3 weeks ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 3 weeks ago

155) features = [
156)     "export",
157) ]
158) 
Marco Ricci Import initial project files

Marco Ricci authored 4 months ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 1 month ago

165) [tool.mypy]
166) files = ['src/**/*.py', 'tests/**/*.py']
167) mypy_path = '$MYPY_CONFIG_FILE_DIR/src'
168) explicit_package_bases = true
169) implicit_reexport = false
170) sqlite_cache = true
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 2 weeks ago

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

Marco Ricci authored 4 months ago

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

Marco Ricci authored 1 month ago

173) [tool.pytest.ini_options]
174) addopts = '--doctest-modules'
175) pythonpath = ['src']
176) testpaths = ['src', 'tests']
177) xfail_strict = true
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 1 month ago

178) 
179) [tool.ruff]
180) line-length = 79
181) src = ["src"]
182) 
183) [tool.ruff.format]
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 2 weeks ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

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

Marco Ricci authored 1 month ago

188) 
189) [tool.ruff.lint]
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 2 weeks ago

190) ignore = [
191)     # Suggested ignore by ruff when also using ruff to format.  We *do*
192)     # check for E501, because this usually only happens when there is a text
193)     # string that should be manually broken.
194)     'W191', 'E111', 'E114', 'E117', 'D206', 'D300', 'Q000', 'Q001', 'Q002',
195)     'Q003', 'COM812', 'COM819', 'ISC001', 'ISC002',
Marco Ricci Annotate settings and selec...

Marco Ricci authored 1 month ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

199)     # The formatter takes care of trailing commas and docstring code
200)     # automatically.
201)     'COM812', 'W505',
202)     # We document transitive exceptions as well (if we feel they would be
203)     # surprising to the user otherwise).
204)     'DOC502',
205)     # We currently don't have issues for every TODO.  Forcing an issue also
206)     # goes against the philosophy of TODOs as low-overhead markers for
207)     # future work; see
208)     # https://gist.github.com/dmnd/ed5d8ef8de2e4cfea174bd5dafcda382 .
209)     'TD003',
210)     # We somewhat regularly use loops where each iteration needs a separate
211)     # try-except block.
212)     'PERF203',
213)     # We catch type-ignore comments without specific code via the mypy
214)     # configuration, not via ruff.
215)     'PGH003',
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

217) preview = true
218) # We select here in the order of presentation on the ruff documentation
219) # website.  ruff default selection (v0.6.2) is merely E4, E7, E9 and F.
220) select = [
221)     'F', 'E', 'W', 'C90', 'I', 'N', 'D', 'UP', 'YTT',
222)     'ANN', 'ASYNC', 'S', 'BLE', 'FBT', 'B', 'A', 'COM',
223)     'CPY', 'C4', 'DTZ', 'T10', 'DJ', 'EM', 'EXE', 'FA',
224)     'ISC', 'ICN', 'LOG', 'G', 'INP', 'PIE', 'T20', 'PYI',
225)     'PT', 'Q', 'RET', 'SLF', 'SLOT', 'SIM', 'TID', 'TCH',
226)     'INT', 'ARG',
227)     # We currently do not use pathlib. Disable 'PTH'.
228)     'TD',
229)     # We use TODOs and FIXMEs as notes for later, and don't want the linter
230)     # to nag about every occurrence.  Disable 'FIX'.
231)     #
232)     # The "eradicate" rule is prone to a lot of false positives, and it is
233)     # unclear to me, and probably confusing to read, where to apply a noqa
234)     # marker.  Instead, disable 'ERA', and if necessary, specify it on the
235)     # command-line.
236)     'PD', 'PGH', 'PL', 'TRY', 'FLY', 'NPY', 'FAST',
237)     'AIR', 'PERF', 'FURB', 'DOC', 'RUF',
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 1 month ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

240) [tool.ruff.lint.per-file-ignores]
241) "**/scripts/*" = [
242)   # Suggested by hatch.
243)   'INP',
244)   # Suggested by hatch.
245)   'T20',
246) ]
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

248)   # Suggested by hatch, assumingly because it may be important to verify
249)   # that the value is exactly the empty string, and not just any falsy
250)   # value.
251)   'PLC1901',
252)   # Suggested by hatch, assumingly because tests may use "magic values".
253)   'PLR2004',
254)   # Suggested by hatch, because tests are typically organized as classes and
255)   # instance methods but may not really be using the `self` argument.
256)   'PLR6301',
257)   # Suggested by hatch, because these warnings may be precisely what the
258)   # tests are supposed to test.
259)   'S',
260)   # Suggested by hatch, because pytest-style tests conventionally import
261)   # code from each other via relative imports.
262)   'TID252',
263)   # Our tests regularly use arguments named `input` to store an input
264)   # (text-/byte-)string.
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

266)   # We regularly annotate pytest fixtures like monkeypatch as `Any`.
267)   'ANN401',
268)   # Our tests generally don't contain docstrings.
269)   'D', 'DOC',
Marco Ricci Annotate settings and selec...

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 1 month ago

276)   'PLC2701',
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 2 weeks ago

277)   # Too many public methods/arguments/returns/branches/locals doesn't really
278)   # apply here.
279)   'PLR0904', 'PLR0911', 'PLR0912', 'PLR0913', 'PLR0914', 'PLR0915',
280)   'PLR0916', 'PLR0917',
Marco Ricci Annotate settings and selec...

Marco Ricci authored 1 month ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

287) [tool.ruff.lint.flake8-copyright]
288) # Include hatch-enforced SPDX-FileCopyrightText in check.
289) 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 1 month ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

292) fixture-parentheses = false
293) mark-parentheses = false
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 month ago

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

Marco Ricci authored 1 month ago

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

Marco Ricci authored 2 weeks ago

296) [tool.ruff.lint.flake8-tidy-imports]
297) ban-relative-imports = "all"
298) 
299) [tool.ruff.lint.isort]
300) known-first-party = ["derivepassphrase"]
301) 
302) [tool.ruff.lint.pycodestyle]
303) ignore-overlong-task-comments = true  # for E501
304) max-doc-length = 72  # for W505
305) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 month ago

306) [tool.ruff.lint.pydocstyle]
307) convention = 'google'