Documentation site, build scripts, and release workflows#329
Draft
begna112 wants to merge 3 commits intovast-ai:masterfrom
Draft
Documentation site, build scripts, and release workflows#329begna112 wants to merge 3 commits intovast-ai:masterfrom
begna112 wants to merge 3 commits intovast-ai:masterfrom
Conversation
Bug fixes: - Fix mutable default arguments in http_put/post/del - Add missing exception handling in http_request - Fix timezone handling with UTC-aware timestamps - Fix show_instances row rebinding bug - Fix show_machine dict response handling - Fix parse_query field alias data loss - Remove hardcoded if True anti-patterns - Fix raw mode to return parsed JSON consistently - Fix namespace attribute typo - Replace bare except clauses with specific exceptions - Remove shell=True from subprocess calls - Fix self-test instance creation type handling and error messages Infrastructure improvements: - Add request timeout support with configurable defaults - Expand retry logic to cover 502/503/504 and connection errors - Add JSONDecodeError protection to high-risk .json() sites - Consolidate direct requests calls through http_* helpers - Add structured JSON error output for --raw mode - Add raw mode return handling to all command functions - Remove unreachable code after raise_for_status() - Add api_call/output_result/error_output DRY helpers - Add 2FA session expiry handling with automatic key fallback - Filter sensitive fields from show endpoints output CLI improvements: - Improve help text and descriptions for 130+ commands - Add named flags for transfer credit (--sender, --recipient) - Fix argument mismatches in usage strings - Standardize show maints to use --ids instead of -ids - Remove Python 2 compatibility code Test infrastructure: - Add pytest with regression, smoke, and unit test suites - Add CI workflow with lint, test, and smoke-test jobs - Add ruff configuration for code quality - Add dev dependencies to pyproject.toml
Introduce the vastai Python package providing programmatic SDK access to the Vast.ai API, plus a serverless client/server framework for building GPU workers. New packages: - vastai/ - SDK wrapper (sdk.py), base class (vastai_base.py), serverless client and server framework - vastai_sdk/ - Backward-compatibility shim for old import path - examples/ - 17 client/server example scripts - benchmarks/ - Prometheus metrics and docker-compose Test additions: - 7 unit tests for serverless components and VastAIBase - 6 regression tests for SDK integration, lazy imports, exception handling, naming consistency Config updates: - pyproject.toml: add pyparsing dep, serverless optional deps, vastai/vastai_sdk packages, mypy config - ci.yml: add type-check job (mypy vastai/)
- Full MkDocs Material documentation site (26 pages) covering CLI commands, SDK reference, serverless guide, and migration guide - CLI docs generation scripts with MkDocs pre-build hook - GitHub Actions workflows for docs deployment and releases - Pre-commit configuration with Ruff linter/formatter - Changelog following Keep a Changelog format - Add docs optional dependencies to pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a full MkDocs Material documentation site, CLI/SDK doc generation scripts, release workflows, and build infrastructure.
Documentation (
docs/)--helpoutput)Build Scripts (
scripts/)generate_cli_docs.py- Generatesdocs/cli/commands.mdfrom CLI help outputgenerate_detailed_cli_docs.py- Generates detailed per-command docsmkdocs_hooks.py- MkDocs pre-build hook for auto-generating CLI referenceWorkflows
.github/workflows/docs.yml- Auto-deploy docs to GitHub Pages on push to master.github/workflows/release.yml- Release workflow (PyPI publish disabled pending config)Other
mkdocs.yml- MkDocs Material theme configuration.pre-commit-config.yaml- Ruff linter and formatter pre-commit hooksCHANGELOG.md- Version historypyproject.toml- Addeddocsoptional dependency group,vast_pdf.pypackage includeStats
Test plan
pip install -e ".[docs]"installs doc dependenciesmkdocs buildsucceeds without errorsmkdocs serverenders documentation correctlypre-commit run --all-files)