790092cf0125f73dd864aaefbac58a78cd65007c
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

1) [build-system]
Marco Ricci Purge hatch-gettext build p...

Marco Ricci authored 10 months ago

2) requires = ["hatchling"]
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

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 Release 0.5.2

Marco Ricci authored 6 months ago

9) version = "0.5.2"
Marco Ricci Add support for Python 3.9

Marco Ricci authored 1 year ago

10) requires-python = ">= 3.9"
Marco Ricci Update copyright notices to...

Marco Ricci authored 1 year ago

11) license = { text = "zlib/libpng" }
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

12) keywords = []
13) authors = [
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

15) ]
16) classifiers = [
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

17)     "Development Status :: 4 - Beta",
18)     "Environment :: Console",
19)     "License :: OSI Approved :: zlib/libpng License",
20)     "Programming Language :: Python :: 3",
21)     "Programming Language :: Python :: 3.9",
22)     "Programming Language :: Python :: 3.10",
23)     "Programming Language :: Python :: 3.11",
24)     "Programming Language :: Python :: 3.12",
25)     "Programming Language :: Python :: 3.13",
Marco Ricci Assert compatibility with P...

Marco Ricci authored 7 months ago

26)     "Programming Language :: Python :: 3.14",
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

27)     "Programming Language :: Python :: Implementation :: CPython",
28)     "Programming Language :: Python :: Implementation :: PyPy",
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

29) ]
30) dependencies = [
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

31)     # We use click for the command-line interface.  We require version
32)     # 8.1.0 or higher due to click issue #1985.
33)     "click >= 8.1",
34)     # We include type annotations, and use facilities that are not
35)     # readily available in older Pythons (such as typing.Self).  These
36)     # are loaded from typing_extensions, instead of using explicit
37)     # version guards.
38)     "typing_extensions",
39)     # We read configuration files in JSON and TOML format.  The latter
40)     # is unavailable in the Python standard library until Python 3.11.
Marco Ricci Introduce SSH agent socket...

Marco Ricci authored 6 months ago

41)     'tomli; python_version < "3.11"',
42)     # We use PEP 654 Exception Groups.  Because of compatibility with
43)     # Python < 3.11, we cannot use the except* syntax, but rather use
44)     # a compatibility library.
45)     "exceptiongroup",
Marco Ricci Overhaul dependency and env...

Marco Ricci authored 1 year ago

46) ]
47) 
48) [project.optional-dependencies]
Marco Ricci Specify project dependencie...

Marco Ricci authored 1 year ago

49) dev = [
Marco Ricci Pin testing dependencies

Marco Ricci authored 7 months ago

50)     # dev - developers' setup
51)     #
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

52)     # Development uses the hatch build system, to isolate all tools in
53)     # their own virtual environment...
Marco Ricci Resolve dependency versions...

Marco Ricci authored 1 year ago

54)     "hatch >= 1.10",
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

55)     # ...but it is still sensible to have most static analysis tools
56)     # available in the main virtual environment as well, so that your
57)     # editor/IDE setup can access them as well.
Marco Ricci Resolve dependency versions...

Marco Ricci authored 1 year ago

58)     "mypy >= 1.0",
59)     "ruff >= 0.9.0",
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

60)     # Test dependencies should be installed as well, to have static
Marco Ricci Fix some test suite setup m...

Marco Ricci authored 6 months ago

61)     # analysis in the test suite working too.
62)     #
63)     # `packaging` is needed because the test suite compares version
64)     # numbers.
65)     #
66)     # `pytest-xdist` is used by `hatch test -p`, but for the `psutil`
67)     # extra, the `psutil` package provides no wheels for PyPy.  Users on
68)     # The Annoying OS are especially screwed if they lack the admin
69)     # priviledges necessary to install the developers' tools.  So skip
70)     # the extra, and accept that for PyPy environments, `hatch test -p`
71)     # will not be able to distinguish logical and physical CPU core
72)     # counts.
Marco Ricci Resolve dependency versions...

Marco Ricci authored 1 year ago

