gitlytics 0.6.1__tar.gz → 0.6.3__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.
Files changed (52) hide show
  1. {gitlytics-0.6.1 → gitlytics-0.6.3}/PKG-INFO +3 -3
  2. {gitlytics-0.6.1 → gitlytics-0.6.3}/README.md +2 -2
  3. {gitlytics-0.6.1 → gitlytics-0.6.3}/pyproject.toml +1 -1
  4. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/__init__.py +1 -1
  5. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/core.py +30 -1
  6. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics.egg-info/PKG-INFO +3 -3
  7. {gitlytics-0.6.1 → gitlytics-0.6.3}/LICENSE +0 -0
  8. {gitlytics-0.6.1 → gitlytics-0.6.3}/setup.cfg +0 -0
  9. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/__main__.py +0 -0
  10. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/api.py +0 -0
  11. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/automation.py +0 -0
  12. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/cli.py +0 -0
  13. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/process.py +0 -0
  14. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/_headers +0 -0
  15. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/_redirects +0 -0
  16. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/android-chrome-192x192.png +0 -0
  17. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/android-chrome-512x512.png +0 -0
  18. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/apple-touch-icon.png +0 -0
  19. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/assets/CardModal-9oHMecdc.js +0 -0
  20. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/assets/ExportModal-M_KmGZ_C.js +0 -0
  21. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/assets/html2canvas-pro.esm-9xys3ejh.js +0 -0
  22. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/assets/html2canvas.esm-DXEQVQnt.js +0 -0
  23. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/assets/index-Bro5YaCJ.css +0 -0
  24. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/assets/index-wOhawfKi.js +0 -0
  25. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/assets/index.es-tlOthHFQ.js +0 -0
  26. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/assets/jspdf.es.min-DD49TTEi.js +0 -0
  27. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/assets/purify.es-CC4Brkr_.js +0 -0
  28. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/favicon-16x16.png +0 -0
  29. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/favicon-32x32.png +0 -0
  30. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/favicon-48x48.png +0 -0
  31. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/favicon.ico +0 -0
  32. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/gitlytics-logo.png +0 -0
  33. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/google-search-icon-48x48.png +0 -0
  34. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/google-search-icon.png +0 -0
  35. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/index.html +0 -0
  36. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/llms-full.txt +0 -0
  37. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/llms.txt +0 -0
  38. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/robots.txt +0 -0
  39. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/site.webmanifest +0 -0
  40. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics/static/sitemap.xml +0 -0
  41. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics.egg-info/SOURCES.txt +0 -0
  42. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics.egg-info/dependency_links.txt +0 -0
  43. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics.egg-info/entry_points.txt +0 -0
  44. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics.egg-info/requires.txt +0 -0
  45. {gitlytics-0.6.1 → gitlytics-0.6.3}/src/gitlytics.egg-info/top_level.txt +0 -0
  46. {gitlytics-0.6.1 → gitlytics-0.6.3}/tests/test_api.py +0 -0
  47. {gitlytics-0.6.1 → gitlytics-0.6.3}/tests/test_automation.py +0 -0
  48. {gitlytics-0.6.1 → gitlytics-0.6.3}/tests/test_cli.py +0 -0
  49. {gitlytics-0.6.1 → gitlytics-0.6.3}/tests/test_core.py +0 -0
  50. {gitlytics-0.6.1 → gitlytics-0.6.3}/tests/test_process.py +0 -0
  51. {gitlytics-0.6.1 → gitlytics-0.6.3}/tests/test_star_history.py +0 -0
  52. {gitlytics-0.6.1 → gitlytics-0.6.3}/tests/test_username.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitlytics
3
- Version: 0.6.1
3
+ Version: 0.6.3
4
4
  Summary: Monitor and automate your GitHub repository traffic analytics.
5
5
  Author-email: Ameya Chopade <ameyaccod171@gmail.com>
6
6
  License: Apache-2.0
