nexus-cli 0.3.0__tar.gz → 0.5.2__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 (136) hide show
  1. nexus_cli-0.5.2/.STATUS +174 -0
  2. nexus_cli-0.5.2/.github/workflows/ci.yml +143 -0
  3. nexus_cli-0.5.2/.github/workflows/homebrew-release.yml +62 -0
  4. nexus_cli-0.5.2/.github/workflows/quality.yml +110 -0
  5. nexus_cli-0.5.2/.github/workflows/release.yml +125 -0
  6. nexus_cli-0.5.2/.github/workflows/test.yml +129 -0
  7. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/.gitignore +1 -0
  8. nexus_cli-0.5.2/CI_CD_SUMMARY.md +212 -0
  9. nexus_cli-0.5.2/CLAUDE.md +609 -0
  10. nexus_cli-0.5.2/DOCUMENTATION_UPDATE_SUMMARY.md +202 -0
  11. nexus_cli-0.5.2/FINAL_SUMMARY.md +241 -0
  12. nexus_cli-0.5.2/HOMEBREW_FORMULA_SETUP.md +238 -0
  13. nexus_cli-0.5.2/INSTALLATION_TROUBLESHOOTING.md +582 -0
  14. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/PKG-INFO +57 -4
  15. nexus_cli-0.5.2/PLANNING.md +459 -0
  16. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/README.md +55 -3
  17. nexus_cli-0.5.2/README_BADGES.md +45 -0
  18. nexus_cli-0.5.2/RELEASE_NOTES_v0.5.0.md +423 -0
  19. nexus_cli-0.5.2/RELEASE_NOTES_v0.5.1.md +433 -0
  20. nexus_cli-0.5.2/SESSION_COMPLETE.md +298 -0
  21. nexus_cli-0.5.2/SESSION_COMPLETE.txt +79 -0
  22. nexus_cli-0.5.2/SESSION_WRAP_UP.txt +152 -0
  23. nexus_cli-0.5.2/TEST_SUMMARY.md +257 -0
  24. nexus_cli-0.5.2/TODO.md +233 -0
  25. nexus_cli-0.5.2/TUTORIAL_GUIDE.md +274 -0
  26. nexus_cli-0.5.2/TUTORIAL_QUICK_REF.md +232 -0
  27. nexus_cli-0.5.2/archive/sessions-2025-12/SESSION_2025-12-25_TUTORIAL_SYSTEM.md +445 -0
  28. nexus_cli-0.5.2/archive/sessions-2025-12/SESSION_COMPLETE_2025-12-25.md +340 -0
  29. nexus_cli-0.5.2/archive/sessions-2025-12/SESSION_SUMMARY.md +616 -0
  30. nexus_cli-0.5.2/archive/sessions-2025-12/TUTORIAL_SYSTEM_COMPLETE.md +405 -0
  31. nexus_cli-0.5.2/archive/testing-utilities/FINAL_SESSION_SUMMARY.md +351 -0
  32. nexus_cli-0.5.2/archive/testing-utilities/Formula-local-test.rb +61 -0
  33. nexus_cli-0.5.2/archive/testing-utilities/QUICK_START_TESTING.md +306 -0
  34. nexus_cli-0.5.2/archive/testing-utilities/QUICK_TEST_GUIDE.md +116 -0
  35. nexus_cli-0.5.2/archive/testing-utilities/TESTING_GUIDE.md +315 -0
  36. nexus_cli-0.5.2/archive/testing-utilities/interactive_dogfood.py +370 -0
  37. nexus_cli-0.5.2/archive/testing-utilities/test_local_install.sh +119 -0
  38. nexus_cli-0.5.2/docs/changelog.md +301 -0
  39. nexus_cli-0.5.2/docs/development/architecture.md +719 -0
  40. nexus_cli-0.5.2/docs/development/contributing.md +124 -0
  41. nexus_cli-0.5.2/docs/development/testing.md +731 -0
  42. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/docs/getting-started/quickstart.md +46 -5
  43. nexus_cli-0.5.2/docs/guide/knowledge.md +81 -0
  44. nexus_cli-0.5.2/docs/guide/overview.md +89 -0
  45. nexus_cli-0.5.2/docs/guide/research.md +83 -0
  46. nexus_cli-0.5.2/docs/guide/teaching.md +85 -0
  47. nexus_cli-0.5.2/docs/guide/writing.md +90 -0
  48. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/docs/index.md +52 -2
  49. nexus_cli-0.5.2/docs/reference/api.md +553 -0
  50. nexus_cli-0.5.2/docs/reference/cli.md +278 -0
  51. nexus_cli-0.5.2/docs/reference/mcp.md +653 -0
  52. nexus_cli-0.5.2/docs/specs/SPEC-bibliography-coverage.md +79 -0
  53. nexus_cli-0.5.2/docs/specs/SPEC-cli-coverage.md +87 -0
  54. nexus_cli-0.5.2/docs/specs/SPEC-courses-coverage.md +78 -0
  55. nexus_cli-0.5.2/docs/specs/SPEC-nexus-doctor.md +171 -0
  56. nexus_cli-0.5.2/docs/tutorials/first-steps.md +264 -0
  57. nexus_cli-0.5.2/docs/tutorials/graph-viz.md +471 -0
  58. nexus_cli-0.5.2/docs/tutorials/tutorial-guide.md +1 -0
  59. nexus_cli-0.5.2/docs/tutorials/tutorial-quick-ref.md +1 -0
  60. nexus_cli-0.5.2/docs/tutorials/tutorial-system.md +394 -0
  61. nexus_cli-0.5.2/docs/tutorials/vault-setup.md +352 -0
  62. nexus_cli-0.5.2/docs/tutorials/zotero.md +394 -0
  63. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/mkdocs.yml +10 -5
  64. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/__init__.py +1 -1
  65. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/cli.py +270 -49
  66. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/knowledge/search.py +5 -2
  67. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/knowledge/vault.py +122 -10
  68. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/research/pdf.py +13 -10
  69. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/research/zotero.py +5 -4
  70. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/teaching/courses.py +6 -3
  71. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/teaching/quarto.py +18 -12
  72. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/utils/config.py +15 -7
  73. nexus_cli-0.5.2/nexus/utils/tutorial.py +638 -0
  74. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/writing/bibliography.py +6 -3
  75. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/writing/manuscript.py +207 -5
  76. nexus_cli-0.5.2/output.json +4 -0
  77. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/.claude-plugin/plugin.json +4 -1
  78. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/pyproject.toml +2 -1
  79. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_bibliography.py +0 -2
  80. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_cli.py +2 -2
  81. nexus_cli-0.5.2/tests/test_cli_commands.py +174 -0
  82. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_cli_integration.py +10 -2
  83. nexus_cli-0.5.2/tests/test_cli_research_commands.py +388 -0
  84. nexus_cli-0.5.2/tests/test_cli_vault_commands.py +326 -0
  85. nexus_cli-0.5.2/tests/test_cli_writing_commands.py +247 -0
  86. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_config.py +1 -2
  87. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_courses.py +0 -2
  88. nexus_cli-0.5.2/tests/test_dogfooding.py +1055 -0
  89. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_edge_cases.py +1 -4
  90. nexus_cli-0.5.2/tests/test_graph_export.py +249 -0
  91. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_manuscript.py +0 -2
  92. nexus_cli-0.5.2/tests/test_manuscript_batch.py +368 -0
  93. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_pdf.py +0 -2
  94. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_pdf_extractor.py +2 -5
  95. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_quarto.py +1 -1
  96. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_quarto_manager.py +2 -5
  97. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_search.py +1 -6
  98. nexus_cli-0.5.2/tests/test_tutorial.py +460 -0
  99. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_validation.py +5 -7
  100. nexus_cli-0.5.2/tests/test_zotero_client.py +862 -0
  101. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/uv.lock +12 -1
  102. nexus_cli-0.3.0/.STATUS +0 -169
  103. nexus_cli-0.3.0/.github/workflows/ci.yml +0 -125
  104. nexus_cli-0.3.0/CLAUDE.md +0 -199
  105. nexus_cli-0.3.0/docs/changelog.md +0 -107
  106. nexus_cli-0.3.0/tests/test_zotero_client.py +0 -421
  107. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/.github/workflows/docs.yml +0 -0
  108. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/.github/workflows/publish.yml +0 -0
  109. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/.python-version +0 -0
  110. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/RELEASE_NOTES_v0.4.0.md +0 -0
  111. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/config/nexus.example.yaml +0 -0
  112. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/docs/getting-started/configuration.md +0 -0
  113. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/docs/getting-started/installation.md +0 -0
  114. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/install.sh +0 -0
  115. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/main.py +0 -0
  116. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/integrations/__init__.py +0 -0
  117. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/knowledge/__init__.py +0 -0
  118. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/research/__init__.py +0 -0
  119. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/teaching/__init__.py +0 -0
  120. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/utils/__init__.py +0 -0
  121. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/nexus/writing/__init__.py +0 -0
  122. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/README.md +0 -0
  123. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/commands/check.md +0 -0
  124. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/commands/cite.md +0 -0
  125. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/commands/dashboard.md +0 -0
  126. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/commands/manuscripts.md +0 -0
  127. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/commands/search.md +0 -0
  128. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/skills/integration-patterns/skill.md +0 -0
  129. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/skills/knowledge/vault-operations/skill.md +0 -0
  130. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/skills/research/zotero-integration/skill.md +0 -0
  131. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/skills/teaching/course-management/skill.md +0 -0
  132. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/plugin/skills/writing/manuscript-management/skill.md +0 -0
  133. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/__init__.py +0 -0
  134. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/conftest.py +0 -0
  135. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_vault.py +0 -0
  136. {nexus_cli-0.3.0 → nexus_cli-0.5.2}/tests/test_zotero.py +0 -0