73)     "coverage[toml] >= 7.4",
74)     "coverage-enable-subprocess >= 1.0",
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

75)     "hypothesis >= 6.0",
76)     "packaging",
Marco Ricci Resolve dependency versions...

Marco Ricci authored 1 year ago

77)     "pytest >= 8.1",
78)     "pytest-randomly >= 3.15",
Marco Ricci Fix some test suite setup m...

Marco Ricci authored 6 months ago

79)     "pytest-xdist >= 3.6.0",
80)     'pytest-xdist[psutil] >= 3.6.0; platform_python_implementation != "PyPy"',
Marco Ricci Pin testing dependencies

Marco Ricci authored 7 months ago

81)     # Versions 6.130.13 through 6.135.1 of `hypothesis` use syntax only
82)     # available on Python 3.10 and later: `with (x as y, a as b)`
83)     'hypothesis != 6.130.13, != 6.131.*, != 6.132.*, != 6.133.*, != 6.134.*, != 6.135.0, != 6.135.1 ; python_version < "3.10"',
Marco Ricci Specify project dependencie...

Marco Ricci authored 1 year ago

84) ]
Marco Ricci Add dependency on cryptogra...

Marco Ricci authored 1 year ago

85) export = [
Marco Ricci Pin testing dependencies

Marco Ricci authored 7 months ago

86)     # export - additional dependencies for `derivepassphrase export`
87)     #
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

88)     # The vault configuration exporter relies on cryptography.
89)     # Version 38 was the first to include the `algorithms.AES256`
Marco Ricci Resolve dependency versions...

Marco Ricci authored 1 year ago

90)     # interface, instead of only the `algorithms.AES` interface, but
91)     # this was never tested, so we require the earliest cryptography
92)     # version we tested on.
93)     "cryptography >= 42.0.0",
Marco Ricci Add dependency on cryptogra...

Marco Ricci authored 1 year ago

94) ]
Marco Ricci Pin testing dependencies

Marco Ricci authored 7 months ago

95) export-dev-wheels = [
96)     # export-dev-wheels - wheel requirements for "export" in the "dev"
97)     # setup
98)     #
99)     # `cryptography` 44.0.0 does not publish wheels for PyPy 3.9
100)     # anymore.
101)     'cryptography < 44 ; python_version < "3.10" and platform_python_implementation == "PyPy"',
102)     # `cryptography` 44.0.1 is the first version to publish wheels for
103)     # PyPy 3.11.
104)     'cryptography > 44.0.1 ; python_version >= "3.11" and platform_python_implementation == "PyPy"',
105) ]
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

107) [project.scripts]
108) derivepassphrase = "derivepassphrase.cli:derivepassphrase"
109) 
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

111) Documentation = "https://the13thletter.info/derivepassphrase/"
Marco Ricci Update declared URLs (issue...

Marco Ricci authored 7 months ago

112) Issues = "https://the13thletter.info/derivepassphrase/latest/wishlist/"
113) Source = "https://git.schokokeks.org/derivepassphrase.git"
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

114) 
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

115) [tool.bumpversion]
Marco Ricci Release 0.5.2

Marco Ricci authored 6 months ago

116) current_version = "0.5.2"
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

117) # As of bump-my-version 0.32.0, version components are strictly
118) # hierarchical in the order of occurrence, and there is no support for
119) # pre-release markers.  The documentation suggests a fake "dev/rc/final"
120) # marker, with "final" being suppressed on output; effectively, it's
121) # major.minor.patch-n.m, where -n.m is suppressed if n is some maximum
122) # value and m is zero.  This sort of scales to multiple levels of pre-
123) # oder development releases (e.g. distinguished alpha versions and
124) # development versions in between alpha versions) if you manually
125) # increment the lower markers manually, in descending order, while no
126) # committing the result... but at that point you're not really gaining
127) # that much over calculating the new version number yourself and forcing
128) # that.
129) #
130) # The primary reason to still fill out these templates is to ensure that
131) # the version number correctly round-trips within bump-my-version.
132) parse = '''(?x)
133)     (?P<major>\d+)
134)     \.(?P<minor>\d+)
135)     (?:\.(?P<patch>\d+))?
136)     (?:
137)         (?P<pre_l>-dev|a|b|rc|)
138)         (?P<pre_n>[1-9][0-9]*)
139)     )?
140)     (?:
141)         [-.]
142)         (?P<dev_t>dev|final)
143)         (?P<dev_n>[1-9][0-9]*)
144)     )?
145) '''
146) serialize = [
Marco Ricci Fix bump-my-version config...

Marco Ricci authored 7 months ago

147)     '{major}.{minor}.{patch}{pre_l}{pre_n}.{dev_t}{dev_n}',
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

