depsdev 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ # Python Rules
2
+
3
+ - Where possible, prefer duck-typing tests than `isinstance`, e.g. `hasattr(x, attr)` not `isinstance(x, SpecificClass)`
4
+ - Use modern Python 3.9+ syntax
5
+ - Prefer f-strings for formatting strings rather than `.format` or `%` formatting
6
+ - When creating log statements, never use runtime string formatting. Use the `extra` argument and % placeholders in the log message
7
+ - When generating union types, use the union operator, `|` , not the `typing.Union` type
8
+ - When merging dictionaries, use the union operator
9
+ - When writing type hints for standard generics like `dict`, `list`, `tuple`, use the PEP-585 spec, not `typing.Dict`, `typing.List`, etc.
10
+ - Use type annotations in function and method signatures, unless the rest of the code base does not have type signatures
11
+ - Do not add inline type annotations for local variables when they are declared and assigned in the same statement.
12
+ - Prefer `pathlib` over `os.path` for operations like path joining
13
+ - When using `open()` in text-mode, explicitly set `encoding` to `utf-8`
14
+ - Prefer `argparse` over `optparse`
15
+ - Use the builtin methods in the `itertools` module for common tasks on iterables rather than creating code to achieve the same result
16
+ - When creating dummy data, don't use "Foo" and "Bar", be more creative
17
+ - When creating dummy data in strings like names don't just create English data, create data in a range of languages like English, Spanish, Mandarin, and Hindi
18
+ - When asked to create a function, class, or other piece of standalone code, don't append example calls unless otherwise told to
@@ -0,0 +1,118 @@
1
+ name: main
2
+
3
+ on:
4
+ push:
5
+ branches: [main, test-me-*]
6
+ tags: ["*"]
7
+ pull_request:
8
+
9
+ jobs:
10
+ test:
11
+ strategy:
12
+ matrix:
13
+ python-version:
14
+ - "3.9"
15
+ - "3.10"
16
+ - "3.11"
17
+ - "3.12"
18
+ - "3.13"
19
+ platform:
20
+ - ubuntu-latest
21
+ # - macos-latest
22
+ # - windows-latest
23
+ runs-on: ${{ matrix.platform }}
24
+ env:
25
+ UV_PYTHON: ${{ matrix.python-version }}
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+
29
+ - name: Install uv and set the python version
30
+ uses: astral-sh/setup-uv@v6
31
+
32
+ - name: Install the project
33
+ run: uv sync --extra tests
34
+ # run: uv sync --locked --all-extras --dev
35
+
36
+ - name: Run tests
37
+ run: uv run pytest tests
38
+
39
+ build:
40
+ name: Build distribution 📦
41
+ needs:
42
+ - test
43
+ runs-on: ubuntu-latest
44
+ steps:
45
+ - uses: actions/checkout@v4
46
+
47
+ - name: Install uv and set the python version
48
+ uses: astral-sh/setup-uv@v6
49
+
50
+ - name: Build package
51
+ run: uv build
52
+
53
+ - name: Store the distribution packages
54
+ uses: actions/upload-artifact@v4
55
+ with:
56
+ name: python-package-distributions
57
+ path: dist/
58
+
59
+ publish-to-pypi:
60
+ name: upload release to PyPI
61
+ if: ${{ startsWith(github.ref, 'refs/tags/') }} # only publish to PyPI on tag pushes
62
+ needs:
63
+ - build
64
+ runs-on: ubuntu-latest
65
+ environment: pypi
66
+ permissions:
67
+ id-token: write # IMPORTANT: mandatory for trusted publishing
68
+
69
+ steps:
70
+ - name: Download all the dists
71
+ uses: actions/download-artifact@v4
72
+ with:
73
+ name: python-package-distributions
74
+ path: dist/
75
+ - name: Publish package distributions to PyPI
76
+ uses: pypa/gh-action-pypi-publish@release/v1
77
+
78
+ github-release:
79
+ name: Sign the Python 🐍 distribution 📦 with Sigstore and upload them to GitHub Release
80
+ if: ${{ startsWith(github.ref, 'refs/tags/') }} # only publish to GitHub Releases on tag pushes
81
+ needs:
82
+ - build
83
+ runs-on: ubuntu-latest
84
+
85
+ permissions:
86
+ contents: write # IMPORTANT: mandatory for making GitHub Releases
87
+ id-token: write # IMPORTANT: mandatory for sigstore
88
+
89
+ steps:
90
+ - name: Download all the dists
91
+ uses: actions/download-artifact@v4
92
+ with:
93
+ name: python-package-distributions
94
+ path: dist/
95
+ - name: Sign the dists with Sigstore
96
+ uses: sigstore/gh-action-sigstore-python@v3.0.0
97
+ with:
98
+ inputs: >-
99
+ ./dist/*.tar.gz
100
+ ./dist/*.whl
101
+ - name: Create GitHub Release
102
+ env:
103
+ GITHUB_TOKEN: ${{ github.token }}
104
+ run: >-
105
+ gh release create
106
+ '${{ github.ref_name }}'
107
+ --repo '${{ github.repository }}'
108
+ --generate-notes
109
+ - name: Upload artifact signatures to GitHub Release
110
+ env:
111
+ GITHUB_TOKEN: ${{ github.token }}
112
+ # Upload to GitHub Release using the `gh` CLI.
113
+ # `dist/` contains the built packages, and the
114
+ # sigstore-produced signatures and certificates.
115
+ run: >-
116
+ gh release upload
117
+ '${{ github.ref_name }}' dist/**
118
+ --repo '${{ github.repository }}'
@@ -0,0 +1,182 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # Ruff stuff:
171
+ .ruff_cache/
172
+
173
+ # PyPI configuration file
174
+ .pypirc
175
+ _version.py
176
+ __TEMP_LAMBDA_DEV_SERVER_HELPER_DO_NOT_CHECK_INTO_GIT__*
177
+ temp/
178
+ .DS_Store
179
+ *.dist-info/
180
+
181
+ uv.lock
182
+ requirements.txt
@@ -0,0 +1,81 @@
1
+ ci:
2
+ skip:
3
+ - uv-lock
4
+ - taplo-lint
5
+ - uv-mypy
6
+ - uv-pyrefly
7
+ - uv-ty
8
+ - uv-pyright
9
+ - uv-test
10
+ repos:
11
+ - repo: https://github.com/astral-sh/uv-pre-commit
12
+ rev: 0.8.4
13
+ hooks:
14
+ - id: uv-lock
15
+ - id: uv-export
16
+ - repo: https://github.com/ComPWA/mirrors-taplo
17
+ rev: "v0.9.3"
18
+ hooks:
19
+ - id: taplo-format
20
+ - id: taplo-lint
21
+ - repo: https://github.com/astral-sh/ruff-pre-commit
22
+ rev: v0.12.7
23
+ hooks:
24
+ - id: ruff-check
25
+ types_or: [python, pyi, jupyter]
26
+ args: [--fix]
27
+ - id: ruff-format
28
+ types_or: [python, pyi, jupyter]
29
+ - repo: https://github.com/pre-commit/pre-commit-hooks
30
+ rev: v5.0.0
31
+ hooks:
32
+ - id: trailing-whitespace
33
+ - id: end-of-file-fixer
34
+ - id: check-yaml
35
+ - id: debug-statements
36
+ - id: name-tests-test
37
+ - id: requirements-txt-fixer
38
+ - repo: https://github.com/pre-commit/mirrors-mypy
39
+ rev: v1.17.1
40
+ hooks:
41
+ - id: mypy
42
+ - repo: local
43
+ hooks:
44
+ - id: uv-mypy
45
+ name: uv-mypy
46
+ entry: env VIRTUAL_ENV= uv run --extra types mypy
47
+ args: [--ignore-missing-imports, --scripts-are-modules]
48
+ language: python
49
+ 'types_or': [python, pyi]
50
+ require_serial: true
51
+ additional_dependencies: [uv]
52
+ - id: uv-pyrefly
53
+ name: uv-pyrefly
54
+ entry: env VIRTUAL_ENV= uv run --extra types pyrefly check
55
+ language: python
56
+ 'types_or': [python, pyi]
57
+ require_serial: true
58
+ additional_dependencies: [uv]
59
+ - id: uv-ty
60
+ name: uv-ty
61
+ entry: env VIRTUAL_ENV= uv run --extra types ty check
62
+ language: python
63
+ 'types_or': [python, pyi]
64
+ require_serial: true
65
+ additional_dependencies: [uv]
66
+ stages: [manual]
67
+ - id: uv-pyright
68
+ name: uv-pyright
69
+ entry: env VIRTUAL_ENV= uv run --extra types pyright
70
+ language: python
71
+ 'types_or': [python, pyi]
72
+ require_serial: true
73
+ additional_dependencies: [uv]
74
+ - id: uv-test
75
+ name: uv-test
76
+ entry: env VIRTUAL_ENV= uv run --extra tests pytest
77
+ language: python
78
+ types: [python]
79
+ pass_filenames: false
80
+ always_run: true
81
+ additional_dependencies: [uv]
@@ -0,0 +1 @@
1
+ 3.9
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present Flavio Amurrio <25621374+FlavioAmurrioCS@users.noreply.github.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
depsdev-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.4
2
+ Name: depsdev
3
+ Version: 0.0.1
4
+ Summary: Python wrapper for https://deps.dev/ API
5
+ Project-URL: Documentation, https://github.com/FlavioAmurrioCS/depsdev#readme
6
+ Project-URL: Issues, https://github.com/FlavioAmurrioCS/depsdev/issues
7
+ Project-URL: Source, https://github.com/FlavioAmurrioCS/depsdev
8
+ Author-email: Flavio Amurrio <25621374+FlavioAmurrioCS@users.noreply.github.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE.txt
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: Implementation :: CPython
20
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
21
+ Requires-Python: >=3.9
22
+ Provides-Extra: tests
23
+ Requires-Dist: pytest; extra == 'tests'
24
+ Requires-Dist: tomli; (python_version < '3.11') and extra == 'tests'
25
+ Provides-Extra: types
26
+ Requires-Dist: mypy; extra == 'types'
27
+ Requires-Dist: pyrefly; extra == 'types'
28
+ Requires-Dist: pyright[nodejs]; extra == 'types'
29
+ Requires-Dist: pytest; extra == 'types'
30
+ Requires-Dist: tomli; (python_version < '3.11') and extra == 'types'
31
+ Requires-Dist: ty; extra == 'types'
32
+ Requires-Dist: typing-extensions; extra == 'types'
33
+ Description-Content-Type: text/markdown
34
+
35
+ # depsdev
36
+
37
+ [![PyPI - Version](https://img.shields.io/pypi/v/depsdev.svg)](https://pypi.org/project/depsdev)
38
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/depsdev.svg)](https://pypi.org/project/depsdev)
39
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/FlavioAmurrioCS/depsdev/main.svg)](https://results.pre-commit.ci/latest/github/FlavioAmurrioCS/depsdev/main)
40
+
41
+ -----
42
+
43
+ ## Table of Contents
44
+
45
+ - [Installation](#installation)
46
+ - [License](#license)
47
+
48
+ ## Installation
49
+
50
+ ```console
51
+ pip install depsdev
52
+ ```
53
+
54
+ ## License
55
+
56
+ `depsdev` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
@@ -0,0 +1,22 @@
1
+ # depsdev
2
+
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/depsdev.svg)](https://pypi.org/project/depsdev)
4
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/depsdev.svg)](https://pypi.org/project/depsdev)
5
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/FlavioAmurrioCS/depsdev/main.svg)](https://results.pre-commit.ci/latest/github/FlavioAmurrioCS/depsdev/main)
6
+
7
+ -----
8
+
9
+ ## Table of Contents
10
+
11
+ - [Installation](#installation)
12
+ - [License](#license)
13
+
14
+ ## Installation
15
+
16
+ ```console
17
+ pip install depsdev
18
+ ```
19
+
20
+ ## License
21
+
22
+ `depsdev` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
@@ -0,0 +1,184 @@
1
+ [build-system]
2
+ requires = ["hatchling", "hatch-vcs"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "depsdev"
7
+ dynamic = ["version"]
8
+ description = "Python wrapper for https://deps.dev/ API"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "MIT"
12
+ keywords = []
13
+ authors = [
14
+ { name = "Flavio Amurrio", email = "25621374+FlavioAmurrioCS@users.noreply.github.com" },
15
+ ]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Programming Language :: Python",
19
+ "Programming Language :: Python :: 3.9",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Programming Language :: Python :: 3.14",
25
+ "Programming Language :: Python :: Implementation :: CPython",
26
+ "Programming Language :: Python :: Implementation :: PyPy",
27
+ ]
28
+ dependencies = [
29
+ ]
30
+
31
+ [project.optional-dependencies]
32
+ tests = [
33
+ "pytest",
34
+ "tomli ; python_version < '3.11'",
35
+ ]
36
+ types = [
37
+ "depsdev[tests]",
38
+ "typing-extensions",
39
+ "mypy",
40
+ "pyrefly",
41
+ "pyright[nodejs]",
42
+ "ty",
43
+ ]
44
+
45
+ [project.urls]
46
+ Documentation = "https://github.com/FlavioAmurrioCS/depsdev#readme"
47
+ Issues = "https://github.com/FlavioAmurrioCS/depsdev/issues"
48
+ Source = "https://github.com/FlavioAmurrioCS/depsdev"
49
+
50
+ [project.scripts]
51
+ depsdev = "depsdev.__main__:main"
52
+
53
+ ###############################################################################
54
+ # region: hatch
55
+ ###############################################################################
56
+ [tool.hatch.version]
57
+ source = "vcs"
58
+
59
+ [tool.hatch.build.hooks.vcs]
60
+ version-file = "src/depsdev/_version.py"
61
+
62
+ [tool.hatch.envs.hatch-test]
63
+ extra-dependencies = [
64
+ "depsdev[tests]",
65
+ ]
66
+
67
+ [tool.hatch.envs.types]
68
+ extra-dependencies = [
69
+ "mypy>=1.0.0",
70
+ "depsdev[types]",
71
+ ]
72
+
73
+ [tool.hatch.envs.types.scripts]
74
+ check = "mypy --install-types --non-interactive {args:src/depsdev tests}"
75
+
76
+ [[tool.hatch.envs.hatch-test.matrix]]
77
+ python = [
78
+ "3.9",
79
+ "3.10",
80
+ "3.11",
81
+ "3.12",
82
+ "3.13",
83
+ "3.14",
84
+ ]
85
+ ###############################################################################
86
+ # endregion: hatch
87
+ ###############################################################################
88
+
89
+ ###############################################################################
90
+ # region: uv
91
+ ###############################################################################
92
+ [tool.uv.pip]
93
+ index-url = "https://pypi.org/simple"
94
+ ###############################################################################
95
+ # endregion: uv
96
+ ###############################################################################
97
+
98
+ ###############################################################################
99
+ # region: coverage
100
+ ###############################################################################
101
+ [tool.coverage.run]
102
+ source_pkgs = ["depsdev", "tests"]
103
+ branch = true
104
+ parallel = true
105
+ omit = [
106
+ ]
107
+
108
+ [tool.coverage.paths]
109
+ depsdev = ["src/depsdev"]
110
+ tests = ["tests"]
111
+
112
+ [tool.coverage.report]
113
+ exclude_lines = [
114
+ "no cov",
115
+ "if __name__ == .__main__.:",
116
+ "if TYPE_CHECKING:",
117
+ ]
118
+ ###############################################################################
119
+ # endregion: coverage
120
+ ###############################################################################
121
+
122
+ ###############################################################################
123
+ # region: pyright
124
+ ###############################################################################
125
+ [tool.pyright]
126
+ pythonVersion = "3.9"
127
+ ###############################################################################
128
+ # endregion: pyright
129
+ ###############################################################################
130
+
131
+ ###############################################################################
132
+ # region: mypy
133
+ ###############################################################################
134
+ [tool.mypy]
135
+ python_version = "3.9"
136
+ check_untyped_defs = true
137
+ disallow_any_generics = true
138
+ disallow_incomplete_defs = true
139
+ disallow_untyped_defs = true
140
+ no_implicit_optional = true
141
+ warn_redundant_casts = true
142
+ warn_unused_ignores = true
143
+ ###############################################################################
144
+ # endregion: mypy
145
+ ###############################################################################
146
+
147
+ ###############################################################################
148
+ # region: ruff
149
+ ###############################################################################
150
+ [tool.hatch.envs.hatch-static-analysis]
151
+ config-path = "none"
152
+
153
+ [tool.ruff.lint.isort]
154
+ force-single-line = true
155
+
156
+ [tool.ruff]
157
+ line-length = 100
158
+
159
+ [tool.ruff.lint]
160
+ select = [
161
+ "ALL",
162
+ ]
163
+ ignore = [
164
+ "COM812", # missing-trailing-comma
165
+ "D", # pydocstyle
166
+ "ERA001", # commented-out-code
167
+ "EXE003", # shebang-missing-python
168
+ "ISC001", # single-line-implicit-string-concatenation
169
+ "PTH", # flake8-use-pathlib
170
+ "T20", # flake8-print
171
+ "PLC0415", # import-outside-top-level
172
+ ]
173
+
174
+ [tool.ruff.format]
175
+ docstring-code-format = true
176
+ docstring-code-line-length = 100
177
+
178
+ [tool.ruff.lint.per-file-ignores]
179
+ "tests/**/*.py" = [
180
+ "S101",
181
+ ]
182
+ ###############################################################################
183
+ # endregion: ruff
184
+ ###############################################################################
File without changes
@@ -0,0 +1,14 @@
1
+ from __future__ import annotations
2
+
3
+
4
+ def main(argv: list[str] | None = None) -> int:
5
+ import argparse
6
+
7
+ parser = argparse.ArgumentParser()
8
+ args = parser.parse_args(argv)
9
+ print(f"Arguments: {vars(args)=}")
10
+ return 0
11
+
12
+
13
+ if __name__ == "__main__":
14
+ raise SystemExit(main())
@@ -0,0 +1,21 @@
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
6
+ TYPE_CHECKING = False
7
+ if TYPE_CHECKING:
8
+ from typing import Tuple
9
+ from typing import Union
10
+
11
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
12
+ else:
13
+ VERSION_TUPLE = object
14
+
15
+ version: str
16
+ __version__: str
17
+ __version_tuple__: VERSION_TUPLE
18
+ version_tuple: VERSION_TUPLE
19
+
20
+ __version__ = version = '0.0.1'
21
+ __version_tuple__ = version_tuple = (0, 0, 1)
File without changes
@@ -0,0 +1,19 @@
1
+ [formatting]
2
+ align_entries = false # Align entries vertically. Entries that have table headers, comments, or blank lines between them are not aligned. false
3
+ align_comments = true # Align consecutive comments after entries and items vertically. This applies to comments that are after entries or array items. true
4
+ array_trailing_comma = true # Put trailing commas for multiline arrays. true
5
+ array_auto_expand = false # Automatically expand arrays to multiple lines true
6
+ array_auto_collapse = false # Automatically collapse arrays if they fit in one line. true
7
+ compact_arrays = true # Omit whitespace padding inside single-line arrays. true
8
+ compact_inline_tables = false # Omit whitespace padding inside inline tables. false
9
+ inline_table_expand = true # Expand values (e.g. arrays) inside inline tables. true
10
+ compact_entries = false # Omit whitespace around =. false
11
+ column_width = 80 # Target maximum column width after which arrays are expanded into new lines. 80
12
+ indent_tables = false # Indent subtables if they come in order. false
13
+ indent_entries = false # Indent entries under tables. false
14
+ indent_string = " " # Indentation to use, should be tabs or spaces but technically could be anything. 2 spaces (" ")
15
+ trailing_newline = true # Add trailing newline to the source. true
16
+ reorder_keys = false # Alphabetically reorder keys that are not separated by blank lines. false
17
+ reorder_arrays = false # Alphabetically reorder array values that are not separated by blank lines. false
18
+ allowed_blank_lines = 2 # The maximum amount of consecutive blank lines allowed. 2
19
+ crlf = false # Use CRLF line endings. false
File without changes
@@ -0,0 +1,5 @@
1
+ from __future__ import annotations
2
+
3
+
4
+ def test_main() -> None:
5
+ assert True
@@ -0,0 +1,34 @@
1
+ from __future__ import annotations
2
+
3
+ import logging
4
+ import subprocess
5
+ import sys
6
+ from typing import TYPE_CHECKING
7
+
8
+ import pytest
9
+
10
+ if sys.version_info >= (3, 11):
11
+ import tomllib
12
+ else:
13
+ import tomli as tomllib # type: ignore[import-not-found,unused-ignore]
14
+
15
+
16
+ if TYPE_CHECKING:
17
+ from collections.abc import Generator
18
+ logger = logging.getLogger(__name__)
19
+
20
+
21
+ def entrypoints() -> Generator[tuple[str, str], None, None]:
22
+ with open("pyproject.toml", "rb") as f:
23
+ pyproject = tomllib.load(f)
24
+ yield from pyproject["project"]["scripts"].items()
25
+
26
+
27
+ @pytest.mark.parametrize("pair", entrypoints())
28
+ def test_help(pair: tuple[str, str]) -> None:
29
+ k, v = pair
30
+ result = subprocess.run([k, "--help"], check=False, capture_output=True, text=True) # noqa: S603
31
+ if result.returncode != 0:
32
+ logger.error(result.stderr)
33
+ msg = f"Error running {k} --help"
34
+ raise AssertionError(msg)