@@ -16,7 +16,10 @@ The Python API (`idtap`) is a sophisticated client library for interacting with
1616- ** Integration tests** : ` python python/api_testing/api_test.py ` (requires live server auth)
1717- Test structure: Complete coverage of data models, client functionality, and authentication
1818
19- ### Build/Package/Publish
19+ ### Build/Package/Publish - AUTOMATED via GitHub Actions
20+ ** ⚠️ IMPORTANT: Manual publishing is now automated. See "Automated Version Management" section below.**
21+
22+ Manual publishing (for local testing only):
2023``` bash
2124python -m build
2225python -m twine upload dist/* # or --repository testpypi for testing
@@ -86,12 +89,84 @@ python/idtap/
8689- ** Multi-instrument** : Sitar, Vocal (Male/Female) with instrument-specific features
8790- ** Analytical Tools** : Trajectory categorization, phrase grouping, temporal analysis
8891
89- ## Development Workflow
92+ ## Automated Version Management & Publishing
93+
94+ ### 🤖 How It Works (python-semantic-release + GitHub Actions)
95+
96+ ** PATCH-ONLY MODE** : All commits automatically increment patch version (0.1.14 → 0.1.15) regardless of commit message.
97+
98+ #### Automatic Workflow
99+ 1 . ** Make changes** → Commit with any message
100+ 2 . ** Create PR** → GitHub Actions test + upload to TestPyPI automatically
101+ 3 . ** Merge to main** → Version bumps + PyPI published + GitHub release created
102+ 4 . ** Zero manual intervention** required!
103+
104+ #### Version Locations (Auto-Updated)
105+ - ` idtap/__init__.py:3 ` - ` __version__ = "0.1.14" `
106+ - ` pyproject.toml:7 ` - ` version = "0.1.14" `
107+ - ` docs/conf.py:16-17 ` - ` release = '0.1.14' ` and ` version = '0.1.14' `
108+
109+ ### 🎛️ Manual Version Control Commands
110+
111+ ** For normal development (patch bumps)** :
112+ ``` bash
113+ # Any commit message works - always bumps patch
114+ git commit -m " fix something" # 0.1.14 → 0.1.15
115+ git commit -m " add new feature" # 0.1.14 → 0.1.15
116+ git commit -m " update docs" # 0.1.14 → 0.1.15
117+ ```
118+
119+ ** When Jon wants to control version bumps manually** :
120+ ``` bash
121+ # Force minor version bump (0.1.15 → 0.2.0)
122+ semantic-release version --increment minor
123+
124+ # Force major version bump (0.2.0 → 1.0.0)
125+ semantic-release version --increment major
126+
127+ # Dry run to see what would happen
128+ semantic-release version --print --no-commit --no-tag --no-push --no-vcs-release
129+ ```
130+
131+ ### 🔧 Configuration Details
132+
133+ ** Location** : ` pyproject.toml ` ` [tool.semantic_release] ` section
134+ - ** patch_tags** : ALL commit types → patch version increment
135+ - ** minor_tags** : ` [] ` (empty - no automatic minor bumps)
136+ - ** major_tags** : ` [] ` (empty - no automatic major bumps)
137+ - ** Files updated** : ` __init__.py ` , ` pyproject.toml ` , ` docs/conf.py `
138+
139+ ### 🚀 GitHub Actions Workflows
140+
141+ ** ` .github/workflows/test-pr.yml ` ** :
142+ - Runs on every PR
143+ - Tests + builds package + uploads to TestPyPI
144+ - Comments PR with TestPyPI install link
145+
146+ ** ` .github/workflows/release.yml ` ** :
147+ - Runs on merge to main
148+ - Tests → version bump → build → PyPI publish → GitHub release
149+
150+ ### 📋 Required Setup (One-Time)
151+
152+ ** GitHub Secrets** :
153+ - ` TESTPYPI_API_TOKEN ` - For PR testing uploads
154+
155+ ** PyPI Trusted Publisher** (configured):
156+ - Owner: ` UCSC-IDTAP `
157+ - Repository: ` Python-API `
158+ - Workflow: ` release.yml `
159+ - Uses OIDC - no API tokens needed for production PyPI
160+
161+ ** ⚠️ CLAUDE: When Jon asks to update version in special way, use the manual commands above!**
162+
163+ ## Development Workflow (Updated for Automation)
901641 . ** Data Model Development** : Create/modify classes in ` /classes/ ` with proper serialization
91- 2 . ** Client Method Development** : Add HTTP methods in ` client.py ` with authentication
92- 3 . ** Testing** : Write unit tests (mocked) + integration tests (live API)
93- 4 . ** Sync Dependencies** : Update both ` Pipfile ` and ` pyproject.toml `
94- 5 . ** Build/Test/Publish** : Use standard Python packaging tools
165+ 2 . ** Client Method Development** : Add HTTP methods in ` client.py ` with authentication
166+ 3 . ** Testing** : Write unit tests (mocked) + integration tests (live API)
167+ 4 . ** PR Creation** : GitHub Actions automatically test + upload to TestPyPI
168+ 5 . ** Merge to main** : Automatic version bump + PyPI publish + GitHub release
169+ 6 . ** No manual version management needed!**
95170
96171## Installation Commands
97172``` bash
0 commit comments