148)     '{major}.{minor}.{patch}{pre_l}{pre_n}',
149)     '{major}.{minor}.{patch}',
Marco Ricci Fix bump-my-version config...

Marco Ricci authored 7 months ago

150)     '{major}.{minor}{pre_l}{pre_n}.{dev_t}{dev_n}',
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

151)     '{major}.{minor}{pre_l}{pre_n}',
152)     '{major}.{minor}',
153) ]
154) search = '{current_version}'
155) replace = '{new_version}'
156) regex = false
157) ignore_missing_version = false
158) ignore_missing_files = false
159) tag = true
160) sign_tags = false
161) tag_name = '{new_version}'
162) tag_message = 'Release derivepassphrase v{new_version}'
163) allow_dirty = true
164) commit = true
165) message = 'Release {new_version}'
166) moveable_tags = []
167) commit_args = ""
168) setup_hooks = []
169) pre_commit_hooks = []
170) post_commit_hooks = []
171) 
172) [tool.bumpversion.parts.dev_t]
173) values = ['dev', '']
174) optional_value = ''
175) 
176) [tool.bumpversion.parts.dev_n]
177) values = []
178) first_value = '1'
179) 
180) [tool.bumpversion.parts.pre_l]
181) values = ['-dev', 'a', 'b', 'rc', '']
182) optional_value = ''
183) 
184) [tool.bumpversion.parts.pre_n]
185) values = []
186) first_value = '1'
187) 
Marco Ricci Fix the automatic version i...

Marco Ricci authored 6 months ago

188) [[tool.bumpversion.files]]
189) filename = 'src/derivepassphrase/__init__.py'
Marco Ricci Change the code style to us...

Marco Ricci authored 6 months ago

190) search = '^ *__version__ *= *"{current_version}"'
191) replace = '__version__ = "{new_version}"'
Marco Ricci Fix the automatic version i...

Marco Ricci authored 6 months ago

192) regex = true
193) 
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

194) [[tool.bumpversion.files]]
195) glob = 'src/derivepassphrase/*.py'
196) search = '# SPDX-FileCopyrightText: \d\d\d\d'
197) replace = '# SPDX-FileCopyrightText: {now:%Y}'
198) regex = true
199) 
200) [[tool.bumpversion.files]]
201) glob = 'src/derivepassphrase/*/*.py'
202) search = '# SPDX-FileCopyrightText: \d\d\d\d'
203) replace = '# SPDX-FileCopyrightText: {now:%Y}'
204) regex = true
205) 
206) [[tool.bumpversion.files]]
207) glob = 'tests/*.py'
208) search = '# SPDX-FileCopyrightText: \d\d\d\d'
209) replace = '# SPDX-FileCopyrightText: {now:%Y}'
210) regex = true
211) 
212) [[tool.bumpversion.files]]
213) filename = 'pyproject.toml'
Marco Ricci Release 0.5.1

Marco Ricci authored 7 months ago

214) search = '^ *version *= *"{current_version}"'
215) replace = 'version = "{new_version}"'
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

216) regex = true
217) 
218) [[tool.bumpversion.files]]
219) filename = 'pyproject.toml'
Marco Ricci Release 0.5.1

Marco Ricci authored 7 months ago

220) search = '^ *current_version *= *"{current_version}"'
221) replace = 'current_version = "{new_version}"'
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

