Skip to content

Commit 8d5eabd

Browse files
committed
refactor: update paths from projects to packages in documentation and scripts
1 parent cff37f2 commit 8d5eabd

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

.github/workflows/QUICKSTART.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ Before publishing to production PyPI, test with TestPyPI:
103103

104104
```bash
105105
# 1. Update version numbers
106-
sed -i 's/^version = ".*"/version = "0.3.1"/' projects/agent/pyproject.toml
107-
sed -i 's/^version = ".*"/version = "0.3.1"/' projects/simunet/pyproject.toml
106+
sed -i 's/^version = ".*"/version = "0.3.1"/' packages/agent/pyproject.toml
107+
sed -i 's/^version = ".*"/version = "0.3.1"/' packages/simunet/pyproject.toml
108108

109109
# 2. Commit changes
110-
git add projects/*/pyproject.toml
110+
git add packages/*/pyproject.toml
111111
git commit -m "chore: bump version to 0.3.1"
112112
git push
113113

@@ -157,8 +157,8 @@ The `release.yml` workflow will automatically:
157157

158158
```bash
159159
# Manually update version in pyproject.toml files
160-
sed -i 's/^version = ".*"/version = "0.3.2"/' projects/agent/pyproject.toml
161-
sed -i 's/^version = ".*"/version = "0.3.2"/' projects/simunet/pyproject.toml
160+
sed -i 's/^version = ".*"/version = "0.3.2"/' packages/agent/pyproject.toml
161+
sed -i 's/^version = ".*"/version = "0.3.2"/' packages/simunet/pyproject.toml
162162
# Then rebuild and publish
163163
```
164164

@@ -177,7 +177,7 @@ Or check the image name matches: `ghcr.io/opensecflow/netdriver/python-uv:3.12`
177177
**Solution:** Check build output - Polylith path warnings are normal, verify wheel contents:
178178

179179
```bash
180-
unzip -l projects/agent/dist/netdriver_agent-*.whl
180+
unzip -l packages/agent/dist/netdriver_agent-*.whl
181181
```
182182

183183
## Best Practices
@@ -186,7 +186,7 @@ unzip -l projects/agent/dist/netdriver_agent-*.whl
186186

187187
**DO:**
188188

189-
- Keep version numbers in sync across `projects/agent/pyproject.toml` and `projects/simunet/pyproject.toml`
189+
- Keep version numbers in sync across `packages/agent/pyproject.toml` and `packages/simunet/pyproject.toml`
190190
- Use semantic versioning: `MAJOR.MINOR.PATCH`
191191
- Test on TestPyPI before production
192192

@@ -199,7 +199,7 @@ unzip -l projects/agent/dist/netdriver_agent-*.whl
199199
### Release Process
200200

201201
1. Develop features on branches
202-
2. Test locally: `uv build --directory projects/agent`
202+
2. Test locally: `uv build --directory packages/agent`
203203
3. Create PR and verify build test passes
204204
4. Merge to master
205205
5. Test on TestPyPI

.github/workflows/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ The project supports independent release workflows for agent and simunet:
6868

6969
```bash
7070
# Update agent version in pyproject.toml (optional, will be updated by workflow)
71-
sed -i 's/^version = ".*"/version = "1.0.0"/' projects/agent/pyproject.toml
71+
sed -i 's/^version = ".*"/version = "1.0.0"/' packages/agent/pyproject.toml
7272

7373
# Commit version changes (optional)
74-
git add projects/agent/pyproject.toml
74+
git add packages/agent/pyproject.toml
7575
git commit -m "chore: bump agent version to 1.0.0"
7676

7777
# Create and push agent tag
@@ -98,10 +98,10 @@ git push origin agent-1.0.0
9898

