qstatus 0.1.0__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.
- qstatus-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +33 -0
- qstatus-0.1.0/.github/workflows/ci.yml +137 -0
- qstatus-0.1.0/.github/workflows/release.yml +36 -0
- qstatus-0.1.0/.gitignore +27 -0
- qstatus-0.1.0/.pre-commit-config.yaml +39 -0
- qstatus-0.1.0/.python-version +1 -0
- qstatus-0.1.0/AGENTS.md +22 -0
- qstatus-0.1.0/PKG-INFO +96 -0
- qstatus-0.1.0/README.md +69 -0
- qstatus-0.1.0/docs/api.md +15 -0
- qstatus-0.1.0/docs/ci-private-submodules.md +67 -0
- qstatus-0.1.0/pyproject.toml +149 -0
- qstatus-0.1.0/src/qstatus/__init__.py +7 -0
- qstatus-0.1.0/src/qstatus/cli.py +33 -0
- qstatus-0.1.0/src/qstatus/py.typed +1 -0
- qstatus-0.1.0/templates/licenses/Apache-2.0 +184 -0
- qstatus-0.1.0/templates/licenses/MIT +21 -0
- qstatus-0.1.0/templates/licenses/README.md +7 -0
- qstatus-0.1.0/tests/test_package.py +17 -0
- qstatus-0.1.0/uv.lock +443 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
One sentence explaining what this PR does.
|
|
2
|
+
|
|
3
|
+
Follow this format by default, but you can deviate if that makes the PR
|
|
4
|
+
clearer, for example for an unusually large PR.
|
|
5
|
+
|
|
6
|
+
## Related:
|
|
7
|
+
Optional. Use only if truly needed. Link related issues, docs, PRs, or
|
|
8
|
+
discussion.
|
|
9
|
+
- ...
|
|
10
|
+
|
|
11
|
+
## Changes:
|
|
12
|
+
What changed in the final state of the PR. Describe the current behavior the
|
|
13
|
+
reader needs to know. Do not narrate the whole implementation history of the PR.
|
|
14
|
+
Be concise.
|
|
15
|
+
- ...
|
|
16
|
+
- ...
|
|
17
|
+
|
|
18
|
+
## Why:
|
|
19
|
+
What problem this solves and why the changes were needed.
|
|
20
|
+
Be concise.
|
|
21
|
+
- ...
|
|
22
|
+
- ...
|
|
23
|
+
|
|
24
|
+
## Details:
|
|
25
|
+
Optional. Use only if truly needed. Use this for important details or gotchas
|
|
26
|
+
that would clutter the changes section.
|
|
27
|
+
- ...
|
|
28
|
+
|
|
29
|
+
## How To Try It:
|
|
30
|
+
Optional. Use only if truly needed. Use this when a reviewer would benefit
|
|
31
|
+
from commands, paths, task ids, or links to inspect the change directly. Do
|
|
32
|
+
not repeat generic CI or test output.
|
|
33
|
+
- ...
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
name: Checks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
ruff:
|
|
18
|
+
name: Ruff
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
timeout-minutes: 5
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Check out repository
|
|
24
|
+
uses: actions/checkout@v6
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v6
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.11"
|
|
30
|
+
cache: pip
|
|
31
|
+
cache-dependency-path: pyproject.toml
|
|
32
|
+
|
|
33
|
+
- name: Install Ruff
|
|
34
|
+
run: python -m pip install ruff==0.15.9
|
|
35
|
+
|
|
36
|
+
- name: Ruff format
|
|
37
|
+
run: python -m ruff format --check --diff .
|
|
38
|
+
|
|
39
|
+
- name: Ruff lint
|
|
40
|
+
run: python -m ruff check --output-format=full .
|
|
41
|
+
|
|
42
|
+
python-checks:
|
|
43
|
+
name: Ruff + Mypy + Pytest
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
timeout-minutes: 10
|
|
46
|
+
strategy:
|
|
47
|
+
fail-fast: false
|
|
48
|
+
matrix:
|
|
49
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- name: Check out repository
|
|
53
|
+
uses: actions/checkout@v6
|
|
54
|
+
|
|
55
|
+
- name: Set up Python
|
|
56
|
+
uses: actions/setup-python@v6
|
|
57
|
+
with:
|
|
58
|
+
python-version: ${{ matrix.python-version }}
|
|
59
|
+
cache: pip
|
|
60
|
+
cache-dependency-path: pyproject.toml
|
|
61
|
+
|
|
62
|
+
- name: Install Python dependencies
|
|
63
|
+
run: |
|
|
64
|
+
python -m pip install --upgrade pip
|
|
65
|
+
python -m pip install -e ".[dev]"
|
|
66
|
+
|
|
67
|
+
- name: Ruff format
|
|
68
|
+
run: python -m ruff format --check --diff .
|
|
69
|
+
|
|
70
|
+
- name: Ruff lint
|
|
71
|
+
run: python -m ruff check --output-format=full .
|
|
72
|
+
|
|
73
|
+
- name: Mypy static type checks
|
|
74
|
+
run: python -m mypy
|
|
75
|
+
|
|
76
|
+
- name: Pytest tests
|
|
77
|
+
run: python -m pytest
|
|
78
|
+
|
|
79
|
+
package-pip:
|
|
80
|
+
name: Package Build (pip)
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
timeout-minutes: 10
|
|
83
|
+
|
|
84
|
+
steps:
|
|
85
|
+
- name: Check out repository
|
|
86
|
+
uses: actions/checkout@v6
|
|
87
|
+
|
|
88
|
+
- name: Set up Python
|
|
89
|
+
uses: actions/setup-python@v6
|
|
90
|
+
with:
|
|
91
|
+
python-version: "3.11"
|
|
92
|
+
cache: pip
|
|
93
|
+
cache-dependency-path: pyproject.toml
|
|
94
|
+
|
|
95
|
+
- name: Install Python dependencies
|
|
96
|
+
run: |
|
|
97
|
+
python -m pip install --upgrade pip
|
|
98
|
+
python -m pip install -e ".[dev]"
|
|
99
|
+
|
|
100
|
+
- name: Build package
|
|
101
|
+
run: python -m build
|
|
102
|
+
|
|
103
|
+
- name: Install built wheel
|
|
104
|
+
run: python -m pip install --force-reinstall dist/*.whl
|
|
105
|
+
|
|
106
|
+
- name: Smoke test installed package
|
|
107
|
+
run: python -c "import qstatus; print(qstatus.__version__)"
|
|
108
|
+
|
|
109
|
+
package-uv:
|
|
110
|
+
name: Package Build (uv)
|
|
111
|
+
runs-on: ubuntu-latest
|
|
112
|
+
timeout-minutes: 10
|
|
113
|
+
|
|
114
|
+
steps:
|
|
115
|
+
- name: Check out repository
|
|
116
|
+
uses: actions/checkout@v6
|
|
117
|
+
|
|
118
|
+
- name: Set up uv
|
|
119
|
+
uses: astral-sh/setup-uv@v6
|
|
120
|
+
with:
|
|
121
|
+
enable-cache: true
|
|
122
|
+
cache-dependency-glob: uv.lock
|
|
123
|
+
|
|
124
|
+
- name: Set up Python
|
|
125
|
+
run: uv python install 3.11
|
|
126
|
+
|
|
127
|
+
- name: Install Python dependencies
|
|
128
|
+
run: uv sync --extra dev --locked
|
|
129
|
+
|
|
130
|
+
- name: Build package
|
|
131
|
+
run: uv build
|
|
132
|
+
|
|
133
|
+
- name: Install built wheel
|
|
134
|
+
run: uv pip install --force-reinstall dist/*.whl
|
|
135
|
+
|
|
136
|
+
- name: Smoke test installed package
|
|
137
|
+
run: uv run --no-sync python -c "import qstatus; print(qstatus.__version__)"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
name: Publish to PyPI
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
environment: pypi
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
id-token: write
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- name: Check out repository
|
|
22
|
+
uses: actions/checkout@v6
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v6
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.11"
|
|
28
|
+
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
python -m pip install build
|
|
33
|
+
python -m build
|
|
34
|
+
|
|
35
|
+
- name: Publish package distributions to PyPI
|
|
36
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
qstatus-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
|
|
5
|
+
.Python
|
|
6
|
+
.venv/
|
|
7
|
+
venv/
|
|
8
|
+
env/
|
|
9
|
+
ENV/
|
|
10
|
+
|
|
11
|
+
build/
|
|
12
|
+
dist/
|
|
13
|
+
*.egg-info/
|
|
14
|
+
.eggs/
|
|
15
|
+
|
|
16
|
+
.pytest_cache/
|
|
17
|
+
.mypy_cache/
|
|
18
|
+
.ruff_cache/
|
|
19
|
+
.coverage
|
|
20
|
+
htmlcov/
|
|
21
|
+
|
|
22
|
+
.env
|
|
23
|
+
.env.*
|
|
24
|
+
|
|
25
|
+
.DS_Store
|
|
26
|
+
.idea/
|
|
27
|
+
.vscode/
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.15.9
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
- id: ruff-format
|
|
7
|
+
args: ["--check"]
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
10
|
+
rev: v6.0.0
|
|
11
|
+
hooks:
|
|
12
|
+
- id: trailing-whitespace
|
|
13
|
+
- id: check-symlinks
|
|
14
|
+
- id: destroyed-symlinks
|
|
15
|
+
- id: end-of-file-fixer
|
|
16
|
+
- id: check-yaml
|
|
17
|
+
- id: check-toml
|
|
18
|
+
- id: check-merge-conflict
|
|
19
|
+
- id: check-case-conflict
|
|
20
|
+
- id: check-executables-have-shebangs
|
|
21
|
+
- id: check-added-large-files
|
|
22
|
+
args: ["--maxkb=2000"]
|
|
23
|
+
- id: check-shebang-scripts-are-executable
|
|
24
|
+
- id: detect-private-key
|
|
25
|
+
- id: debug-statements
|
|
26
|
+
|
|
27
|
+
- repo: https://github.com/codespell-project/codespell
|
|
28
|
+
rev: v2.4.1
|
|
29
|
+
hooks:
|
|
30
|
+
- id: codespell
|
|
31
|
+
additional_dependencies:
|
|
32
|
+
- tomli
|
|
33
|
+
|
|
34
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
35
|
+
rev: v1.10.0
|
|
36
|
+
hooks:
|
|
37
|
+
- id: rst-backticks
|
|
38
|
+
- id: rst-directive-colons
|
|
39
|
+
- id: rst-inline-touching-normal
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|
qstatus-0.1.0/AGENTS.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Repo-specific instructions for agents working with the `qstatus` package.
|
|
4
|
+
|
|
5
|
+
## Package Conventions
|
|
6
|
+
|
|
7
|
+
- Keep importable package code under `src/qstatus/`.
|
|
8
|
+
- Put CLI entrypoint behavior in `src/qstatus/cli.py`.
|
|
9
|
+
|
|
10
|
+
## Validation
|
|
11
|
+
|
|
12
|
+
- Run checks relevant to the files changed.
|
|
13
|
+
- For README/docs-only changes, run formatting and pre-commit hygiene.
|
|
14
|
+
- For Python or packaging changes, also run Ruff, mypy, pytest, and build
|
|
15
|
+
checks.
|
|
16
|
+
|
|
17
|
+
## Pull Requests
|
|
18
|
+
|
|
19
|
+
- Use `.github/PULL_REQUEST_TEMPLATE.md` for PR descriptions.
|
|
20
|
+
- Do not commit secrets, credentials, local runtime config, or scratch notes.
|
|
21
|
+
- Keep `AGENTS.md` updated when recurring agent instructions become
|
|
22
|
+
repo-specific.
|
qstatus-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qstatus
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Quick local status snapshots for developer workspaces.
|
|
5
|
+
Project-URL: Homepage, https://github.com/alik-git/qstatus
|
|
6
|
+
Project-URL: Repository, https://github.com/alik-git/qstatus
|
|
7
|
+
Project-URL: Issues, https://github.com/alik-git/qstatus/issues
|
|
8
|
+
Author-email: Ali K <alikgithb@gmail.com>
|
|
9
|
+
Maintainer-email: Ali K <alikgithb@gmail.com>
|
|
10
|
+
Keywords: cli,developer-tools,git,status
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
22
|
+
Requires-Dist: mypy>=1.15; extra == 'dev'
|
|
23
|
+
Requires-Dist: pre-commit>=4.0; extra == 'dev'
|
|
24
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
25
|
+
Requires-Dist: ruff>=0.11; extra == 'dev'
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# qstatus
|
|
29
|
+
|
|
30
|
+
Quick local status snapshots for developer workspaces.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
Recommended with `uv`:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
uv sync --extra dev
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Standard Python fallback:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
python -m pip install -e ".[dev]"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Usage
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
qstatus
|
|
50
|
+
qstatus --version
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Development
|
|
54
|
+
|
|
55
|
+
Run the standard checks before opening a PR:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
uv run ruff format --check .
|
|
59
|
+
uv run ruff check .
|
|
60
|
+
uv run mypy
|
|
61
|
+
uv run pytest
|
|
62
|
+
uv build
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If you are using standard Python tools instead of uv:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
python -m ruff format --check .
|
|
69
|
+
python -m ruff check .
|
|
70
|
+
python -m mypy
|
|
71
|
+
python -m pytest
|
|
72
|
+
python -m build
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Publishing
|
|
76
|
+
|
|
77
|
+
This repo publishes to PyPI through GitHub Actions Trusted Publishing. The
|
|
78
|
+
release workflow is [`.github/workflows/release.yml`](.github/workflows/release.yml).
|
|
79
|
+
|
|
80
|
+
Use these values in PyPI's pending trusted publisher form:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
PyPI project name: qstatus
|
|
84
|
+
Owner: alik-git
|
|
85
|
+
Repository name: qstatus
|
|
86
|
+
Workflow name: release.yml
|
|
87
|
+
Environment name: pypi
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The workflow filename is `release.yml`; the display name inside that file is
|
|
91
|
+
`Release`, but PyPI wants the filename. The `pypi` environment should also exist
|
|
92
|
+
under the GitHub repository's environment settings.
|
|
93
|
+
|
|
94
|
+
Publishing is release-driven: normal pushes and pull requests build and test the
|
|
95
|
+
package, but publishing happens when a GitHub Release is published or the release
|
|
96
|
+
workflow is manually dispatched.
|
qstatus-0.1.0/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# qstatus
|
|
2
|
+
|
|
3
|
+
Quick local status snapshots for developer workspaces.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Recommended with `uv`:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
uv sync --extra dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Standard Python fallback:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
python -m pip install -e ".[dev]"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
qstatus
|
|
23
|
+
qstatus --version
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Development
|
|
27
|
+
|
|
28
|
+
Run the standard checks before opening a PR:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
uv run ruff format --check .
|
|
32
|
+
uv run ruff check .
|
|
33
|
+
uv run mypy
|
|
34
|
+
uv run pytest
|
|
35
|
+
uv build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If you are using standard Python tools instead of uv:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
python -m ruff format --check .
|
|
42
|
+
python -m ruff check .
|
|
43
|
+
python -m mypy
|
|
44
|
+
python -m pytest
|
|
45
|
+
python -m build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Publishing
|
|
49
|
+
|
|
50
|
+
This repo publishes to PyPI through GitHub Actions Trusted Publishing. The
|
|
51
|
+
release workflow is [`.github/workflows/release.yml`](.github/workflows/release.yml).
|
|
52
|
+
|
|
53
|
+
Use these values in PyPI's pending trusted publisher form:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
PyPI project name: qstatus
|
|
57
|
+
Owner: alik-git
|
|
58
|
+
Repository name: qstatus
|
|
59
|
+
Workflow name: release.yml
|
|
60
|
+
Environment name: pypi
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The workflow filename is `release.yml`; the display name inside that file is
|
|
64
|
+
`Release`, but PyPI wants the filename. The `pypi` environment should also exist
|
|
65
|
+
under the GitHub repository's environment settings.
|
|
66
|
+
|
|
67
|
+
Publishing is release-driven: normal pushes and pull requests build and test the
|
|
68
|
+
package, but publishing happens when a GitHub Release is published or the release
|
|
69
|
+
workflow is manually dispatched.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# CI Private Submodules
|
|
2
|
+
|
|
3
|
+
If a package created from this template uses private GitHub submodules, the
|
|
4
|
+
default [`GITHUB_TOKEN`](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication)
|
|
5
|
+
may not be able to clone them in GitHub Actions.
|
|
6
|
+
|
|
7
|
+
Use a [GitHub App](https://docs.github.com/en/apps/overview) token pattern for
|
|
8
|
+
private submodules. The
|
|
9
|
+
[`actions/create-github-app-token`](https://github.com/actions/create-github-app-token)
|
|
10
|
+
action creates a short-lived installation access token that can be scoped to the
|
|
11
|
+
parent repo and the private submodule repos:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
- name: Create GitHub App token
|
|
15
|
+
id: app-token
|
|
16
|
+
uses: actions/create-github-app-token@v3
|
|
17
|
+
with:
|
|
18
|
+
client-id: ${{ vars.CI_APP_CLIENT_ID }}
|
|
19
|
+
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
|
|
20
|
+
owner: your-org
|
|
21
|
+
repositories: |
|
|
22
|
+
your_repo
|
|
23
|
+
private_submodule_repo
|
|
24
|
+
permission-contents: read
|
|
25
|
+
|
|
26
|
+
- name: Check out repository
|
|
27
|
+
uses: actions/checkout@v6
|
|
28
|
+
with:
|
|
29
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
30
|
+
submodules: recursive
|
|
31
|
+
persist-credentials: false
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Required repository settings:
|
|
35
|
+
|
|
36
|
+
- Variable: `CI_APP_CLIENT_ID`
|
|
37
|
+
- Secret: `CI_APP_PRIVATE_KEY`
|
|
38
|
+
|
|
39
|
+
Create these under the repository's
|
|
40
|
+
[Actions variables and secrets settings](https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-variables)
|
|
41
|
+
and
|
|
42
|
+
[Actions secrets settings](https://docs.github.com/en/actions/how-tos/security-for-github-actions/security-guides/using-secrets-in-github-actions).
|
|
43
|
+
|
|
44
|
+
The GitHub App must be installed on the parent repo and each private submodule
|
|
45
|
+
repo listed under `repositories`. See GitHub's docs for
|
|
46
|
+
[installing your own GitHub App](https://docs.github.com/en/apps/using-github-apps/installing-your-own-github-app).
|
|
47
|
+
|
|
48
|
+
Replace the variable and secret names in the YAML with whatever naming
|
|
49
|
+
convention your repository uses.
|
|
50
|
+
|
|
51
|
+
`actions/create-github-app-token` still accepts the older `app-id` input, but
|
|
52
|
+
the upstream action now recommends `client-id`. Prefer `client-id` in new
|
|
53
|
+
workflows to avoid deprecation/legacy-input warnings. GitHub documents where to
|
|
54
|
+
find a GitHub App's client ID in the
|
|
55
|
+
[GitHub App settings](https://docs.github.com/en/apps/maintaining-github-apps/modifying-a-github-app).
|
|
56
|
+
|
|
57
|
+
Symptoms when this is missing:
|
|
58
|
+
|
|
59
|
+
- PR checks stay queued and then fail during checkout.
|
|
60
|
+
- [`actions/checkout`](https://github.com/actions/checkout) reports that it
|
|
61
|
+
cannot clone a private submodule.
|
|
62
|
+
- SSH submodule URLs like `git@github.com:org/private_repo.git` fail in CI even
|
|
63
|
+
though they work locally.
|
|
64
|
+
|
|
65
|
+
When adapting the template, either avoid private submodules in CI or add the
|
|
66
|
+
token step before every `actions/checkout` step that uses `submodules:
|
|
67
|
+
recursive`.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.25"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "qstatus"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Quick local status snapshots for developer workspaces."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Ali K", email = "alikgithb@gmail.com" },
|
|
13
|
+
]
|
|
14
|
+
maintainers = [
|
|
15
|
+
{ name = "Ali K", email = "alikgithb@gmail.com" },
|
|
16
|
+
]
|
|
17
|
+
keywords = ["cli", "developer-tools", "git", "status"]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Development Status :: 3 - Alpha",
|
|
20
|
+
"Environment :: Console",
|
|
21
|
+
"Intended Audience :: Developers",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Typing :: Typed",
|
|
27
|
+
]
|
|
28
|
+
dependencies = []
|
|
29
|
+
|
|
30
|
+
[project.optional-dependencies]
|
|
31
|
+
dev = [
|
|
32
|
+
"build>=1.2",
|
|
33
|
+
"mypy>=1.15",
|
|
34
|
+
"pre-commit>=4.0",
|
|
35
|
+
"pytest>=8.0",
|
|
36
|
+
"ruff>=0.11",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[tool.hatch.build.targets.wheel]
|
|
40
|
+
packages = ["src/qstatus"]
|
|
41
|
+
|
|
42
|
+
[project.scripts]
|
|
43
|
+
qstatus = "qstatus.cli:main"
|
|
44
|
+
|
|
45
|
+
[project.urls]
|
|
46
|
+
Homepage = "https://github.com/alik-git/qstatus"
|
|
47
|
+
Repository = "https://github.com/alik-git/qstatus"
|
|
48
|
+
Issues = "https://github.com/alik-git/qstatus/issues"
|
|
49
|
+
|
|
50
|
+
[tool.ruff]
|
|
51
|
+
line-length = 88
|
|
52
|
+
target-version = "py311"
|
|
53
|
+
src = ["src", "tests"]
|
|
54
|
+
|
|
55
|
+
[tool.ruff.lint]
|
|
56
|
+
# This template uses a fairly strict Ruff setup by default. The less universal
|
|
57
|
+
# rule families are marked below; comment them out if they are too noisy for a
|
|
58
|
+
# new project.
|
|
59
|
+
extend-select = [
|
|
60
|
+
# Core Python style and modernization.
|
|
61
|
+
"E", # pycodestyle errors
|
|
62
|
+
"W", # pycodestyle warnings
|
|
63
|
+
"I", # import sorting
|
|
64
|
+
"UP", # Python modernization
|
|
65
|
+
# Bug-risk checks.
|
|
66
|
+
"B", # flake8-bugbear bug patterns
|
|
67
|
+
"BLE", # blind except / bare except
|
|
68
|
+
"PLE", # pylint errors
|
|
69
|
+
"PLW", # pylint warnings
|
|
70
|
+
"S", # Bandit security checks; comment out if too noisy.
|
|
71
|
+
# Maintainability checks.
|
|
72
|
+
"A", # flake8-builtins: avoid shadowing id/list/input/etc.
|
|
73
|
+
"ARG", # unused function arguments
|
|
74
|
+
"C4", # cleaner comprehensions
|
|
75
|
+
"DTZ", # timezone-aware datetimes
|
|
76
|
+
"FBT003", # boolean positional values in function calls
|
|
77
|
+
"NPY", # NumPy-specific checks
|
|
78
|
+
"PERF", # performance footguns
|
|
79
|
+
"PTH", # prefer pathlib over os.path
|
|
80
|
+
"RET", # return control-flow simplification
|
|
81
|
+
"SIM", # flake8-simplify
|
|
82
|
+
# Logging and import hygiene.
|
|
83
|
+
"G", # logging format strings
|
|
84
|
+
"LOG", # logging anti-patterns
|
|
85
|
+
"TC", # type-checking import hygiene
|
|
86
|
+
# Strict docs/annotations/tests. Comment these out for a looser template.
|
|
87
|
+
"ANN201", # public function return annotations
|
|
88
|
+
"ANN202", # private function return annotations
|
|
89
|
+
"ANN204", # special-method return annotations
|
|
90
|
+
"D100", # module docstrings
|
|
91
|
+
"D104", # package docstrings
|
|
92
|
+
"D102", # public method docstrings
|
|
93
|
+
"D103", # public function docstrings
|
|
94
|
+
"D2", # docstring whitespace/placement conventions
|
|
95
|
+
"D4", # docstring content conventions
|
|
96
|
+
"PT", # pytest style
|
|
97
|
+
# Ruff suppression hygiene and narrow style correctness rules.
|
|
98
|
+
"RUF100", # unused noqa
|
|
99
|
+
"RUF102", # invalid noqa rule code
|
|
100
|
+
"RUF104", # unmatched ruff suppression comments
|
|
101
|
+
"PLR0402", # prefer from-module imports for aliased submodule imports
|
|
102
|
+
"PLR1722", # prefer sys.exit() over the interactive exit() helper
|
|
103
|
+
"TRY203", # useless try/except blocks that immediately re-raise
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
ignore = [
|
|
107
|
+
# typing.cast(SomeType, value) is clearer than quoted type names.
|
|
108
|
+
"TC006",
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
[tool.ruff.lint.per-file-ignores]
|
|
112
|
+
# Do not flag assert statements in tests.
|
|
113
|
+
"tests/**/*.py" = ["S101"]
|
|
114
|
+
|
|
115
|
+
[tool.ruff.lint.isort]
|
|
116
|
+
known-first-party = ["qstatus"]
|
|
117
|
+
|
|
118
|
+
[tool.ruff.lint.pydocstyle]
|
|
119
|
+
convention = "google"
|
|
120
|
+
|
|
121
|
+
[tool.ruff.format]
|
|
122
|
+
docstring-code-format = true
|
|
123
|
+
|
|
124
|
+
[tool.mypy]
|
|
125
|
+
python_version = "3.11"
|
|
126
|
+
files = ["src/qstatus"]
|
|
127
|
+
|
|
128
|
+
# Type-check function bodies even before every function is fully annotated.
|
|
129
|
+
check_untyped_defs = true
|
|
130
|
+
no_implicit_optional = true
|
|
131
|
+
strict_equality = true
|
|
132
|
+
|
|
133
|
+
# High-signal warnings without full mypy strict mode.
|
|
134
|
+
warn_redundant_casts = true
|
|
135
|
+
warn_return_any = true
|
|
136
|
+
warn_unreachable = true
|
|
137
|
+
warn_unused_configs = true
|
|
138
|
+
warn_unused_ignores = true
|
|
139
|
+
|
|
140
|
+
# Missing packages still fail as import-not-found. This only suppresses the
|
|
141
|
+
# weaker "installed but has no stubs/py.typed marker" error for third-party
|
|
142
|
+
# packages.
|
|
143
|
+
ignore_missing_imports = false
|
|
144
|
+
follow_imports = "silent"
|
|
145
|
+
disable_error_code = ["import-untyped"]
|
|
146
|
+
|
|
147
|
+
# Make local and CI output easier to read and easier to suppress precisely.
|
|
148
|
+
show_error_codes = true
|
|
149
|
+
pretty = true
|