222) regex = true
223) 
224) [[tool.bumpversion.files]]
Marco Ricci Fix bump-my-version config...

Marco Ricci authored 7 months ago

225) glob = 'share/man/man1/derivepassphrase*.1'
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

226) regex = true
Marco Ricci Fix bump-my-version config...

Marco Ricci authored 7 months ago

227) search = '^\.Dd +\d\d\d\d-\d\d-\d\d'
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

228) replace = '.Dd {now:%Y-%m-%d}'
229) 
230) [[tool.bumpversion.files]]
Marco Ricci Fix bump-my-version config...

Marco Ricci authored 7 months ago

231) glob = 'share/man/man1/derivepassphrase*.1'
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

232) regex = true
Marco Ricci Fix bump-my-version config...

Marco Ricci authored 7 months ago

233) search = '^\.Os +derivepassphrase +{current_version}'
234) replace = '.Os derivepassphrase {new_version}'
Marco Ricci Prepare `bump-my-version` f...

Marco Ricci authored 11 months ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

239) [tool.coverage.paths]
240) src = ["src"]
241) tests = ["tests"]
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

243) [tool.coverage.report]
244) skip_covered = false
245) skip_empty = true
246) precision = 3
247) partial_branches = [
248)     'pragma: no branch',
249) ]
250) exclude_also = [
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

251)     "if __name__ == .__main__.:",
252)     'if (?:typing\.)?TYPE_CHECKING:',
253)     "raise AssertionError",
254)     "raise NotImplementedError",
255)     'assert False',
256)     '(?:typing\.)?assert_never\(',
257)     '@overload',
258)     'class .*\(Protocol\):',
Marco Ricci Warn the user when `derivep...

Marco Ricci authored 1 year ago

259)     'pytest\.fail\(',
Marco Ricci Use a vault(1)-compatible n...

Marco Ricci authored 1 year ago

260)     '@(?:(?:pytest\.)?mark\.)?xfail\(',
Marco Ricci Comment on coverage exclusi...

Marco Ricci authored 6 months ago

261)     'class _Omitted:',
262)     'class _DummyModule:',
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 year ago

263) ]
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

264) 
Marco Ricci Comment on coverage exclusi...

Marco Ricci authored 6 months ago

265) # We use a bunch of "codes", similar to the "type: ignore" comments, as
266) # shorthand notation for why we are excluding a certain piece of code
267) # manually from coverage, instead of writing a verbose explanation at each
268) # call site:
269) #
270) # "external-api" and "unused": The code is defined by an external API not
271) # under our control, or it implements an external interface, and some of the
272) # branches of that code we do not yet use ("unused") or don't ever intend to
273) # use ("external-api").  In particular, in production and in testing use, we
274) # do not expect to hit these code branches unless there are errors in our
275) # code.
276) #
277) # "external": Whether or not we hit this code branch is non-deterministic,
278) # and dependent on external factors that are difficult or impossible for us
279) # to control, predict, or simulate.  We therefore categorically exclude all
280) # branches from coverage.  (Typically though, one particular branch *will*
281) # actually run.  We just don't know ahead of time which one.)  (While this
282) # applies to "choice of operating system" and "installed Python/library
283) # version" as well, these cases are usually tagged with more specific codes,
284) # or explained in long-form commentary.)
285) #
286) # "failsafe": Akin to assertions, these are used to catch "impossible"
287) # situations and to still fail in a controlled manner.  We do not expect to
288) # hit these code branches during production or testing.
289) #
290) # "debug", "internal" and "interactive": These code branches are not
291) # intended to be called by the general public ("debug", "internal"), or they
292) # are only intended to be called interactively ("interactive").  We do not
293) # expect to hit these code branches during production or testing.
294) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 year ago

295) [tool.coverage.run]
296) source_pkgs = ["derivepassphrase", "tests"]
297) branch = true
298) parallel = true
299) omit = [
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

300)     "__main__.py",
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 year ago

301) ]
Marco Ricci Instruct `coverage` to reco...

Marco Ricci authored 1 year ago

302) dynamic_context = 'test_function'
Marco Ricci Add tests for the configura...

Marco Ricci authored 8 months ago

303) concurrency = ['thread', 'multiprocessing']
304) sigterm = true
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

309) ]
310) 
311) [tool.hatch.build.targets.wheel]
Marco Ricci Make the manpages installab...

Marco Ricci authored 11 months ago

312) include = [
313)     'src/derivepassphrase',
Marco Ricci Automatically check and bui...

Marco Ricci authored 11 months ago

314)     'share/locale/',
Marco Ricci Make the manpages installab...

Marco Ricci authored 11 months ago

315)     'share/man/',
316) ]
317) sources = ['src']
Marco Ricci Fix Python package build co...

Marco Ricci authored 1 year ago

318) 
Marco Ricci Overhaul dependency and env...

Marco Ricci authored 1 year ago

319) [tool.hatch.env]
320) requires = [
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

321)     "hatch-mkdocs",
Marco Ricci Overhaul dependency and env...

Marco Ricci authored 1 year ago

322) ]
323) 
324) [tool.hatch.env.collectors.mkdocs.docs]
325) path = "mkdocs.yml"
326) 
Marco Ricci Fill out README and documen...

Marco Ricci authored 1 year ago

327) [tool.hatch.envs.docs]
328) extra-dependencies = [
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

329)     # Our documentation uses formatted function signatures (i.e. with
330)     # formatted type annotations), which requires `black`.
331)     "black",
332)     # We actually use functionality from MkDocs 1.6, so ensure the
333)     # version is at least this high.
334)     "mkdocs >= 1.6",
335)     # Our changelog is assembled from singular entries, orchestrated by
336)     # `scriv`.
337)     "scriv >= 1.4",
Marco Ricci Fill out README and documen...

Marco Ricci authored 1 year ago

338) ]
339) detached = false
340) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

343) dependencies = [
Marco Ricci Add static analysis and tes...

Marco Ricci authored 1 year ago

344)     # Override the default dependencies, lest the ruff requirements
345)     # conflict.
346) ]
347) features = [
348)     "dev",
Marco Ricci Specify project dependencie...

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

350) 
351) [tool.hatch.envs.hatch-test]
352) default-args = ['src', 'tests']
Marco Ricci Resolve dependency versions...

Marco Ricci authored 1 year ago

353) # See "dev" extra in main project section for commentary on the
354) # dependencies.  We override them here because hatch is too restrictive
355) # by default.
356) dependencies = [
357)     "coverage[toml] >= 7.4",
358)     "coverage-enable-subprocess >= 1.0",
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

359)     "hypothesis >= 6.0",
Marco Ricci Resolve dependency versions...

Marco Ricci authored 1 year ago

360)     "packaging",
361)     "pytest >= 8.1",
362)     "pytest-randomly >= 3.15",
Marco Ricci Fix some test suite setup m...

Marco Ricci authored 6 months ago

363)     "pytest-xdist >= 3.6.0",
364)     'pytest-xdist[psutil] >= 3.6.0; platform_python_implementation != "PyPy"',
Marco Ricci Pin testing dependencies

Marco Ricci authored 7 months ago

365)     'hypothesis != 6.130.13, != 6.131.*, != 6.132.*, != 6.133.*, != 6.134.*, != 6.135.0, != 6.135.1 ; python_version < "3.10"',
Marco Ricci Set up the "hypothesis" tes...

Marco Ricci authored 1 year ago

366) ]
367) matrix-name-format = '{variable}_{value}'
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 year ago

368) 
369) [[tool.hatch.envs.hatch-test.matrix]]
Marco Ricci Add CPython 3.14 to the lis...

Marco Ricci authored 2 months ago

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

Marco Ricci authored 1 year ago

371) cryptography = ["no", "yes"]
Marco Ricci Refactor code to run under...

Marco Ricci authored 1 year ago

372) parser-version = ["PEG"]
373) 
374) [[tool.hatch.envs.hatch-test.matrix]]
375) python = ["3.9", "pypy3.9"]
376) cryptography = ["no", "yes"]
377) parser-version = ["LL1"]
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

380) matrix.cryptography.features = [
381)     { value = "export", if = ["yes"] },
Marco Ricci Pin testing dependencies

Marco Ricci authored 7 months ago

382)     { value = "export-dev-wheels", if = ["yes"] },
Marco Ricci Merge topic branch 'clean-u...

Marco Ricci authored 1 year ago

383) ]
Marco Ricci Refactor code to run under...

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

387) 
388) [tool.hatch.envs.hatch-test.scripts]
389) run = "pytest --hypothesis-profile={env:HYPOTHESIS_PROFILE:default}{env:HATCH_TEST_ARGS:} {args}"
390) run-cov = "coverage run -m pytest --hypothesis-profile={env:HYPOTHESIS_PROFILE:default}{env:HATCH_TEST_ARGS:} {args}"
391) cov-combine = "coverage combine"
392) cov-report = "coverage report"
Marco Ricci Merge topic branch 'clean-u...

Marco Ricci authored 1 year ago

393) 
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

394) [tool.hatch.envs.types]
Marco Ricci Add command-line interface...

Marco Ricci authored 1 year ago

395) features = [
Marco Ricci Add static analysis and tes...

Marco Ricci authored 1 year ago

396)     "dev",
Marco Ricci Add command-line interface...

Marco Ricci authored 1 year ago

397)     "export",
398) ]
399) 
Marco Ricci Import initial project files

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

406) [tool.mypy]
407) files = ['src/**/*.py', 'tests/**/*.py']
Marco Ricci Fix usage of `mypy --python...

