lifeos-cli 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.
- lifeos_cli-0.0.1/.github/workflows/dependency-review.yml +31 -0
- lifeos_cli-0.0.1/.github/workflows/publish.yml +129 -0
- lifeos_cli-0.0.1/.github/workflows/validate.yml +74 -0
- lifeos_cli-0.0.1/.gitignore +38 -0
- lifeos_cli-0.0.1/.pre-commit-config.yaml +33 -0
- lifeos_cli-0.0.1/.secrets.baseline +127 -0
- lifeos_cli-0.0.1/AGENTS.md +41 -0
- lifeos_cli-0.0.1/CODE_OF_CONDUCT.md +25 -0
- lifeos_cli-0.0.1/CONTRIBUTING.md +76 -0
- lifeos_cli-0.0.1/LICENSE +176 -0
- lifeos_cli-0.0.1/PKG-INFO +69 -0
- lifeos_cli-0.0.1/README.md +42 -0
- lifeos_cli-0.0.1/SECURITY.md +32 -0
- lifeos_cli-0.0.1/pyproject.toml +80 -0
- lifeos_cli-0.0.1/scripts/dependency_health.sh +14 -0
- lifeos_cli-0.0.1/scripts/doctor.sh +15 -0
- lifeos_cli-0.0.1/scripts/lint.sh +5 -0
- lifeos_cli-0.0.1/setup.cfg +4 -0
- lifeos_cli-0.0.1/src/lifeos_cli/__init__.py +5 -0
- lifeos_cli-0.0.1/src/lifeos_cli/cli.py +31 -0
- lifeos_cli-0.0.1/src/lifeos_cli/core.py +6 -0
- lifeos_cli-0.0.1/src/lifeos_cli/py.typed +0 -0
- lifeos_cli-0.0.1/src/lifeos_cli.egg-info/PKG-INFO +69 -0
- lifeos_cli-0.0.1/src/lifeos_cli.egg-info/SOURCES.txt +29 -0
- lifeos_cli-0.0.1/src/lifeos_cli.egg-info/dependency_links.txt +1 -0
- lifeos_cli-0.0.1/src/lifeos_cli.egg-info/entry_points.txt +2 -0
- lifeos_cli-0.0.1/src/lifeos_cli.egg-info/requires.txt +7 -0
- lifeos_cli-0.0.1/src/lifeos_cli.egg-info/top_level.txt +1 -0
- lifeos_cli-0.0.1/tests/test_cli.py +7 -0
- lifeos_cli-0.0.1/tests/test_core.py +5 -0
- lifeos_cli-0.0.1/uv.lock +922 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Review Development Dependencies
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: "0 3 1 * *"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
dependency-health:
|
|
13
|
+
name: Audit Development Dependencies (Python 3.10 Baseline)
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v6
|
|
19
|
+
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.10"
|
|
24
|
+
|
|
25
|
+
- name: Set up uv
|
|
26
|
+
uses: astral-sh/setup-uv@v7
|
|
27
|
+
with:
|
|
28
|
+
enable-cache: false
|
|
29
|
+
|
|
30
|
+
- name: Run dependency health checks
|
|
31
|
+
run: bash ./scripts/dependency_health.sh
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
name: Release Publish and Repair
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
release_tag:
|
|
10
|
+
description: Existing v* tag to publish or repair
|
|
11
|
+
required: true
|
|
12
|
+
type: string
|
|
13
|
+
publish_to_pypi:
|
|
14
|
+
description: Publish artifacts to PyPI before syncing the GitHub Release
|
|
15
|
+
required: true
|
|
16
|
+
default: false
|
|
17
|
+
type: boolean
|
|
18
|
+
sync_github_release:
|
|
19
|
+
description: Create or repair the GitHub Release and release assets
|
|
20
|
+
required: true
|
|
21
|
+
default: true
|
|
22
|
+
type: boolean
|
|
23
|
+
|
|
24
|
+
concurrency:
|
|
25
|
+
group: publish-${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref_name }}
|
|
26
|
+
cancel-in-progress: false
|
|
27
|
+
|
|
28
|
+
permissions:
|
|
29
|
+
contents: write
|
|
30
|
+
id-token: write
|
|
31
|
+
|
|
32
|
+
jobs:
|
|
33
|
+
publish:
|
|
34
|
+
name: Build and Publish Release Artifacts
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
|
|
37
|
+
steps:
|
|
38
|
+
- name: Checkout
|
|
39
|
+
uses: actions/checkout@v6
|
|
40
|
+
with:
|
|
41
|
+
fetch-depth: 0
|
|
42
|
+
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref }}
|
|
43
|
+
|
|
44
|
+
- name: Ensure release target is reachable from main
|
|
45
|
+
run: |
|
|
46
|
+
git fetch --no-tags origin main
|
|
47
|
+
git merge-base --is-ancestor "$GITHUB_SHA" "origin/main"
|
|
48
|
+
|
|
49
|
+
- name: Set up Python
|
|
50
|
+
uses: actions/setup-python@v6
|
|
51
|
+
with:
|
|
52
|
+
python-version: "3.13"
|
|
53
|
+
|
|
54
|
+
- name: Set up uv
|
|
55
|
+
uses: astral-sh/setup-uv@v7
|
|
56
|
+
with:
|
|
57
|
+
enable-cache: false
|
|
58
|
+
|
|
59
|
+
- name: Run default regression baseline
|
|
60
|
+
run: bash ./scripts/doctor.sh
|
|
61
|
+
|
|
62
|
+
- name: Export runtime requirements for vulnerability audit
|
|
63
|
+
run: >
|
|
64
|
+
uv export --format requirements.txt --no-dev --locked --no-emit-project
|
|
65
|
+
--output-file /tmp/runtime-requirements.txt >/dev/null
|
|
66
|
+
|
|
67
|
+
- name: Run runtime dependency vulnerability audit
|
|
68
|
+
run: uv run pip-audit --requirement /tmp/runtime-requirements.txt
|
|
69
|
+
|
|
70
|
+
- name: Clean previous build artifacts
|
|
71
|
+
run: rm -rf build dist
|
|
72
|
+
|
|
73
|
+
- name: Build package artifacts
|
|
74
|
+
run: uv build --no-sources
|
|
75
|
+
|
|
76
|
+
- name: Verify published version matches tag
|
|
77
|
+
env:
|
|
78
|
+
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref_name }}
|
|
79
|
+
run: |
|
|
80
|
+
python - <<'PY'
|
|
81
|
+
import os
|
|
82
|
+
import pathlib
|
|
83
|
+
|
|
84
|
+
dist_dir = pathlib.Path("dist")
|
|
85
|
+
wheels = sorted(dist_dir.glob("lifeos_cli-*.whl"))
|
|
86
|
+
sdists = sorted(dist_dir.glob("lifeos_cli-*.tar.gz"))
|
|
87
|
+
if len(wheels) != 1:
|
|
88
|
+
raise SystemExit(f"Expected exactly one wheel in dist/, found {len(wheels)}")
|
|
89
|
+
if len(sdists) != 1:
|
|
90
|
+
raise SystemExit(f"Expected exactly one sdist in dist/, found {len(sdists)}")
|
|
91
|
+
wheel = wheels[0].name
|
|
92
|
+
sdist = sdists[0].name
|
|
93
|
+
version = wheel.removeprefix("lifeos_cli-").split("-py3", 1)[0]
|
|
94
|
+
sdist_version = sdist.removeprefix("lifeos_cli-").removesuffix(".tar.gz")
|
|
95
|
+
tag = os.environ["RELEASE_TAG"].removeprefix("v")
|
|
96
|
+
if version != tag:
|
|
97
|
+
raise SystemExit(f"Wheel version {version!r} does not match tag {tag!r}")
|
|
98
|
+
if sdist_version != tag:
|
|
99
|
+
raise SystemExit(f"sdist version {sdist_version!r} does not match tag {tag!r}")
|
|
100
|
+
print(f"Validated release version: {version}")
|
|
101
|
+
PY
|
|
102
|
+
|
|
103
|
+
- name: Publish to PyPI
|
|
104
|
+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.publish_to_pypi }}
|
|
105
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
106
|
+
|
|
107
|
+
- name: Sync GitHub Release
|
|
108
|
+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.sync_github_release }}
|
|
109
|
+
env:
|
|
110
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
111
|
+
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.ref_name }}
|
|
112
|
+
run: |
|
|
113
|
+
set -euo pipefail
|
|
114
|
+
|
|
115
|
+
if gh release view "$RELEASE_TAG" --json url >/dev/null 2>&1; then
|
|
116
|
+
echo "Release ${RELEASE_TAG} already exists."
|
|
117
|
+
else
|
|
118
|
+
gh release create "$RELEASE_TAG" --verify-tag --generate-notes
|
|
119
|
+
fi
|
|
120
|
+
|
|
121
|
+
for asset in dist/*.tar.gz dist/*.whl; do
|
|
122
|
+
asset_name="$(basename "$asset")"
|
|
123
|
+
if gh release view "$RELEASE_TAG" --json assets --jq '.assets[].name' | grep -Fxq "$asset_name"; then
|
|
124
|
+
echo "Release asset already present: $asset_name"
|
|
125
|
+
continue
|
|
126
|
+
fi
|
|
127
|
+
|
|
128
|
+
gh release upload "$RELEASE_TAG" "$asset"
|
|
129
|
+
done
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
name: Validate PRs and Main
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
quality-gate:
|
|
14
|
+
name: Validate Default Toolchain
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout
|
|
19
|
+
uses: actions/checkout@v6
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v6
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.13"
|
|
25
|
+
|
|
26
|
+
- name: Set up uv
|
|
27
|
+
uses: astral-sh/setup-uv@v7
|
|
28
|
+
with:
|
|
29
|
+
enable-cache: false
|
|
30
|
+
|
|
31
|
+
- name: Run default validation
|
|
32
|
+
run: bash ./scripts/doctor.sh
|
|
33
|
+
|
|
34
|
+
- name: Export runtime requirements for vulnerability audit
|
|
35
|
+
run: >
|
|
36
|
+
uv export --format requirements.txt --no-dev --locked --no-emit-project
|
|
37
|
+
--output-file /tmp/runtime-requirements.txt >/dev/null
|
|
38
|
+
|
|
39
|
+
- name: Run runtime dependency vulnerability audit
|
|
40
|
+
run: uv run pip-audit --requirement /tmp/runtime-requirements.txt
|
|
41
|
+
|
|
42
|
+
- name: Clean previous build artifacts
|
|
43
|
+
run: rm -rf build dist
|
|
44
|
+
|
|
45
|
+
- name: Build package artifacts
|
|
46
|
+
run: uv build --no-sources
|
|
47
|
+
|
|
48
|
+
runtime-matrix:
|
|
49
|
+
name: Validate Runtime Matrix (Python ${{ matrix.python-version }})
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
strategy:
|
|
52
|
+
fail-fast: false
|
|
53
|
+
matrix:
|
|
54
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
55
|
+
|
|
56
|
+
steps:
|
|
57
|
+
- name: Checkout
|
|
58
|
+
uses: actions/checkout@v6
|
|
59
|
+
|
|
60
|
+
- name: Set up Python
|
|
61
|
+
uses: actions/setup-python@v6
|
|
62
|
+
with:
|
|
63
|
+
python-version: ${{ matrix.python-version }}
|
|
64
|
+
|
|
65
|
+
- name: Set up uv
|
|
66
|
+
uses: astral-sh/setup-uv@v7
|
|
67
|
+
with:
|
|
68
|
+
enable-cache: false
|
|
69
|
+
|
|
70
|
+
- name: Sync locked dependencies
|
|
71
|
+
run: uv sync --all-extras --frozen
|
|
72
|
+
|
|
73
|
+
- name: Run runtime regression tests
|
|
74
|
+
run: uv run pytest
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# Distribution / packaging
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
.eggs/
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
ENV/
|
|
17
|
+
|
|
18
|
+
# Testing / coverage
|
|
19
|
+
.pytest_cache/
|
|
20
|
+
.coverage
|
|
21
|
+
.coverage.*
|
|
22
|
+
htmlcov/
|
|
23
|
+
|
|
24
|
+
# Type checkers
|
|
25
|
+
.mypy_cache/
|
|
26
|
+
.pyre/
|
|
27
|
+
.ruff_cache/
|
|
28
|
+
|
|
29
|
+
# Jupyter
|
|
30
|
+
.ipynb_checkpoints/
|
|
31
|
+
|
|
32
|
+
# IDEs and editors
|
|
33
|
+
.idea/
|
|
34
|
+
.vscode/
|
|
35
|
+
|
|
36
|
+
# OS files
|
|
37
|
+
.DS_Store
|
|
38
|
+
Thumbs.db
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
minimum_pre_commit_version: 4.5.0
|
|
2
|
+
repos:
|
|
3
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
4
|
+
rev: v5.0.0
|
|
5
|
+
hooks:
|
|
6
|
+
- id: trailing-whitespace
|
|
7
|
+
- id: end-of-file-fixer
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
- id: check-toml
|
|
10
|
+
- repo: https://github.com/shellcheck-py/shellcheck-py
|
|
11
|
+
rev: v0.11.0.1
|
|
12
|
+
hooks:
|
|
13
|
+
- id: shellcheck
|
|
14
|
+
args: ["--severity=error"]
|
|
15
|
+
files: ^scripts/.*\.sh$
|
|
16
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
17
|
+
rev: v0.14.0
|
|
18
|
+
hooks:
|
|
19
|
+
- id: ruff
|
|
20
|
+
args: ["--fix"]
|
|
21
|
+
- id: ruff-format
|
|
22
|
+
- repo: https://github.com/Yelp/detect-secrets
|
|
23
|
+
rev: v1.5.0
|
|
24
|
+
hooks:
|
|
25
|
+
- id: detect-secrets
|
|
26
|
+
args: ["--baseline", ".secrets.baseline"]
|
|
27
|
+
- repo: local
|
|
28
|
+
hooks:
|
|
29
|
+
- id: mypy
|
|
30
|
+
name: mypy
|
|
31
|
+
entry: uv run mypy src/lifeos_cli tests
|
|
32
|
+
language: system
|
|
33
|
+
pass_filenames: false
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.5.0",
|
|
3
|
+
"plugins_used": [
|
|
4
|
+
{
|
|
5
|
+
"name": "ArtifactoryDetector"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "AWSKeyDetector"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "AzureStorageKeyDetector"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Base64HighEntropyString",
|
|
15
|
+
"limit": 4.5
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "BasicAuthDetector"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "CloudantDetector"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "DiscordBotTokenDetector"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "GitHubTokenDetector"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "GitLabTokenDetector"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "HexHighEntropyString",
|
|
34
|
+
"limit": 3.0
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "IbmCloudIamDetector"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "IbmCosHmacDetector"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "IPPublicDetector"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "JwtTokenDetector"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "KeywordDetector",
|
|
50
|
+
"keyword_exclude": ""
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "MailchimpDetector"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "NpmDetector"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "OpenAIDetector"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "PrivateKeyDetector"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "PypiTokenDetector"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "SendGridDetector"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "SlackDetector"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "SoftlayerDetector"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "SquareOAuthDetector"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "StripeDetector"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "TelegramBotTokenDetector"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "TwilioKeyDetector"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"filters_used": [
|
|
90
|
+
{
|
|
91
|
+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
|
|
95
|
+
"min_level": 2
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"path": "detect_secrets.filters.heuristic.is_lock_file"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"results": {},
|
|
126
|
+
"generated_at": "2026-04-09T03:55:21Z"
|
|
127
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
The following rules apply to coding agent collaboration in this repository. These complement the general [CONTRIBUTING.md](CONTRIBUTING.md) workflow.
|
|
4
|
+
|
|
5
|
+
## 1. Core Principles
|
|
6
|
+
|
|
7
|
+
- Keep repository governance, release safety, and Python compatibility aligned.
|
|
8
|
+
- Prefer small, traceable changes that preserve a releasable `main` branch.
|
|
9
|
+
|
|
10
|
+
## 2. Collaboration Workflow
|
|
11
|
+
|
|
12
|
+
- Follow the Git, Issue, and PR workflow defined in [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
13
|
+
- Use `gh` CLI for all issue and PR operations. Do not edit through the web UI.
|
|
14
|
+
- Create a new tracking issue for any development task that does not already have one.
|
|
15
|
+
- Link the relevant issue in the PR description with `Closes #xx` or `Related #xx` as appropriate.
|
|
16
|
+
- Keep issue and PR status synchronized when work scope changes.
|
|
17
|
+
|
|
18
|
+
## 3. Text and Language Conventions
|
|
19
|
+
|
|
20
|
+
- Use Simplified Chinese for issues, PR descriptions, comments, and review notes.
|
|
21
|
+
- Use English for repository files, code, comments, commit messages, and Markdown documentation stored in the repository.
|
|
22
|
+
- For multi-line PR bodies or comments, write to a temporary file first and pass it through `gh`.
|
|
23
|
+
|
|
24
|
+
## 4. Validation and Release Safety
|
|
25
|
+
|
|
26
|
+
- Use the primary validation entrypoint for code changes:
|
|
27
|
+
```bash
|
|
28
|
+
bash ./scripts/doctor.sh
|
|
29
|
+
```
|
|
30
|
+
- If changes affect compatibility claims, packaging metadata, or CI, validate the impacted Python versions explicitly.
|
|
31
|
+
- Keep release-related changes aligned with:
|
|
32
|
+
- [pyproject.toml](pyproject.toml)
|
|
33
|
+
- [.github/workflows/validate.yml](.github/workflows/validate.yml)
|
|
34
|
+
- [.github/workflows/publish.yml](.github/workflows/publish.yml)
|
|
35
|
+
- Do not weaken checks that protect trusted publishing, locked dependency resolution, or tag/version consistency without explicit justification.
|
|
36
|
+
|
|
37
|
+
## 5. Security and Documentation
|
|
38
|
+
|
|
39
|
+
- Never commit secrets, tokens, private keys, or `.env` contents.
|
|
40
|
+
- Ensure logs and examples do not expose credentials or sensitive local paths unintentionally.
|
|
41
|
+
- Update [SECURITY.md](SECURITY.md), [README.md](README.md), and release-related docs when changing publishing, dependency, or security-sensitive behavior.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
This project expects respectful, technically focused collaboration.
|
|
4
|
+
|
|
5
|
+
## Expected Behavior
|
|
6
|
+
|
|
7
|
+
- Assume good intent and communicate directly.
|
|
8
|
+
- Keep discussions specific, evidence-based, and relevant to the repository.
|
|
9
|
+
- Use welcoming language in public issues, pull requests, and review comments.
|
|
10
|
+
- Respect maintainers' time by providing reproducible reports and clear context.
|
|
11
|
+
|
|
12
|
+
## Unacceptable Behavior
|
|
13
|
+
|
|
14
|
+
- Harassment, discrimination, or personal attacks.
|
|
15
|
+
- Doxxing, threats, or sustained hostile behavior.
|
|
16
|
+
- Repeated spam, bad-faith disruption, or intentionally misleading reports.
|
|
17
|
+
- Sharing secrets, tokens, or private data in public threads.
|
|
18
|
+
|
|
19
|
+
## Reporting
|
|
20
|
+
|
|
21
|
+
For normal collaboration problems, open an issue with enough context to review the situation. For security-sensitive or private concerns, follow the disclosure path in [SECURITY.md](SECURITY.md).
|
|
22
|
+
|
|
23
|
+
## Enforcement
|
|
24
|
+
|
|
25
|
+
Repository maintainers may edit, hide, lock, or remove content that violates this policy, and may restrict participation when needed to keep collaboration safe and productive.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for contributing to `lifeos-cli`.
|
|
4
|
+
|
|
5
|
+
This repository ships the `lifeos-cli` distribution and the `lifeos` command-line entrypoint. Changes should keep package metadata, CLI behavior, CI, security expectations, and release workflows aligned.
|
|
6
|
+
|
|
7
|
+
## Before You Start
|
|
8
|
+
|
|
9
|
+
- Read [README.md](README.md) for project scope and local development commands.
|
|
10
|
+
- Read [SECURITY.md](SECURITY.md) before changing publishing, credentials, or dependency handling.
|
|
11
|
+
- Read [AGENTS.md](AGENTS.md) if you are contributing through an automated coding workflow.
|
|
12
|
+
|
|
13
|
+
## Development Setup
|
|
14
|
+
|
|
15
|
+
Requirements:
|
|
16
|
+
|
|
17
|
+
- Python 3.10, 3.11, 3.12, or 3.13
|
|
18
|
+
- `uv`
|
|
19
|
+
|
|
20
|
+
Install dependencies:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
uv sync --all-extras
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Validation
|
|
27
|
+
|
|
28
|
+
Run the default validation baseline before opening a PR:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
bash ./scripts/doctor.sh
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If you change CI, packaging metadata, or compatibility declarations, also validate the relevant interpreter targets explicitly. Examples:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
rm -rf .venv && uv sync --all-extras --python 3.10 --frozen && .venv/bin/python -m pytest
|
|
38
|
+
rm -rf .venv && uv sync --all-extras --python 3.11 --frozen && .venv/bin/python -m pytest
|
|
39
|
+
rm -rf .venv && uv sync --all-extras --python 3.12 --frozen && .venv/bin/python -m pytest
|
|
40
|
+
rm -rf .venv && uv sync --all-extras --python 3.13 --frozen && bash ./scripts/doctor.sh
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If you change dependency or release workflows, also run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bash ./scripts/dependency_health.sh
|
|
47
|
+
uv export --format requirements.txt --no-dev --locked --no-emit-project --output-file /tmp/runtime-requirements.txt >/dev/null
|
|
48
|
+
uv run pip-audit --requirement /tmp/runtime-requirements.txt
|
|
49
|
+
rm -rf build dist && uv build --no-sources
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Change Expectations
|
|
53
|
+
|
|
54
|
+
- Keep code, comments, commit messages, and repository docs in English.
|
|
55
|
+
- Keep issue and PR collaboration in Simplified Chinese for this repository.
|
|
56
|
+
- Prefer explicit, additive changes over hidden behavioral shifts.
|
|
57
|
+
- Keep Python compatibility declarations, CI matrices, and packaging metadata consistent with each other.
|
|
58
|
+
- Treat release and trusted publishing changes as security-sensitive infrastructure work.
|
|
59
|
+
|
|
60
|
+
## Git and PR Workflow
|
|
61
|
+
|
|
62
|
+
- Branch from the latest `main`.
|
|
63
|
+
- Use `git fetch` and `git merge --ff-only` to sync from `main`.
|
|
64
|
+
- Do not push directly to protected branches.
|
|
65
|
+
- Create or link a tracking issue for substantive development work.
|
|
66
|
+
- Use English commit-message style for PR titles.
|
|
67
|
+
- Link relevant issues in the PR description using `Closes #xx` or `Related #xx`.
|
|
68
|
+
|
|
69
|
+
## Documentation
|
|
70
|
+
|
|
71
|
+
Update docs together with code whenever you change:
|
|
72
|
+
|
|
73
|
+
- supported Python versions
|
|
74
|
+
- validation or dependency workflows
|
|
75
|
+
- release or publishing behavior
|
|
76
|
+
- security or disclosure guidance
|