@@ -35,7 +35,7 @@ Dynamic: license-file
35
35
 
36
36
  <img src="https://raw.githubusercontent.com/ameyac11/gitlytics/main/assets/logo.png" alt="Gitlytics Logo" width="150" />
37
37
 
38
- # Gitlytics v0.6.1
38
+ # Gitlytics v0.6.3
39
39
  ### GitHub Traffic Analytics, Dynamic Widgets & Automation
40
40
 
41
41
  [![License](https://api.gitlytics.dev/api/badge/tech.svg?slug=license&style=icon_label_value&label=License&label_color=%23555555&variant=plastic&value=Apache+2.0&value_color=%232F81F7)](LICENSE)
@@ -189,7 +189,7 @@ Explore our official engineering publication at **[blog.gitlytics.dev](https://b
189
189
 
190
190
  ## 🔑 Flexible Authentication Modes
191
191
 
192
- Gitlytics v0.6.1 supports 3 authentication modes:
192
+ Gitlytics v0.6.3 supports 3 authentication modes:
193
193
 
194
194
  1. **Token Authentication (PAT)**: Pass your GitHub Personal Access Token (Classic or Fine-Grained) with `repo` scope to fetch private & public repository metrics.
195
195
  2. **Demo Mode (Instant Exploration)**: Explore the web dashboard and CLI immediately using curated sample data without entering any credentials.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <img src="https://raw.githubusercontent.com/ameyac11/gitlytics/main/assets/logo.png" alt="Gitlytics Logo" width="150" />
4
4
 
5
- # Gitlytics v0.6.1
5
+ # Gitlytics v0.6.3
6
6
  ### GitHub Traffic Analytics, Dynamic Widgets & Automation
7
7
 
8
8
  [![License](https://api.gitlytics.dev/api/badge/tech.svg?slug=license&style=icon_label_value&label=License&label_color=%23555555&variant=plastic&value=Apache+2.0&value_color=%232F81F7)](LICENSE)
@@ -156,7 +156,7 @@ Explore our official engineering publication at **[blog.gitlytics.dev](https://b
156
156
 
157
157
  ## 🔑 Flexible Authentication Modes
158
158
 
159
- Gitlytics v0.6.1 supports 3 authentication modes:
159
+ Gitlytics v0.6.3 supports 3 authentication modes:
160
160
 
161
161
  1. **Token Authentication (PAT)**: Pass your GitHub Personal Access Token (Classic or Fine-Grained) with `repo` scope to fetch private & public repository metrics.
162
162
  2. **Demo Mode (Instant Exploration)**: Explore the web dashboard and CLI immediately using curated sample data without entering any credentials.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gitlytics"
7
- version = "0.6.1"
7
+ version = "0.6.3"
8
8
  description = "Monitor and automate your GitHub repository traffic analytics."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -9,7 +9,7 @@ from pathlib import Path
9
9
 
10
10
  # Single source of truth for the package version.
11
11
  # Mirrors the version in pyproject.toml — keep them in sync.
12
- __version__ = "0.6.1"
12
+ __version__ = "0.6.3"
13
13
 
14
14
  __all__ = [
15
15
  "fetch_traffic",
@@ -472,7 +472,7 @@ def fetch_star_history(owner: str, repo: str, token: str | None = None) -> list[
472
472
  except Exception as exc:
473
473
  logger.warning(f"Stargazers fetch failed for {owner}/{repo} page {p}: {exc}")
474
474
  continue
475
- if r.status_code in (403, 429, 404):
475
+ if r.status_code in (401, 403, 429, 404):
476
476
  logger.warning(f"Stargazers endpoint restricted/limited (HTTP {r.status_code}) for {owner}/{repo}")
477
477
  break
478
478
  if r.status_code != 200:
@@ -546,6 +546,25 @@ def fetch_star_history(owner: str, repo: str, token: str | None = None) -> list[
546
546
  except Exception as exc:
547
547
  logger.warning("Stargazers history fetch exception for %s/%s: %s", owner, repo, exc)
548
548
 
549
+ if not points:
550
+ # Fallback: Query repo /events endpoint for WatchEvent timestamps
551
+ try:
552
+ r_ev = requests.get(f"{BASE}/repos/{owner}/{repo}/events", headers=headers, timeout=10)
553
+ if r_ev.status_code == 200 and isinstance(r_ev.json(), list):
554
+ events = r_ev.json()
555
+ watch_dates = sorted([
556
+ str(e.get("created_at"))[:10]
557
+ for e in events
558
+ if isinstance(e, dict) and e.get("type") == "WatchEvent" and e.get("created_at")
559
+ ])
560
+ if watch_dates:
561
+ count = 0
562
+ for d in watch_dates:
563
+ count += 1
564
+ points.append({"date": d, "total": count})
565
+ except Exception as ev_exc:
566
+ logger.warning(f"Events fallback failed for {owner}/{repo}: {ev_exc}")
567
+
549
568
  if not points:
550
569
  return [{"date": today_str, "total": total_stars}]
551
570
 
@@ -559,6 +578,16 @@ def fetch_star_history(owner: str, repo: str, token: str | None = None) -> list[
559
578
  if not per_day_max or max(per_day_max.values()) < total_stars:
560
579
  per_day_max[today_str] = total_stars
561
580
 
581
+ # Always ensure a start date (repo creation date or 30 days prior at 0 stars)
582
+ # so the timeline renders a clean line graph instead of a single floating dot.
583
+ created_at_raw = meta.get("created_at") if isinstance(meta, dict) else None
584
+ start_date = str(created_at_raw)[:10] if created_at_raw else (now - timedelta(days=30)).strftime("%Y-%m-%d")
585
+ if start_date >= today_str:
586
+ start_date = (now - timedelta(days=30)).strftime("%Y-%m-%d")
587
+
588
+ if start_date not in per_day_max:
589
+ per_day_max[start_date] = 0
590
+
562
591
  # Convert raw "max position on this day" into a running cumulative count.
563
592
  # Stars are monotone — total can never decrease across dates.
564
593
  sorted_dates = sorted(per_day_max.keys())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitlytics
3
- Version: 0.6.1
3
+ Version: 0.6.3
4
4
  Summary: Monitor and automate your GitHub repository traffic analytics.
5
5
  Author-email: Ameya Chopade <ameyaccod171@gmail.com>
6
6
  License: Apache-2.0
@@ -35,7 +35,7 @@ Dynamic: license-file
35
35
 
36
36
  <img src="https://raw.githubusercontent.com/ameyac11/gitlytics/main/assets/logo.png" alt="Gitlytics Logo" width="150" />
37
37
 
38
- # Gitlytics v0.6.1
38
+ # Gitlytics v0.6.3
39
39
  ### GitHub Traffic Analytics, Dynamic Widgets & Automation
40
40
 
41
41
  [![License](https://api.gitlytics.dev/api/badge/tech.svg?slug=license&style=icon_label_value&label=License&label_color=%23555555&variant=plastic&value=Apache+2.0&value_color=%232F81F7)](LICENSE)
@@ -189,7 +189,7 @@ Explore our official engineering publication at **[blog.gitlytics.dev](https://b
189
189
 
190
190
  ## 🔑 Flexible Authentication Modes
191
191
 
192
- Gitlytics v0.6.1 supports 3 authentication modes:
192
+ Gitlytics v0.6.3 supports 3 authentication modes:
193
193
 
194
194
  1. **Token Authentication (PAT)**: Pass your GitHub Personal Access Token (Classic or Fine-Grained) with `repo` scope to fetch private & public repository metrics.
195
195
  2. **Demo Mode (Instant Exploration)**: Explore the web dashboard and CLI immediately using curated sample data without entering any credentials.
File without changes
File without changes
File without changes
File without changes
File without changes