Marco Ricci authored 1 year ago

408) mypy_path = '$MYPY_CONFIG_FILE_DIR/src:$MYPY_CONFIG_FILE_DIR/other-stubs'
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 year ago

409) explicit_package_bases = true
410) implicit_reexport = false
411) sqlite_cache = true
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

414) [tool.pytest.ini_options]
Marco Ricci Ensure that `pytest` picks...

Marco Ricci authored 5 months ago

415) addopts = '--doctest-modules --dist=worksteal --import-mode=importlib'
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 year ago

416) pythonpath = ['src']
417) testpaths = ['src', 'tests']
418) xfail_strict = true
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 1 year ago

419) 
420) [tool.ruff]
421) line-length = 79
422) src = ["src"]
423) 
424) [tool.ruff.format]
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

427) preview = true
Marco Ricci Change the code style to us...

Marco Ricci authored 6 months ago

428) quote-style = "double"
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 1 year ago

429) 
430) [tool.ruff.lint]
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

433)     # check for E501, because this usually only happens when there is
Marco Ricci Fix automatic quality contr...

Marco Ricci authored 11 months ago

434)     # a text string that should be manually broken.  However, for
435)     # automated quality control, that specific check is turned off so
436)     # that the linting and formatting can proceed, and then *afterwards*
437)     # the files are re-linted.  We hope that any *true* E501 errors left
438)     # over from this *are* text strings that should be manually broken.
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 1 year ago