9999
```bash
100100
# Update simunet version in pyproject.toml (optional, will be updated by workflow)
101-
sed -i 's/^version = ".*"/version = "2.5.0"/' projects/simunet/pyproject.toml
101+
sed -i 's/^version = ".*"/version = "2.5.0"/' packages/simunet/pyproject.toml
102102

103103
# Commit version changes (optional)
104-
git add projects/simunet/pyproject.toml
104+
git add packages/simunet/pyproject.toml
105105
git commit -m "chore: bump simunet version to 2.5.0"
106106

107107
# Create and push simunet tag
@@ -165,13 +165,13 @@ Use this when you only need to release the agent:
165165
1. **Update version number** (optional):
166166

167167
```bash
168-
sed -i 's/^version = ".*"/version = "1.0.0"/' projects/agent/pyproject.toml
168+
sed -i 's/^version = ".*"/version = "1.0.0"/' packages/agent/pyproject.toml
169169
```
170170

171171
2. **Commit changes** (optional):
172172

173173
```bash
174-
git add projects/agent/pyproject.toml
174+
git add packages/agent/pyproject.toml
175175
git commit -m "chore: bump agent version to 1.0.0"
176176
git push origin master
177177
```
@@ -197,13 +197,13 @@ Use this when you need to release simunet:
197197
1. **Update version number** (optional):
198198

199199
```bash
200-
sed -i 's/^version = ".*"/version = "2.5.0"/' projects/simunet/pyproject.toml
200+
sed -i 's/^version = ".*"/version = "2.5.0"/' packages/simunet/pyproject.toml
201201
```
202202

203203
2. **Commit changes** (optional):
204204

205205
```bash
206-
git add projects/simunet/pyproject.toml
206+
git add packages/simunet/pyproject.toml
207207
git commit -m "chore: bump simunet version to 2.5.0"
208208
git push origin master
209209
```
@@ -235,8 +235,8 @@ To test publishing before official release:
235235
2. **Or use CLI**:
236236

237237
```bash
238-
uv publish --directory projects/agent --publish-url https://test.pypi.org/legacy/ --token $TESTPYPI_TOKEN
239-
uv publish --directory projects/simunet --publish-url https://test.pypi.org/legacy/ --token $TESTPYPI_TOKEN
238+
uv publish --directory packages/agent --publish-url https://test.pypi.org/legacy/ --token $TESTPYPI_TOKEN
239+
uv publish --directory packages/simunet --publish-url https://test.pypi.org/legacy/ --token $TESTPYPI_TOKEN
240240
```
241241

242242
3. **Verify on TestPyPI**:
@@ -413,7 +413,7 @@ jobs:
413413
- uses: astral-sh/setup-uv@v4
414414
- run: uv python install
415415
- run: uv sync
416-
- run: uv build --directory projects/agent
416+
- run: uv build --directory packages/agent
417417
```
418418
419419
**Benefits of using Docker image**:
@@ -452,7 +452,7 @@ netdriver/
452452
│ ├── agent/ # REST API service
453453
│ └── simunet/ # Simulation network
454454
├── components/ # Shared components
455-
└── projects/
455+
└── packages/
456456
├── agent/
457457
│ └── pyproject.toml
458458
└── simunet/
@@ -498,5 +498,5 @@ uv is pre-installed, so you can use it directly:
498498
## References
499499

500500
- [uv Documentation](https://docs.astral.sh/uv/)
501-
- [PyPI Publishing Guide](https://packaging.python.org/tutorials/packaging-projects/)
501+
- [PyPI Publishing Guide](https://packaging.python.org/tutorials/packaging-packages/)
502502
- [GitHub Actions - Python](https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python)

scripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ A convenient script to create and push release tags.
3737
2. Checks prerequisites (git repository, uv installation)
3838
3. Verifies working directory is clean
3939
4. Verifies the tag doesn't already exist
40-
5. Updates version in `projects/<project>/pyproject.toml`
40+
5. Updates version in `packages/<project>/pyproject.toml`
4141
6. Commits the version change
4242
7. Creates an annotated git tag (e.g., `agent-0.3.5`)
4343
8. Pushes the commit and tag to remote

scripts/release.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ fi
127127

128128
# Update version in pyproject.toml
129129
echo
130-
print_info "Updating version in projects/${PROJECT}/pyproject.toml to ${VERSION}..."
131-
sed -i '' "s/^version = \".*\"/version = \"${VERSION}\"/" "projects/${PROJECT}/pyproject.toml"
130+
print_info "Updating version in packages/${PROJECT}/pyproject.toml to ${VERSION}..."
131+
sed -i '' "s/^version = \".*\"/version = \"${VERSION}\"/" "packages/${PROJECT}/pyproject.toml"
132132
print_success "Version updated"
133133

134134
# Commit version changes
135135
print_info "Committing version changes..."
136-
git add "projects/${PROJECT}/pyproject.toml"
136+
git add "packages/${PROJECT}/pyproject.toml"
137137
git commit -m "chore: bump ${PROJECT} version to ${VERSION}"
138138
print_success "Version changes committed"
139139

0 commit comments

Comments
 (0)