@@ -0,0 +1,174 @@
1
+ status: active
2
+ priority: 1
3
+ progress: 30
4
+ next: Start Session 1 — courses.py coverage (feature/courses-coverage worktree)
5
+ type: dev
6
+ checkpoint: 2026-06-02 — dev branch created, branch protection on main, 4 specs written, ORCHESTRATE plan ready. v0.6.0 target.
7
+ version: 0.5.1
8
+ release_date: 2025-12-31
9
+ release_url: https://github.com/Data-Wise/nexus-cli/releases/tag/v0.5.1
10
+ docs_url: https://data-wise.github.io/nexus-cli/
11
+ planning_doc: ORCHESTRATE-nexus-enhancement.md
12
+
13
+ worktrees:
14
+ - branch: feature/nexus-enhancement
15
+ path: ~/.git-worktrees/nexus-cli/nexus-enhancement
16
+ purpose: ORCHESTRATE plan (planning only — do not implement here)
17
+
18
+ # ═══════════════════════════════════════════════════════════════════
19
+ # Nexus CLI - Knowledge Workflow for Research, Teaching, Writing
20
+ # ═══════════════════════════════════════════════════════════════════
21
+
22
+ 🔧 Nexus CLI Development Status
23
+ ────────────────────────────────────────
24
+
25
+ 📍 LOCATION
26
+ ~/projects/dev-tools/nexus-cli/
27
+
28
+ ⏰ LAST UPDATED
29
+ 2025-12-31 (Evening) - Quality Improvements Complete - Website Updated!
30
+
31
+ ────────────────────────────────────────
32
+
33
+ 🎉 RELEASE v0.5.1 - INTERACTIVE TUTORIAL SYSTEM
34
+
35
+ **Learning & onboarding enhancement release!**
36
+
37
+ Release highlights:
38
+ - ✅ Interactive tutorial system (30 steps across 3 levels)
39
+ - ✅ `nexus learn` command with pause/resume capability
40
+ - ✅ Reduces onboarding time: ~2 hours → ~30 minutes (75% reduction)
41
+ - ✅ 638 lines tutorial engine (no new dependencies)
42
+ - ✅ 600+ lines comprehensive documentation
43
+ - ✅ GitHub Release with binaries published
44
+ - ✅ Documentation automatically deployed
45
+
46
+ ────────────────────────────────────────
47
+
48
+ 🎯 CURRENT STATUS
49
+
50
+ **v0.5.1 SHIPPED** ✅
51
+
52
+ All v0.5.1 features complete:
53
+ - ✅ Tutorial Engine (nexus/utils/tutorial.py - 638 lines)
54
+ - ✅ Three progressive levels (Getting Started, Medium, Advanced)
55
+ - ✅ 30 total hands-on steps with real commands
56
+ - ✅ Rich terminal formatting and interactive prompts
57
+ - ✅ Pause/resume from any step
58
+ - ✅ Comprehensive documentation (TUTORIAL_GUIDE.md + MkDocs)
59
+
60
+ Tutorial content:
61
+ - Getting Started (7 steps, ~10 min): doctor → config → detect → search
62
+ - Medium (11 steps, ~20 min): Research, Knowledge, Teaching, Writing workflows
63
+ - Advanced (12 steps, ~30 min): Batch ops, graph exports, Claude integration
64
+
65
+ Release artifacts:
66
+ - Git tag: v0.5.1
67
+ - GitHub Release: https://github.com/Data-Wise/nexus-cli/releases/tag/v0.5.1
68
+ - Built packages: nexus_cli-0.5.1-py3-none-any.whl, nexus_cli-0.5.1.tar.gz
69
+ - Documentation: https://data-wise.github.io/nexus-cli/ (auto-deployed)
70
+
71
+ ────────────────────────────────────────
72
+
73
+ 📊 PROJECT METRICS (Updated 2025-12-31 - Evening)
74
+
75
+ Version: 0.5.1
76
+ Tests: 500 passing (76.65% coverage) ⬆️ +38 tests today, +78 total
77
+ Commands: 50+ across 4 domains
78
+ Tutorial Steps: 30 (7 + 11 + 12)
79
+ Module Coverage:
80
+ - Tutorial: 94.2% (nexus/utils/tutorial.py) ✅
81
+ - Zotero: 96.89% (nexus/research/zotero.py) 🚀 NEW!
82
+ Type Safety: 0 mypy errors (utils + zotero) ✅
83
+ Documentation: 10,000+ lines (MkDocs)
84
+ Python: 3.11+ required
85
+
86
+ ────────────────────────────────────────
87
+
88
+ 🎯 QUALITY IMPROVEMENTS IN PROGRESS (Dec 31, 2025)
89
+
90
+ **Phase 1: Repository Cleanup** ✅ COMPLETE
91
+ - [x] Fix CI failures (formatting)
92
+ - [x] Archive old session notes
93
+ - [x] Archive testing utilities
94
+ - [x] Add release documentation
95
+
96
+ **Phase 2: Tutorial Tests** ✅ COMPLETE
97
+ - [x] Add 39 tests for tutorial system
98
+ - [x] Achieve 94.2% coverage for tutorial.py
99
+ - [x] Increase overall coverage to 75% (+21pp)
100
+
101
+ **Phase 3: Type Improvements** ✅ COMPLETE
102
+ - [x] Add types-PyYAML dependency
103
+ - [x] Fix mypy errors in utils modules
104
+ - [x] All utils modules type-safe (0 errors)
105
+
106
+ **Phase 4: Zotero Tests** ✅ COMPLETE (2.3 hours)
107
+ - [x] Add 38 tests for Zotero integration
108
+ - [x] Achieve 96.89% coverage for zotero.py (+24.39pp!)
109
+ - [x] Fix 4 mypy errors - now type-safe
110
+ - [x] Enhanced mock database (7 items, 5 tags, 4 collections, attachments)
111
+ - [x] Comprehensive edge case testing (SQL injection, Unicode, empty DB)
112
+ - [x] All 71 Zotero tests passing
113
+
114
+ **NEXT: Phase 5 - Knowledge Domain** (See PLANNING.md, SESSION_COMPLETE.md)
115
+
116
+ **Option A: Continue Quality** (RECOMMENDED)
117
+ - [ ] Add tests for research domain (Zotero)
118
+ - [ ] Add tests for knowledge domain (Vault)
119
+ - [ ] Increase coverage to 80%+
120
+ - [ ] Fix mypy errors in core domains
121
+
122
+ **Option B: New Features**
123
+ - [ ] Tutorial completion tracking
124
+ - [ ] Advanced graph features
125
+ - [ ] Batch operations expansion
126
+ - [ ] New integrations
127
+
128
+ **Option C: Developer Experience**
129
+ - [ ] Plugin system
130
+ - [ ] Shell completion
131
+ - [ ] Enhanced error messages
132
+ - [ ] Configuration wizard
133
+
134
+ **Option D: Documentation & Community**
135
+ - [ ] Video tutorials
136
+ - [ ] Blog posts/case studies
137
+ - [ ] Community building
138
+ - [ ] Marketing/outreach
139
+
140
+ ────────────────────────────────────────
141
+
142
+ 🔗 RELATED PROJECTS
143
+
144
+ | Project | Status | Purpose |
145
+ |---------|--------|---------|
146
+ | Nexus CLI | ✅ v0.5.1 | This project |
147
+ | aiterm | 📋 Spec PR #7 | Interactive tutorial spec (awaiting review) |
148
+ | Nexus MCP Server | ✅ Active | 17 tools for Claude integration |
149
+
150
+ ────────────────────────────────────────
151
+
152
+ 📁 KEY FILES (Updated Dec 31, 2025)
153
+
154
+ Core:
155
+ - nexus/cli.py - Main CLI - 2,060 lines
156
+ - nexus/utils/tutorial.py - Tutorial engine - 638 lines (94.2% coverage)
157
+ - nexus/utils/config.py - Configuration - 86 lines (type-safe)
158
+ - nexus/research/zotero.py - Zotero integration - 523 lines (96.89% coverage!)
159
+ - pyproject.toml - Project metadata (v0.5.1)
160
+
161
+ Documentation:
162
+ - PLANNING.md - Development roadmap with blueprint
163
+ - SESSION_COMPLETE.md - Zotero testing deep dive
164
+ - FINAL_SUMMARY.md - Today's session wrap-up
165
+ - docs/ - MkDocs website (auto-deployed)
166
+
167
+ Tests:
168
+ - tests/test_tutorial.py - Tutorial tests (39 tests, 94.2% coverage)
169
+ - tests/test_zotero_client.py - Zotero tests (71 tests, 96.89% coverage)
170
+
171
+ ────────────────────────────────────────
172
+
173
+ ✅ v0.5.1 RELEASED + QUALITY IMPROVEMENTS COMPLETE - 2025-12-31
174
+ 📊 500 tests, 76.65% coverage, 2 modules at 90%+, blueprint established
@@ -0,0 +1,143 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ pull_request:
7
+ branches: [ main, develop ]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ test:
12
+ name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
13
+ runs-on: ${{ matrix.os }}
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ os: [ubuntu-latest, macos-latest]
18
+ python-version: ["3.11", "3.12", "3.13"]
19
+
20
+ steps:
21
+ - name: Checkout code
22
+ uses: actions/checkout@v4
23
+
24
+ - name: Set up Python ${{ matrix.python-version }}
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: ${{ matrix.python-version }}
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@v4
31
+ with:
32
+ enable-cache: true
33
+
34
+ - name: Install dependencies
35
+ run: |
36
+ uv sync --all-extras
37
+
38
+ - name: Run linting
39
+ run: |
40
+ uv run ruff check nexus/
41
+ continue-on-error: true
42
+
43
+ - name: Run type checking
44
+ run: |
45
+ uv run mypy nexus/ --ignore-missing-imports
46
+ continue-on-error: true
47
+
48
+ - name: Run tests with coverage
49
+ run: |
50
+ uv run pytest --cov=nexus --cov-report=xml --cov-report=term -v
51
+
52
+ - name: Upload coverage to Codecov
53
+ uses: codecov/codecov-action@v4
54
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
55
+ with:
56
+ file: ./coverage.xml
57
+ flags: unittests
58
+ name: codecov-umbrella
59
+ fail_ci_if_error: false
60
+ env:
61
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
62
+
63
+ lint:
64
+ name: Code Quality
65
+ runs-on: ubuntu-latest
66
+ steps:
67
+ - uses: actions/checkout@v4
68
+
69
+ - name: Set up Python
70
+ uses: actions/setup-python@v5
71
+ with:
72
+ python-version: "3.13"
73
+
74
+ - name: Install uv
75
+ uses: astral-sh/setup-uv@v4
76
+ with:
77
+ enable-cache: true
78
+
79
+ - name: Install dependencies
80
+ run: uv sync --all-extras
81
+
82
+ - name: Check code formatting with ruff
83
+ run: |
84
+ uv run ruff format --check nexus/ tests/
85
+
86
+ - name: Lint with ruff
87
+ run: |
88
+ uv run ruff check nexus/ tests/
89
+
90
+ type-check:
91
+ name: Type Checking
92
+ runs-on: ubuntu-latest
93
+ steps:
94
+ - uses: actions/checkout@v4
95
+
96
+ - name: Set up Python
97
+ uses: actions/setup-python@v5
98
+ with:
99
+ python-version: "3.13"
100
+
101
+ - name: Install uv
102
+ uses: astral-sh/setup-uv@v4
103
+ with:
104
+ enable-cache: true
105
+
106
+ - name: Install dependencies
107
+ run: uv sync --all-extras
108
+
109
+ - name: Run mypy
110
+ run: |
111
+ uv run mypy nexus/ --ignore-missing-imports --no-error-summary
112
+
113
+ coverage:
114
+ name: Coverage Report
115
+ runs-on: ubuntu-latest
116
+ needs: test
117
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
118
+ steps:
119
+ - uses: actions/checkout@v4
120
+
121
+ - name: Set up Python
122
+ uses: actions/setup-python@v5
123
+ with:
124
+ python-version: "3.13"
125
+
126
+ - name: Install uv
127
+ uses: astral-sh/setup-uv@v4
128
+ with:
129
+ enable-cache: true
130
+
131
+ - name: Install dependencies
132
+ run: uv sync --all-extras
133
+
134
+ - name: Generate coverage report
135
+ run: |
136
+ uv run pytest --cov=nexus --cov-report=html --cov-report=term
137
+
138
+ - name: Upload coverage HTML report
139
+ uses: actions/upload-artifact@v4
140
+ with:
141
+ name: coverage-report
142
+ path: htmlcov/
143
+ retention-days: 30
@@ -0,0 +1,62 @@
1
+ name: Homebrew Release
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: ["Publish to PyPI"]
6
+ types: [completed]
7
+ workflow_dispatch:
8
+ inputs:
9
+ version:
10
+ description: 'Version to release (e.g., 0.5.1)'
11
+ required: true
12
+ type: string
13
+ auto_merge:
14
+ description: 'Auto-merge the formula PR'
15
+ required: false
16
+ type: boolean
17
+ default: true
18
+
19
+ jobs:
20
+ prepare:
21
+ name: Prepare Release Info
22
+ runs-on: ubuntu-latest
23
+ if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
24
+ outputs:
25
+ version: ${{ steps.release.outputs.version }}
26
+ sha256: ${{ steps.release.outputs.sha256 }}
27
+
28
+ steps:
29
+ - name: Get version from PyPI
30
+ id: release
31
+ run: |
32
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
33
+ VERSION="${{ github.event.inputs.version }}"
34
+ else
35
+ # Wait for PyPI to index the package
36
+ sleep 30
37
+ # Get latest version from PyPI
38
+ VERSION=$(curl -s https://pypi.org/pypi/nexus-cli/json | jq -r '.info.version')
39
+ fi
40
+
41
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
42
+
43
+ # Get SHA256 from PyPI
44
+ SHA256=$(curl -s "https://pypi.org/pypi/nexus-cli/json" | \
45
+ jq -r ".releases[\"$VERSION\"][] | select(.packagetype==\"sdist\") | .digests.sha256")
46
+
47
+ echo "sha256=$SHA256" >> $GITHUB_OUTPUT
48
+ echo "Version: $VERSION"
49
+ echo "SHA256: $SHA256"
50
+
51
+ update-homebrew:
52
+ name: Update Homebrew Formula
53
+ needs: prepare
54
+ uses: Data-Wise/homebrew-tap/.github/workflows/update-formula.yml@main
55
+ with:
56
+ formula_name: nexus-cli
57
+ version: ${{ needs.prepare.outputs.version }}
58
+ sha256: ${{ needs.prepare.outputs.sha256 }}
59
+ source_type: pypi
60
+ auto_merge: ${{ github.event.inputs.auto_merge == 'true' || github.event_name == 'workflow_dispatch' }}
61
+ secrets:
62
+ tap_token: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
@@ -0,0 +1,110 @@
1
+ name: Code Quality
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ pull_request:
7
+ branches: [ main ]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ lint:
12
+ name: Linting
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.13"
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v4
25
+
26
+ - name: Install dependencies
27
+ run: uv sync --all-extras --dev
28
+
29
+ - name: Run ruff check
30
+ run: |
31
+ uv run ruff check nexus/ tests/ --output-format=github
32
+
33
+ - name: Run ruff format check
34
+ run: |
35
+ uv run ruff format --check nexus/ tests/
36
+
37
+ type-check:
38
+ name: Type Checking
39
+ runs-on: ubuntu-latest
40
+
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+
44
+ - name: Set up Python
45
+ uses: actions/setup-python@v5
46
+ with:
47
+ python-version: "3.13"
48
+
49
+ - name: Install uv
50
+ uses: astral-sh/setup-uv@v4
51
+
52
+ - name: Install dependencies
53
+ run: uv sync --all-extras --dev
54
+
55
+ - name: Run mypy
56
+ run: |
57
+ uv run mypy nexus/ --ignore-missing-imports --show-error-codes
58
+ continue-on-error: true
59
+
60
+ security:
61
+ name: Security Scan
62
+ runs-on: ubuntu-latest
63
+
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+
67
+ - name: Set up Python
68
+ uses: actions/setup-python@v5
69
+ with:
70
+ python-version: "3.13"
71
+
72
+ - name: Install uv
73
+ uses: astral-sh/setup-uv@v4
74
+
75
+ - name: Install dependencies
76
+ run: uv sync --all-extras --dev
77
+
78
+ - name: Run bandit security scan
79
+ run: |
80
+ uv run bandit -r nexus/ -f json -o bandit-report.json
81
+ continue-on-error: true
82
+
83
+ - name: Upload security report
84
+ uses: actions/upload-artifact@v4
85
+ if: always()
86
+ with:
87
+ name: security-scan-report
88
+ path: bandit-report.json
89
+ retention-days: 30
90
+
91
+ dependency-check:
92
+ name: Dependency Security
93
+ runs-on: ubuntu-latest
94
+
95
+ steps:
96
+ - uses: actions/checkout@v4
97
+
98
+ - name: Set up Python
99
+ uses: actions/setup-python@v5
100
+ with:
101
+ python-version: "3.13"
102
+
103
+ - name: Install uv
104
+ uses: astral-sh/setup-uv@v4
105
+
106
+ - name: Check for vulnerabilities
107
+ run: |
108
+ uv pip list --format=json > deps.json
109
+ echo "Dependency check complete"
110
+ continue-on-error: true
@@ -0,0 +1,125 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ permissions:
9
+ contents: write
10
+ id-token: write
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.12"
24
+
25
+ - name: Install build dependencies
26
+ run: pip install build
27
+
28
+ - name: Build package
29
+ run: python -m build
30
+
31
+ - name: Upload artifacts
32
+ uses: actions/upload-artifact@v4
33
+ with:
34
+ name: dist
35
+ path: dist/
36
+
37
+ release:
38
+ needs: build
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ with:
43
+ fetch-depth: 0
44
+
45
+ - name: Download artifacts
46
+ uses: actions/download-artifact@v4
47
+ with:
48
+ name: dist
49
+ path: dist/
50
+
51
+ - name: Get version from tag
52
+ id: get_version
53
+ run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
54
+
55
+ - name: Generate changelog
56
+ id: changelog
57
+ run: |
58
+ # Get commits since last tag
59
+ LAST_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
60
+ if [ -z "$LAST_TAG" ]; then
61
+ COMMITS=$(git log --oneline --pretty=format:"- %s" | head -20)
62
+ else
63
+ COMMITS=$(git log --oneline --pretty=format:"- %s" ${LAST_TAG}..HEAD)
64
+ fi
65
+
66
+ # Create changelog
67
+ echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
68
+ echo "## What's Changed" >> $GITHUB_OUTPUT
69
+ echo "" >> $GITHUB_OUTPUT
70
+ echo "$COMMITS" >> $GITHUB_OUTPUT
71
+ echo "" >> $GITHUB_OUTPUT
72
+ echo "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${LAST_TAG}...v${{ steps.get_version.outputs.VERSION }}" >> $GITHUB_OUTPUT
73
+ echo "EOF" >> $GITHUB_OUTPUT
74
+
75
+ - name: Create GitHub Release
76
+ uses: softprops/action-gh-release@v1
77
+ with:
78
+ name: v${{ steps.get_version.outputs.VERSION }}
79
+ body: ${{ steps.changelog.outputs.CHANGELOG }}
80
+ files: dist/*
81
+ draft: false
82
+ prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
83
+ env:
84
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85
+
86
+ publish-pypi:
87
+ needs: release
88
+ runs-on: ubuntu-latest
89
+ environment: pypi
90
+ permissions:
91
+ id-token: write
92
+ steps:
93
+ - name: Download artifacts
94
+ uses: actions/download-artifact@v4
95
+ with:
96
+ name: dist
97
+ path: dist/
98
+
99
+ - name: Publish to PyPI
100
+ uses: pypa/gh-action-pypi-publish@release/v1
101
+
102
+ docs:
103
+ needs: release
104
+ runs-on: ubuntu-latest
105
+ permissions:
106
+ contents: write
107
+ steps:
108
+ - uses: actions/checkout@v4
109
+ with:
110
+ fetch-depth: 0
111
+
112
+ - name: Set up Python
113
+ uses: actions/setup-python@v5
114
+ with:
115
+ python-version: "3.12"
116
+
117
+ - name: Install dependencies
118
+ run: |
119
+ pip install mkdocs-material mkdocstrings[python] mkdocs-git-revision-date-localized-plugin
120
+
121
+ - name: Build and deploy docs
122
+ run: |
123
+ git config user.name "github-actions[bot]"
124
+ git config user.email "github-actions[bot]@users.noreply.github.com"
125
+ mkdocs gh-deploy --force