439)     'W191', 'E111', 'E114', 'E117', 'D206', 'D300', 'Q000', 'Q001',
440)     'Q002', 'Q003', 'COM812', 'COM819', 'ISC001', 'ISC002',
Marco Ricci Annotate settings and selec...

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

465) preview = true
466) # We select here in the order of presentation on the ruff documentation
467) # website.  ruff default selection (v0.6.2) is merely E4, E7, E9 and F.
468) select = [
469)     'F', 'E', 'W', 'C90', 'I', 'N', 'D', 'UP', 'YTT',
470)     'ANN', 'ASYNC', 'S', 'BLE', 'FBT', 'B', 'A', 'COM',
471)     'CPY', 'C4', 'DTZ', 'T10', 'DJ', 'EM', 'EXE', 'FA',
472)     'ISC', 'ICN', 'LOG', 'G', 'INP', 'PIE', 'T20', 'PYI',
Marco Ricci Update ruff to v0.8.x, refo...

Marco Ricci authored 1 year ago

473)     'PT', 'Q', 'RET', 'SLF', 'SLOT', 'SIM', 'TID', 'TC',
Marco Ricci Use `pathlib` for path or f...

Marco Ricci authored 1 year ago

474)     'INT', 'ARG', 'PTH', 'TD',
Marco Ricci Apply new ruff ruleset to c...

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

