mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-27 21:05:34 +00:00
feat: add download/clone tracking and PyPI publishing
- Add shields.io badges to docs front page (desktop downloads, PyPI installs, git clones, GitHub stars) - Add daily GitHub Action to accumulate git clone traffic data - Add PyPI publish workflow triggered on tags and releases - Add PyPI metadata (license, authors, classifiers, URLs) to pyproject.toml Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3c34ad47ab
commit
84582ff64f
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "Git Clones",
|
||||
"message": "0",
|
||||
"color": "green",
|
||||
"namedLogo": "git"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"total_clones": 0,
|
||||
"last_updated": "",
|
||||
"daily": {}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Publish to PyPI
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
environment: pypi
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v4
|
||||
|
||||
- name: Build package
|
||||
run: uv build
|
||||
|
||||
- name: Publish to PyPI
|
||||
run: uv publish
|
||||
@@ -0,0 +1,84 @@
|
||||
name: Track Git Clones
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 6 * * *' # Daily at 06:00 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
track-clones:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Fetch clone traffic
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh api repos/${{ github.repository }}/traffic/clones > /tmp/traffic.json
|
||||
|
||||
- name: Update accumulated data
|
||||
run: |
|
||||
python3 - <<'PYEOF'
|
||||
import json
|
||||
from datetime import datetime, timezone
|
||||
|
||||
# Load current traffic data from API
|
||||
with open("/tmp/traffic.json") as f:
|
||||
traffic = json.load(f)
|
||||
|
||||
# Load accumulated data
|
||||
data_path = ".github/clone-stats/clone-data.json"
|
||||
with open(data_path) as f:
|
||||
accumulated = json.load(f)
|
||||
|
||||
daily = accumulated.get("daily", {})
|
||||
|
||||
# Merge new daily entries (keyed by date to avoid double-counting)
|
||||
for entry in traffic.get("clones", []):
|
||||
date_key = entry["timestamp"][:10] # "2026-03-26"
|
||||
daily[date_key] = entry["count"] # total clones, not unique
|
||||
|
||||
# Recalculate total from all daily data
|
||||
total = sum(daily.values())
|
||||
|
||||
# Update accumulated data
|
||||
accumulated["daily"] = dict(sorted(daily.items()))
|
||||
accumulated["total_clones"] = total
|
||||
accumulated["last_updated"] = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||
|
||||
with open(data_path, "w") as f:
|
||||
json.dump(accumulated, f, indent=2)
|
||||
f.write("\n")
|
||||
|
||||
# Update shields.io endpoint badge
|
||||
badge = {
|
||||
"schemaVersion": 1,
|
||||
"label": "Git Clones",
|
||||
"message": f"{total:,}",
|
||||
"color": "green",
|
||||
"namedLogo": "git"
|
||||
}
|
||||
|
||||
with open(".github/clone-stats/badge.json", "w") as f:
|
||||
json.dump(badge, f, indent=2)
|
||||
f.write("\n")
|
||||
|
||||
print(f"Updated: {total:,} total clones across {len(daily)} days")
|
||||
PYEOF
|
||||
|
||||
- name: Commit and push
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add .github/clone-stats/
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to commit"
|
||||
else
|
||||
git commit -m "chore: update clone traffic data [skip ci]"
|
||||
git push
|
||||
fi
|
||||
@@ -9,6 +9,13 @@ hide:
|
||||
|
||||
# Personal AI, On Personal Devices
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/open-jarvis/OpenJarvis/releases"><img src="https://img.shields.io/github/downloads/open-jarvis/OpenJarvis/total?label=Desktop%20Downloads&logo=github&color=blue" alt="Desktop Downloads"></a>
|
||||
<a href="https://pypistats.org/packages/openjarvis"><img src="https://img.shields.io/pypi/dm/openjarvis?label=PyPI%20Installs/month&logo=python&color=blue" alt="PyPI Downloads"></a>
|
||||
<a href="https://github.com/open-jarvis/OpenJarvis"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/open-jarvis/OpenJarvis/main/.github/clone-stats/badge.json" alt="Git Clones"></a>
|
||||
<a href="https://github.com/open-jarvis/OpenJarvis"><img src="https://img.shields.io/github/stars/open-jarvis/OpenJarvis?style=social" alt="GitHub Stars"></a>
|
||||
</p>
|
||||
|
||||
<p class="hero-tagline">
|
||||
OpenJarvis is a research framework for composable, on-device AI systems.
|
||||
Build personal AI that runs on your hardware. Cloud APIs are optional.
|
||||
|
||||
@@ -8,6 +8,21 @@ version = "0.1.0"
|
||||
description = "OpenJarvis — modular AI assistant backend with composable intelligence primitives"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
license = {text = "Apache-2.0"}
|
||||
authors = [
|
||||
{name = "Open Jarvis Contributors"},
|
||||
]
|
||||
classifiers = [
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
||||
]
|
||||
dependencies = [
|
||||
"click>=8",
|
||||
"datasets>=4.5.0",
|
||||
@@ -110,6 +125,12 @@ docs = [
|
||||
"mkdocs-literate-nav>=0.6",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/open-jarvis/OpenJarvis"
|
||||
Documentation = "https://open-jarvis.github.io/OpenJarvis/"
|
||||
Repository = "https://github.com/open-jarvis/OpenJarvis"
|
||||
Issues = "https://github.com/open-jarvis/OpenJarvis/issues"
|
||||
|
||||
[project.scripts]
|
||||
jarvis = "openjarvis.cli:main"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user