relay-app 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.
- relay_app-0.0.1/.gitignore +141 -0
- relay_app-0.0.1/CHANGELOG.md +38 -0
- relay_app-0.0.1/LICENSE +21 -0
- relay_app-0.0.1/PKG-INFO +135 -0
- relay_app-0.0.1/README.md +104 -0
- relay_app-0.0.1/pyproject.toml +261 -0
- relay_app-0.0.1/relay/__init__.py +6 -0
- relay_app-0.0.1/relay/__main__.py +6 -0
- relay_app-0.0.1/relay/_version.py +12 -0
- relay_app-0.0.1/relay/cli.py +24 -0
- relay_app-0.0.1/relay/constants.py +1 -0
- relay_app-0.0.1/relay/exceptions.py +21 -0
- relay_app-0.0.1/relay/relay.py +6 -0
- relay_app-0.0.1/relay/utils.py +1 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
docs/source
|
|
2
|
+
|
|
3
|
+
# From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py,cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
90
|
+
__pypackages__/
|
|
91
|
+
|
|
92
|
+
# Celery stuff
|
|
93
|
+
celerybeat-schedule
|
|
94
|
+
celerybeat.pid
|
|
95
|
+
|
|
96
|
+
# SageMath parsed files
|
|
97
|
+
*.sage.py
|
|
98
|
+
|
|
99
|
+
# Environments
|
|
100
|
+
.env
|
|
101
|
+
.venv
|
|
102
|
+
env/
|
|
103
|
+
venv/
|
|
104
|
+
ENV/
|
|
105
|
+
env.bak/
|
|
106
|
+
venv.bak/
|
|
107
|
+
|
|
108
|
+
# Spyder project settings
|
|
109
|
+
.spyderproject
|
|
110
|
+
.spyproject
|
|
111
|
+
|
|
112
|
+
# Rope project settings
|
|
113
|
+
.ropeproject
|
|
114
|
+
|
|
115
|
+
# ty
|
|
116
|
+
.ty/
|
|
117
|
+
|
|
118
|
+
# Pyre type checker
|
|
119
|
+
.pyre/
|
|
120
|
+
|
|
121
|
+
# pytype static type analyzer
|
|
122
|
+
.pytype/
|
|
123
|
+
|
|
124
|
+
# Cython debug symbols
|
|
125
|
+
cython_debug/
|
|
126
|
+
|
|
127
|
+
# Vscode config files
|
|
128
|
+
.vscode/
|
|
129
|
+
|
|
130
|
+
# Exclude .DS_Store files from being added
|
|
131
|
+
.DS_Store
|
|
132
|
+
|
|
133
|
+
# PyCharm
|
|
134
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
135
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
136
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
137
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
138
|
+
.idea/
|
|
139
|
+
|
|
140
|
+
# local tests
|
|
141
|
+
local-test/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [0.0.2] - <Unreleased>
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
-
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
-
|
|
17
|
+
|
|
18
|
+
### Deprecated
|
|
19
|
+
|
|
20
|
+
-
|
|
21
|
+
|
|
22
|
+
### Removed
|
|
23
|
+
|
|
24
|
+
-
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
-
|
|
29
|
+
|
|
30
|
+
## Security
|
|
31
|
+
|
|
32
|
+
-
|
|
33
|
+
|
|
34
|
+
## [0.0.1] - 2026-08-30
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- Stub release
|
relay_app-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Visesh Prasad
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
relay_app-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: relay-app
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: This is a template repository for Python projects that use uv for their dependency management.
|
|
5
|
+
Project-URL: Homepage, https://github.com/viseshrp/relay
|
|
6
|
+
Project-URL: Repository, https://github.com/viseshrp/relay
|
|
7
|
+
Project-URL: Documentation, https://github.com/viseshrp/relay/blob/main/README.md
|
|
8
|
+
Project-URL: Changelog, https://github.com/viseshrp/relay/blob/main/CHANGELOG.md
|
|
9
|
+
Project-URL: Bug-Tracker, https://github.com/viseshrp/relay/issues
|
|
10
|
+
Project-URL: CI, https://github.com/viseshrp/relay/actions
|
|
11
|
+
Author-email: Visesh Prasad <viseshrprasad@gmail.com>
|
|
12
|
+
License-Expression: MIT
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Keywords: python
|
|
15
|
+
Classifier: Development Status :: 4 - Beta
|
|
16
|
+
Classifier: Environment :: Console
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Natural Language :: English
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Programming Language :: Python
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
27
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
|
+
Requires-Python: <4.0,>=3.10
|
|
29
|
+
Requires-Dist: click>=8.5.0
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# relay
|
|
33
|
+
|
|
34
|
+
[](https://pypi.org/project/relay/)
|
|
35
|
+
[](https://pypi.org/project/relay/)
|
|
36
|
+
[](https://github.com/viseshrp/relay/actions/workflows/main.yml)
|
|
37
|
+
[](https://codecov.io/gh/viseshrp/relay)
|
|
38
|
+
[](https://github.com/viseshrp/relay/blob/main/LICENSE)
|
|
39
|
+
[](https://docs.astral.sh/ruff/formatter/)
|
|
40
|
+
[](https://docs.astral.sh/ruff/)
|
|
41
|
+
[](https://docs.astral.sh/ty/)
|
|
42
|
+
|
|
43
|
+
> This is a template repository for Python projects that use uv for their dependency management.
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
## 🚀 Why this project exists
|
|
48
|
+
|
|
49
|
+
Explain the problem this tool solves or the goal it's intended to fulfill.
|
|
50
|
+
|
|
51
|
+
## 🧠 How this project works
|
|
52
|
+
|
|
53
|
+
Explain how the tool works.
|
|
54
|
+
|
|
55
|
+
## 📐 Requirements
|
|
56
|
+
|
|
57
|
+
* Python >= 3.10
|
|
58
|
+
|
|
59
|
+
## 🏁 Initial project setup
|
|
60
|
+
|
|
61
|
+
Cruft creates `.cruft.json` after the template finishes generating the project, so the template initializes Git without
|
|
62
|
+
making a commit. Create the lockfile, validate the generated project, and then make the first commit:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
uv sync
|
|
66
|
+
uv run pre-commit install
|
|
67
|
+
git add .
|
|
68
|
+
make check
|
|
69
|
+
make test-local
|
|
70
|
+
git add .
|
|
71
|
+
git commit -m "Initial commit"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The first commit will include both Cruft's template-tracking file (`.cruft.json`) and uv's reproducibility lockfile
|
|
75
|
+
(`uv.lock`).
|
|
76
|
+
|
|
77
|
+
## 📦 Installation
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install relay
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 🧪 Usage
|
|
84
|
+
|
|
85
|
+
* To view the help message, run the following command:
|
|
86
|
+
|
|
87
|
+
<!-- [[[cog
|
|
88
|
+
import cog
|
|
89
|
+
from click.testing import CliRunner
|
|
90
|
+
|
|
91
|
+
from relay.cli import main
|
|
92
|
+
|
|
93
|
+
result = CliRunner().invoke(
|
|
94
|
+
main,
|
|
95
|
+
["--help"],
|
|
96
|
+
prog_name="relay",
|
|
97
|
+
)
|
|
98
|
+
if result.exit_code != 0:
|
|
99
|
+
raise RuntimeError(result.output) from result.exception
|
|
100
|
+
|
|
101
|
+
cog.outl("```console")
|
|
102
|
+
cog.outl("$ " + "relay" + " --help")
|
|
103
|
+
cog.out(result.output)
|
|
104
|
+
cog.outl("```")
|
|
105
|
+
]]] -->
|
|
106
|
+
```console
|
|
107
|
+
$ relay --help
|
|
108
|
+
Usage: relay [OPTIONS] <what_you_worked_on>
|
|
109
|
+
|
|
110
|
+
Relay CLI.
|
|
111
|
+
|
|
112
|
+
Example usages:
|
|
113
|
+
|
|
114
|
+
Options:
|
|
115
|
+
-v, --version Show the version and exit.
|
|
116
|
+
-h, --help Show this message and exit.
|
|
117
|
+
```
|
|
118
|
+
<!-- [[[end]]] -->
|
|
119
|
+
|
|
120
|
+
## 🛠️ Features
|
|
121
|
+
|
|
122
|
+
* Does stuff
|
|
123
|
+
|
|
124
|
+
## 🧾 Changelog
|
|
125
|
+
|
|
126
|
+
See [CHANGELOG.md](https://github.com/viseshrp/relay/blob/main/CHANGELOG.md)
|
|
127
|
+
|
|
128
|
+
## 🙏 Credits
|
|
129
|
+
|
|
130
|
+
* [Click](https://click.palletsprojects.com), for enabling delightful CLI development.
|
|
131
|
+
* Inspired by [Simon Willison](https://github.com/simonw)'s work.
|
|
132
|
+
|
|
133
|
+
## 📄 License
|
|
134
|
+
|
|
135
|
+
MIT © [Visesh Prasad](https://github.com/viseshrp)
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# relay
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/relay/)
|
|
4
|
+
[](https://pypi.org/project/relay/)
|
|
5
|
+
[](https://github.com/viseshrp/relay/actions/workflows/main.yml)
|
|
6
|
+
[](https://codecov.io/gh/viseshrp/relay)
|
|
7
|
+
[](https://github.com/viseshrp/relay/blob/main/LICENSE)
|
|
8
|
+
[](https://docs.astral.sh/ruff/formatter/)
|
|
9
|
+
[](https://docs.astral.sh/ruff/)
|
|
10
|
+
[](https://docs.astral.sh/ty/)
|
|
11
|
+
|
|
12
|
+
> This is a template repository for Python projects that use uv for their dependency management.
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
## 🚀 Why this project exists
|
|
17
|
+
|
|
18
|
+
Explain the problem this tool solves or the goal it's intended to fulfill.
|
|
19
|
+
|
|
20
|
+
## 🧠 How this project works
|
|
21
|
+
|
|
22
|
+
Explain how the tool works.
|
|
23
|
+
|
|
24
|
+
## 📐 Requirements
|
|
25
|
+
|
|
26
|
+
* Python >= 3.10
|
|
27
|
+
|
|
28
|
+
## 🏁 Initial project setup
|
|
29
|
+
|
|
30
|
+
Cruft creates `.cruft.json` after the template finishes generating the project, so the template initializes Git without
|
|
31
|
+
making a commit. Create the lockfile, validate the generated project, and then make the first commit:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uv sync
|
|
35
|
+
uv run pre-commit install
|
|
36
|
+
git add .
|
|
37
|
+
make check
|
|
38
|
+
make test-local
|
|
39
|
+
git add .
|
|
40
|
+
git commit -m "Initial commit"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The first commit will include both Cruft's template-tracking file (`.cruft.json`) and uv's reproducibility lockfile
|
|
44
|
+
(`uv.lock`).
|
|
45
|
+
|
|
46
|
+
## 📦 Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install relay
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 🧪 Usage
|
|
53
|
+
|
|
54
|
+
* To view the help message, run the following command:
|
|
55
|
+
|
|
56
|
+
<!-- [[[cog
|
|
57
|
+
import cog
|
|
58
|
+
from click.testing import CliRunner
|
|
59
|
+
|
|
60
|
+
from relay.cli import main
|
|
61
|
+
|
|
62
|
+
result = CliRunner().invoke(
|
|
63
|
+
main,
|
|
64
|
+
["--help"],
|
|
65
|
+
prog_name="relay",
|
|
66
|
+
)
|
|
67
|
+
if result.exit_code != 0:
|
|
68
|
+
raise RuntimeError(result.output) from result.exception
|
|
69
|
+
|
|
70
|
+
cog.outl("```console")
|
|
71
|
+
cog.outl("$ " + "relay" + " --help")
|
|
72
|
+
cog.out(result.output)
|
|
73
|
+
cog.outl("```")
|
|
74
|
+
]]] -->
|
|
75
|
+
```console
|
|
76
|
+
$ relay --help
|
|
77
|
+
Usage: relay [OPTIONS] <what_you_worked_on>
|
|
78
|
+
|
|
79
|
+
Relay CLI.
|
|
80
|
+
|
|
81
|
+
Example usages:
|
|
82
|
+
|
|
83
|
+
Options:
|
|
84
|
+
-v, --version Show the version and exit.
|
|
85
|
+
-h, --help Show this message and exit.
|
|
86
|
+
```
|
|
87
|
+
<!-- [[[end]]] -->
|
|
88
|
+
|
|
89
|
+
## 🛠️ Features
|
|
90
|
+
|
|
91
|
+
* Does stuff
|
|
92
|
+
|
|
93
|
+
## 🧾 Changelog
|
|
94
|
+
|
|
95
|
+
See [CHANGELOG.md](https://github.com/viseshrp/relay/blob/main/CHANGELOG.md)
|
|
96
|
+
|
|
97
|
+
## 🙏 Credits
|
|
98
|
+
|
|
99
|
+
* [Click](https://click.palletsprojects.com), for enabling delightful CLI development.
|
|
100
|
+
* Inspired by [Simon Willison](https://github.com/simonw)'s work.
|
|
101
|
+
|
|
102
|
+
## 📄 License
|
|
103
|
+
|
|
104
|
+
MIT © [Visesh Prasad](https://github.com/viseshrp)
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "relay-app"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
description = "This is a template repository for Python projects that use uv for their dependency management."
|
|
5
|
+
authors = [{ name = "Visesh Prasad", email = "viseshrprasad@gmail.com" }]
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
9
|
+
keywords = ["python"]
|
|
10
|
+
requires-python = ">=3.10,<4.0"
|
|
11
|
+
dependencies = ["click>=8.5.0", ]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 4 - Beta",
|
|
14
|
+
"Natural Language :: English",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Environment :: Console",
|
|
18
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
19
|
+
"Programming Language :: Python",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Programming Language :: Python :: 3.14",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://github.com/viseshrp/relay"
|
|
30
|
+
Repository = "https://github.com/viseshrp/relay"
|
|
31
|
+
Documentation = "https://github.com/viseshrp/relay/blob/main/README.md"
|
|
32
|
+
Changelog = "https://github.com/viseshrp/relay/blob/main/CHANGELOG.md"
|
|
33
|
+
Bug-Tracker = "https://github.com/viseshrp/relay/issues"
|
|
34
|
+
CI = "https://github.com/viseshrp/relay/actions"
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
"relay" = "relay.__main__:main"
|
|
38
|
+
|
|
39
|
+
[dependency-groups]
|
|
40
|
+
dev = [
|
|
41
|
+
"ipdb",
|
|
42
|
+
"uv",
|
|
43
|
+
"tox",
|
|
44
|
+
"tox-uv",
|
|
45
|
+
"tox-gh-actions",
|
|
46
|
+
"pytest",
|
|
47
|
+
"pytest-cov",
|
|
48
|
+
"pre-commit",
|
|
49
|
+
"ruff",
|
|
50
|
+
"pip-audit",
|
|
51
|
+
"bandit[toml]",
|
|
52
|
+
"codespell",
|
|
53
|
+
"ty",
|
|
54
|
+
"vulture",
|
|
55
|
+
"deptry",
|
|
56
|
+
"liccheck",
|
|
57
|
+
# liccheck imports pkg_resources, which newer setuptools no longer provides.
|
|
58
|
+
"setuptools<81",
|
|
59
|
+
"cogapp",
|
|
60
|
+
"twine",
|
|
61
|
+
"hatch",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
[build-system]
|
|
65
|
+
requires = ["hatchling", "hatch-timestamp-version"]
|
|
66
|
+
build-backend = "hatchling.build"
|
|
67
|
+
|
|
68
|
+
[tool.hatch.version]
|
|
69
|
+
path = "relay/_version.py"
|
|
70
|
+
source = "vcs-dev-timestamp"
|
|
71
|
+
validate-bump = true
|
|
72
|
+
|
|
73
|
+
[tool.hatch.version.raw-options]
|
|
74
|
+
local_scheme = "no-local-version"
|
|
75
|
+
timestamp_format = "long"
|
|
76
|
+
fallback_version = "0.0.0"
|
|
77
|
+
|
|
78
|
+
[tool.hatch.build]
|
|
79
|
+
include = [
|
|
80
|
+
"relay/**",
|
|
81
|
+
"README.md",
|
|
82
|
+
"LICENSE",
|
|
83
|
+
"CHANGELOG.md"
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
[tool.hatch.build.targets.wheel]
|
|
87
|
+
packages = ["relay"]
|
|
88
|
+
|
|
89
|
+
[tool.hatch.build.targets.editable]
|
|
90
|
+
packages = ["relay"]
|
|
91
|
+
|
|
92
|
+
[tool.hatch.envs.default]
|
|
93
|
+
path = ".venv"
|
|
94
|
+
|
|
95
|
+
[tool.uv]
|
|
96
|
+
default-groups = "all"
|
|
97
|
+
|
|
98
|
+
[tool.ty.src]
|
|
99
|
+
include = [
|
|
100
|
+
"relay"
|
|
101
|
+
]
|
|
102
|
+
|
|
103
|
+
[tool.ty.environment]
|
|
104
|
+
python-version = "3.10"
|
|
105
|
+
|
|
106
|
+
[tool.ty.analysis]
|
|
107
|
+
allowed-unresolved-imports = ["**"]
|
|
108
|
+
|
|
109
|
+
[tool.ty.rules]
|
|
110
|
+
unused-type-ignore-comment = "error"
|
|
111
|
+
|
|
112
|
+
[tool.pytest.ini_options]
|
|
113
|
+
tmp_path_retention_policy = "failed"
|
|
114
|
+
testpaths = ["tests"]
|
|
115
|
+
addopts = "--capture=tee-sys --tb=native -ra -vv"
|
|
116
|
+
markers = [
|
|
117
|
+
"integration:Run integration tests",
|
|
118
|
+
"smoke:Run the smoke tests",
|
|
119
|
+
"unit:Run the unit tests",
|
|
120
|
+
]
|
|
121
|
+
norecursedirs = [
|
|
122
|
+
".git",
|
|
123
|
+
".idea",
|
|
124
|
+
]
|
|
125
|
+
|
|
126
|
+
# Configuration for coverage.py
|
|
127
|
+
[tool.coverage.report]
|
|
128
|
+
show_missing = true
|
|
129
|
+
skip_covered = true
|
|
130
|
+
# Regexes for lines to exclude from consideration
|
|
131
|
+
exclude_lines = [
|
|
132
|
+
# Have to re-enable the standard pragma
|
|
133
|
+
"pragma: no cover",
|
|
134
|
+
# Don't complain about missing debug-only code:
|
|
135
|
+
"def __repr__",
|
|
136
|
+
"if self\\.debug",
|
|
137
|
+
# Don't complain if tests don't hit defensive assertion code:
|
|
138
|
+
"raise AssertionError",
|
|
139
|
+
"raise NotImplementedError",
|
|
140
|
+
# Don't complain if non-runnable code isn't run:
|
|
141
|
+
"if 0:",
|
|
142
|
+
"if __name__ == .__main__.:",
|
|
143
|
+
# Don't complain about abstract methods, they aren't run:
|
|
144
|
+
"@(abc\\.)?abstractmethod",
|
|
145
|
+
]
|
|
146
|
+
|
|
147
|
+
[tool.coverage.run]
|
|
148
|
+
branch = true
|
|
149
|
+
omit = ["relay/__main__.py"]
|
|
150
|
+
source = [
|
|
151
|
+
"relay"
|
|
152
|
+
]
|
|
153
|
+
|
|
154
|
+
[tool.coverage.html]
|
|
155
|
+
show_contexts = true
|
|
156
|
+
|
|
157
|
+
[tool.ruff]
|
|
158
|
+
target-version = "py310"
|
|
159
|
+
line-length = 100
|
|
160
|
+
fix = true
|
|
161
|
+
unsafe-fixes = true
|
|
162
|
+
exclude = [".venv", "__init__.py"]
|
|
163
|
+
|
|
164
|
+
[tool.ruff.lint]
|
|
165
|
+
fixable = ["ALL"]
|
|
166
|
+
select = [
|
|
167
|
+
# flake8-2020
|
|
168
|
+
"YTT",
|
|
169
|
+
# flake8-bandit
|
|
170
|
+
"S",
|
|
171
|
+
# flake8-bugbear
|
|
172
|
+
"B",
|
|
173
|
+
# flake8-builtins
|
|
174
|
+
"A",
|
|
175
|
+
# flake8-comprehensions
|
|
176
|
+
"C4",
|
|
177
|
+
# flake8-debugger
|
|
178
|
+
"T10",
|
|
179
|
+
# flake8-simplify
|
|
180
|
+
"SIM",
|
|
181
|
+
# isort (keep this if you want Ruff to sort imports)
|
|
182
|
+
"I",
|
|
183
|
+
# mccabe
|
|
184
|
+
"C90",
|
|
185
|
+
# pycodestyle
|
|
186
|
+
"E", "W",
|
|
187
|
+
# pep8-naming rules
|
|
188
|
+
"N",
|
|
189
|
+
# pyflakes
|
|
190
|
+
"F",
|
|
191
|
+
# pygrep-hooks
|
|
192
|
+
"PGH",
|
|
193
|
+
# pyupgrade
|
|
194
|
+
"UP",
|
|
195
|
+
# ruff-native rules
|
|
196
|
+
"RUF",
|
|
197
|
+
# try/except linting
|
|
198
|
+
"TRY",
|
|
199
|
+
# Disallow print statements
|
|
200
|
+
"T201",
|
|
201
|
+
]
|
|
202
|
+
ignore = [
|
|
203
|
+
"C901", # Function is too complex
|
|
204
|
+
"PGH003" # blanket-type-ignore
|
|
205
|
+
]
|
|
206
|
+
|
|
207
|
+
[tool.ruff.lint.mccabe]
|
|
208
|
+
max-complexity = 10
|
|
209
|
+
|
|
210
|
+
[tool.ruff.lint.per-file-ignores]
|
|
211
|
+
"tests/*" = ["S101"]
|
|
212
|
+
"scripts/*.py" = ["T201"]
|
|
213
|
+
|
|
214
|
+
[tool.ruff.lint.isort]
|
|
215
|
+
known-first-party = ["relay", "tests"]
|
|
216
|
+
force-sort-within-sections = true
|
|
217
|
+
|
|
218
|
+
[tool.codespell]
|
|
219
|
+
ignore-words = "codespell.txt"
|
|
220
|
+
skip = '*.pyc,*.xml,*.gif,*.png,*.jpg,*.js,*.html,*.json,*.gz,Makefile'
|
|
221
|
+
quiet-level = 3
|
|
222
|
+
|
|
223
|
+
[tool.bandit]
|
|
224
|
+
targets = ["relay"]
|
|
225
|
+
exclude_dirs = ["venv", ".venv", "tests"]
|
|
226
|
+
|
|
227
|
+
[tool.vulture]
|
|
228
|
+
paths = ["relay", "tests"]
|
|
229
|
+
min_confidence = 80
|
|
230
|
+
sort_by_size = true
|
|
231
|
+
exclude = ["venv/", ".venv/"]
|
|
232
|
+
|
|
233
|
+
[tool.deptry]
|
|
234
|
+
exclude = ["venv/.*", ".venv/.*", "tests/.*"]
|
|
235
|
+
|
|
236
|
+
[tool.liccheck]
|
|
237
|
+
authorized_licenses = [
|
|
238
|
+
"apache",
|
|
239
|
+
"apache 2.0",
|
|
240
|
+
"apache software license",
|
|
241
|
+
"bsd",
|
|
242
|
+
"bsd license",
|
|
243
|
+
"bsd-3-clause",
|
|
244
|
+
"isc",
|
|
245
|
+
"isc license",
|
|
246
|
+
"mit",
|
|
247
|
+
"mit license",
|
|
248
|
+
"python software foundation license",
|
|
249
|
+
]
|
|
250
|
+
unauthorized_licenses = [
|
|
251
|
+
"agpl",
|
|
252
|
+
"gpl",
|
|
253
|
+
"gpl v2",
|
|
254
|
+
"gpl v3",
|
|
255
|
+
"gnu affero general public license",
|
|
256
|
+
"gnu general public license",
|
|
257
|
+
]
|
|
258
|
+
dependencies = true
|
|
259
|
+
|
|
260
|
+
[tool.pre-commit.default_language_versions]
|
|
261
|
+
python = "3.14"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"The version module for the relay package."
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
__version__ = version("relay-app")
|
|
7
|
+
except PackageNotFoundError: # pragma: no cover
|
|
8
|
+
try:
|
|
9
|
+
__version__ = version("relay")
|
|
10
|
+
except PackageNotFoundError:
|
|
11
|
+
# Fallback for local dev or editable installs
|
|
12
|
+
__version__ = "0.0.0"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"The console script for relay."
|
|
2
|
+
|
|
3
|
+
import click
|
|
4
|
+
|
|
5
|
+
from . import __version__ as _version
|
|
6
|
+
from .relay import do_stuff
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@click.argument(
|
|
10
|
+
"stuff",
|
|
11
|
+
metavar="<what_you_worked_on>",
|
|
12
|
+
nargs=-1,
|
|
13
|
+
required=False,
|
|
14
|
+
type=click.STRING,
|
|
15
|
+
)
|
|
16
|
+
@click.command(context_settings={"help_option_names": ["-h", "--help"]})
|
|
17
|
+
@click.version_option(_version, "-v", "--version")
|
|
18
|
+
def main(stuff: tuple[str, ...]) -> None:
|
|
19
|
+
"""Relay CLI.
|
|
20
|
+
|
|
21
|
+
\b
|
|
22
|
+
Example usages:
|
|
23
|
+
"""
|
|
24
|
+
do_stuff(stuff)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""All constants used in the code base are defined here."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""All exceptions used in the code base are defined here."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CustomError(Exception):
|
|
7
|
+
"""
|
|
8
|
+
Base exception. All other exceptions
|
|
9
|
+
inherit from here.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
detail = "An error occurred."
|
|
13
|
+
|
|
14
|
+
def __init__(self, extra_detail: str | None = None) -> None:
|
|
15
|
+
super().__init__()
|
|
16
|
+
self.extra_detail = extra_detail
|
|
17
|
+
|
|
18
|
+
def __str__(self) -> str:
|
|
19
|
+
if self.extra_detail:
|
|
20
|
+
return f"{self.detail} :: {self.extra_detail}"
|
|
21
|
+
return self.detail
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""All common utility functions and classes used in the code base are defined here."""
|