486) [tool.ruff.lint.per-file-ignores]
487) "**/scripts/*" = [
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

488)     # Suggested by hatch.
489)     'INP',
490)     # Suggested by hatch.
491)     'T20',
Marco Ricci Upgrade ruff to 0.6, and re...

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

493) "**/tests/**/*" = [
Marco Ricci Fix inconsistent indentatio...

Marco Ricci authored 1 year ago

494)     # Suggested by hatch, assumingly because it may be important to
495)     # verify that the value is exactly the empty string, and not just
496)     # any falsy value.
497)     'PLC1901',
498)     # Suggested by hatch, assumingly because tests may use "magic
499)     # values".
500)     'PLR2004',
501)     # Suggested by hatch, because tests are typically organized as
502)     # classes and instance methods but may not really be using the
503)     # `self` argument.
504)     'PLR6301',
505)     # Suggested by hatch, because these warnings may be precisely what
506)     # the tests are supposed to test.
507)     'S',
508)     # Suggested by hatch, because pytest-style tests conventionally
509)     # import code from each other via relative imports.
510)     'TID252',
511)     # Our tests regularly use arguments named `input` to store an input
512)     # (text-/byte-)string.
513)     'A002',
514)     # We regularly annotate pytest fixtures like monkeypatch as `Any`.
515)     'ANN401',
516)     # Our tests generally don't contain docstrings.
517)     'D', 'DOC',
518)     # Our tests are regularly parametrized with booleans, for benign
519)     # purposes.
520)     'FBT',
521)     # One of our standard modules is called `derivepassphrase._types`.
522)     # Importing this from the tests directory would then automatically
523)     # trigger `PLC2701`.
524)     'PLC2701',
525)     # Too many public methods/arguments/returns/branches/locals doesn't
526)     # really apply here.
527)     'PLR0904', 'PLR0911', 'PLR0912', 'PLR0913', 'PLR0914', 'PLR0915',
528)     'PLR0916', 'PLR0917',
529)     # To fully test the `derivepassphrase.cli` module (and a couple
530)     # other things), we need to call and to mock several internal
531)     # functions, which would automatically trigger `SLF001`.
532)     'SLF001',
533)     # pytest does not support sensible introspection of
534)     # `assert all(...)` expressions in tests the same way it supports
535)     # introspection in `asssert all([...])`.  So the extra list
536)     # comprehension actually improves debuggability in this case.
537)     'C419',
538)     # The tests sometimes include long strings (in non-Python formats)
539)     # that should be included verbatim, without artificial line
540)     # breaking, so they can be grepped for.
541)     'E501',
Marco Ricci Fix style issues with ruff...

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

544) [tool.ruff.lint.flake8-copyright]
545) # Include hatch-enforced SPDX-FileCopyrightText in check.
546) 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 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

549) fixture-parentheses = false
550) mark-parentheses = false
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

553) [tool.ruff.lint.flake8-tidy-imports]
554) ban-relative-imports = "all"
555) 
556) [tool.ruff.lint.isort]
557) known-first-party = ["derivepassphrase"]
558) 
559) [tool.ruff.lint.pycodestyle]
560) ignore-overlong-task-comments = true  # for E501
561) max-doc-length = 72  # for W505
562) 
Marco Ricci Sort sections in pyproject....

Marco Ricci authored 1 year ago

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

Marco Ricci authored 1 year ago

565) 
Marco Ricci Switch from towncrier to sc...

Marco Ricci authored 1 year ago

566) [tool.scriv]
Marco Ricci Store the version only in p...

Marco Ricci authored 11 months ago

567) version = "literal: pyproject.toml: project.version"