Skip to content

Add dataset release and update CLI commands - #133

Merged
neuromechanist merged 4 commits into
devfrom
118-add-interactive-dataset-versioning-cli-command
Feb 12, 2026
Merged

neuromechanist merged 4 commits into
devfrom
118-add-interactive-dataset-versioning-cli-command

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

  • Add nemar dataset release <dataset-id> for creating version bump PRs (replaces old version stub)
  • Add nemar dataset update [path] for pushing local data/metadata changes via PR
  • Add GET /datasets/:id/versions backend endpoint for version history
  • Add semver utility with 24 unit tests
  • Add D1 migrations to deploy-backend CI workflow
  • Fix 0011 migration (non-constant DEFAULT in SQLite ALTER TABLE)
  • Update pr-merge workflow to always clean up staging (branch-based + legacy PR-based)
  • Add versioning guide (docs/guides/versioning.md) and update command reference docs

Closes #118, closes #23.

Changed files

File Change
src/lib/semver.ts NEW: semver parsing/bumping utility
test/semver.test.ts NEW: 24 unit tests
src/commands/dataset.ts Replace version stub with release; add update
src/lib/api.ts Add getVersionHistory() client function
backend/src/routes/datasets.ts Add GET /datasets/:id/versions endpoint
backend/src/services/github.ts Add getFileContent(); update pr-merge cleanup
.github/workflows/deploy-backend.yml Add D1 migration step before deploy
backend/src/db/migrations/0011_last_activity.sql Fix non-constant DEFAULT
docs/commands/dataset.md Replace version docs with release + update
docs/guides/versioning.md NEW: comprehensive versioning guide
docs/index.md Add guides section

Test plan

  • bun run lint -- clean
  • bunx tsc --noEmit -- clean (frontend + backend)
  • bun test -- 409 pass, 0 fail, 35 skip
  • Semver tests: 24/24 pass
  • API tests pass against dev backend (migrations applied)
  • Manual test: nemar dataset release nm099999 --type patch
  • Manual test: clone nm099999, make changes, nemar dataset update

Implement `nemar dataset release` for version bump PRs and
`nemar dataset update` for pushing local changes via PR.

- Add semver utility (src/lib/semver.ts) with tests
- Add GET /datasets/:id/versions backend endpoint
- Add getFileContent() to GitHub service
- Update pr-merge workflow: always cleanup staging
- Add D1 migration step to deploy-backend workflow
- Fix 0011 migration: remove non-constant DEFAULT
- Add versioning guide and update command docs
- Log errors in catch blocks instead of silently swallowing
- Check git add exit codes before proceeding to commit
- Guard monitoring mode behind successful PR creation
- Validate getFileContent response shape
- Fix collaborator query (remove non-existent status column)
- Add D1 migration step to production deploy workflow
- Version fetch failures are now hard errors (not silent "1.0.0" fallback)
- Wrap all JSON.parse calls in try-catch with user-friendly messages
- Check git status exit code in update command
- Remove unused repoName variable in release monitor
- Narrow VersionInfo.provider to "ezid" | "zenodo" union type
- Fix misleading comment on file categorization regex
- Clarify cleanup-staging step name for always() behavior
- Add maxAttempts comment in update monitor loop
Bare catch blocks reported all errors as "invalid JSON" which could
hide permission or filesystem errors. Now checks for SyntaxError
to provide accurate error messages.
@neuromechanist
neuromechanist merged commit d40e4f7 into dev Feb 12, 2026
7 checks passed
@neuromechanist
neuromechanist deleted the 118-add-interactive-dataset-versioning-cli-command branch February 12, 2026 16:33
@neuromechanist neuromechanist linked an issue Feb 12, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add interactive dataset versioning CLI command

1 participant